Jump to content
Software FX Community

Group Title


Recommended Posts

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! 

Link to post
Share on other sites
  • 1 month later...

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() + ")";

}

}

}

Link to post
Share on other sites

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.

Link to post
Share on other sites

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)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...