Help needed on GridGroupingControl

Hi, I try to use gridgroupcontrol to display records in a collapse view grouped by dates. I used the codes below to show caption on date value. However, I need to change the format of the date (datetime type) as format as JAN06, instead of the datetime. Cannot figure out a way to do it. Also, how can I get rid of the empty row after the caption. It shows as default, which is not useful for me. Thanks a lot this.grid.ChildGroupOptions.ShowCaptionPlusMinus = true; this.grid.ChildGroupOptions.CaptionText = "{Category}"; this.grid.ChildGroupOptions.CaptionText = this.grid.ChildGroupOptions.CaptionText.Substring(0,5); this.grid.ChildGroupOptions.ShowCaption = true; this.grid.ChildGroupOptions.ShowColumnHeaders = false;

4 Replies

AD Administrator Syncfusion Team February 24, 2006 10:06 PM UTC

You can use the QueryCellStyleInfo event and look for the e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell and just set the e.Style.Text to whatever you would like.


AD Administrator Syncfusion Team February 24, 2006 10:54 PM UTC

Thanks. But I am trying to grab the data from one cell (know the col index already). I can figure out the row index and the event is triggered, but I cannot find the right method to grab the value. Would you show me several lines of sample codes? Thanks >You can use the QueryCellStyleInfo event and look for the e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell > >and just set the e.Style.Text to whatever you would like.


ST stanleyj Syncfusion Team February 25, 2006 07:49 AM UTC

Hi Chrisben, Please refer this thread. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=11530 Best reagrds, Stanley


AD Administrator Syncfusion Team February 27, 2006 01:16 PM UTC

thanks a lot

Loader.
Up arrow icon