Sorting question on GridGroupingControl

Hi, I would like to load data to datatable used as by my gridgroupcontrol. The data is grouped by column 1 and I would like to it sorted in each group by column 2. After the data initialized, I do not want the user to sort the data any more. I have some problems to find a way to sort without grouping. Also, I did not get a way to disable sorting afterwards in ggroupcontrol. Thanks for the help Chris

3 Replies

ST stanleyj Syncfusion Team March 3, 2006 10:53 AM UTC

Hi Chris, Please try setting AllowSortColumns property. this.gridGroupingControl1.TableOptions.AllowSortColumns = false; Let us know if your requirement is different. Best regards, Stanley


IJ Irina Jouk August 30, 2006 06:29 PM UTC

Hi,
I use version 2.0.5.1 of grouping control and there is no such property AllowSortColumns. Please let me know how could I disable sorting.



>Hi Chris,
>
>Please try setting AllowSortColumns property.
>
>this.gridGroupingControl1.TableOptions.AllowSortColumns = false;
>
>Let us know if your requirement is different.
>
>Best regards,
>Stanley


AD Administrator Syncfusion Team August 31, 2006 05:26 AM UTC

Hi Irina,

This property has been added in the later 2.1 releases. If you do not wish to sort the tables in a grid, then cancel the click action in the TableControlCellClick for all table.

private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
{
string CellType = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex,e.Inner.ColIndex).CellType ;
if( CellType == "ColumnHeaderCell")
e.Inner.Cancel = true;
}

Thanks,
Haneef.

Loader.
Up arrow icon