Jump to content
Software FX Community
rvillamilj

Group Title

Recommended Posts

rvillamilj    0

Hi, is there any way you can customize the group title?  I'd like it to show some data based on the items contained in it, not just the field name and the count. The Group.Title property is read only.

 I wish I could do something like this in the DataBound event handler:

    foreach (GridItemGroup grp in Grid1.Groups)     {       double groupAmount = 0;       foreach (GridItem item in grp.Items)       {         groupAmount += Convert.ToDouble(item.DataValues["crmID"]);         item.Style.BackColor = currColo;       }     grp.Title = groupAmount.ToString();

}

Thanks! 

Share this post


Link to post
Share on other sites
AngelR    0

Thanks for your feedback.

Group.Title is going to be editable and this option will be available next week in a hotfix we are releasing on Monday. We let you know as soon as it's ready. Let us know if everything else is working fine.

Share this post


Link to post
Share on other sites
klimekt    0

I'm trying to edit the group titles as described above but I'm getting an error:

'Set' accessor of property 'Title' is not accessible.

 I'm using the newest version of GridFX (1.0.2901.23051)

Share this post


Link to post
Share on other sites
rvillamilj    0

 I had no luck with that either.  I ended up writing my own grid based on a Repeater, much more customizable and it wasn't as hard as I thought it would be!

 Good luck,

 Ricardo. 

Share this post


Link to post
Share on other sites
AngelR    0

This code sample overwrites default Group titles with a customized one.

To use this code you are going to need the latest Hotfix. Let me know if this helps.

************

protected void Page_Load(object sender, EventArgs e)

{

//Let's create a group using brokereage_id Datafield

DataField RootDataField = (DataField)Grid1.DataFields["brokerage_id"];

Grid1.Grouping.RootLevel.Field = RootDataField;

Grid1.Grouping.Enabled = true;

}

***************

protected void Grid1_Rendering(object sender, EventArgs e)

{

if (Grid1.Groups.Count > 0)

{

//For each group item let's display a custom title plus the group item index and the group item count

foreach (GridItemGroup group in Grid1.Groups)

{

group.Title = "Custom Group Title: (" + group.GroupIndex.ToString() + ") (" + group.Items.Count.ToString() + ")";

}

}

}

Share this post


Link to post
Share on other sites
klimekt    0

Obviously I don't have the newest hotfix, because I get the error as described above. I updated my gridfx using the "Update Service Pack Online". How can I get this hotfix??

Share this post


Link to post
Share on other sites
klimekt    0

Thanks, I received the message and installed the hotfix. While it did seem to get rid of the group title error, it is now causing my ChartFX statistical extension to not load properly (yes, I have full ChartFX 7 and statistical extension in the same project and they are both up-to-date). I now get an error "The located assembly's manifest definition does not match the assembly reference". Seems the hotfix was probably compiled with a newer version of this dll then what I have loaded.

Share this post


Link to post
Share on other sites
AngelR    0

I have confirmed this issue to be a bug in the current Hotfix. It was submitted to our development team and it has been addressed already.

We are building a new hotfix installer now and as soon as we deploy it; I will let you know to download the latest one.

Note: Before applying the Hotfix, you will have to delete all dll files located at the Grid FX installation folder\bin in order to copy the good ones. (By default Grid FX is installed at: C:\Program Files\Grid FX\bin)

Share this post


Link to post
Share on other sites
AngelR    0

The Hotfix addressing this issue has been released.

Remember to remove Grid FX dll's in order to get the latest ones.

Let me know how it goes.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×