rvillamilj Posted January 3, 2008 Report Share Posted January 3, 2008 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! Quote Link to comment Share on other sites More sharing options...
AngelR Posted January 4, 2008 Report Share Posted January 4, 2008 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. Quote Link to comment Share on other sites More sharing options...
klimekt Posted February 19, 2008 Report Share Posted February 19, 2008 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) Quote Link to comment Share on other sites More sharing options...
klimekt Posted February 27, 2008 Report Share Posted February 27, 2008 No response? I'd really like the group titles to show the sum of objects inside. To do this I need to be able to edit the titles. Please help. Quote Link to comment Share on other sites More sharing options...
rvillamilj Posted February 27, 2008 Author Report Share Posted February 27, 2008 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. Quote Link to comment Share on other sites More sharing options...
AngelR Posted February 27, 2008 Report Share Posted February 27, 2008 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() + ")"; } } } Quote Link to comment Share on other sites More sharing options...
klimekt Posted February 27, 2008 Report Share Posted February 27, 2008 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?? Quote Link to comment Share on other sites More sharing options...
AngelR Posted February 27, 2008 Report Share Posted February 27, 2008 You'll receive a personalized message with instructions to download it. If you haven Quote Link to comment Share on other sites More sharing options...
klimekt Posted February 27, 2008 Report Share Posted February 27, 2008 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. Quote Link to comment Share on other sites More sharing options...
AngelR Posted February 27, 2008 Report Share Posted February 27, 2008 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) Quote Link to comment Share on other sites More sharing options...
AngelR Posted February 29, 2008 Report Share Posted February 29, 2008 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. Quote Link to comment Share on other sites More sharing options...
klimekt Posted March 3, 2008 Report Share Posted March 3, 2008 The new hotfix did fix the problem. I can now edit the group titles. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.