How to Remove

Hi, I am setting the Tag peropery as Ascending while sorting this[0, ((SortableColumn)sortingColumns[colIndex]).Column].Tag = ListSortDirection.Ascending; But I want to remove the Tag while clearing the soring. Let me know how to clear the tag thanks RRC

4 Replies

AD Administrator Syncfusion Team June 26, 2006 04:57 PM UTC

Hi Ravi, Try setting the Tag property to Null. Here is a code snippet. this[0, ((SortableColumn)sortingColumns[colIndex]).Column].Tag = null; Please let me know if this helps. Regards, Haneef


RA Ravichandran June 27, 2006 09:10 AM UTC

Haneef, Actuall i tried that one it didt assign null to Tag that why I posted this query here. Pls let me knwo if anyohter way to assign null value to Tag property. Thanks Ravi >Hi Ravi, > >Try setting the Tag property to Null. Here is a code snippet. > >this[0, ((SortableColumn)sortingColumns[colIndex]).Column].Tag = null; > >Please let me know if this helps. >Regards, >Haneef


AD Administrator Syncfusion Team June 27, 2006 05:44 PM UTC

Hi Ravi, For GridControl: The attached sample shows you how to clear the sort direction in your grid. It also has a code that clears the sorting of the grid control. Please refer to the attachement for more details. Here is a sample. http://www.syncfusion.com/Support/user/uploads/sortColumnHeader_c211ad31.zip For DataBoundGrid: Try setting the DefaultView.Sort of the underlying datasource in a grid to string.Empty. Here is a code snippet DataTable dt = this.gridDataBoundGrid1.DataSource as DataTable; dt.DefaultView.Sort = ""; this.gridDataBoundGrid1.Refresh(); Let me know if this helps. Best Regards, Haneef


RA Ravichandran June 29, 2006 07:50 AM UTC

Thanks Haneef. >Hi Ravi, > >For GridControl: > >The attached sample shows you how to clear the sort direction in your grid. It also has a code that clears the sorting of the grid control. Please refer to the attachement for more details. > >Here is a sample. >http://www.syncfusion.com/Support/user/uploads/sortColumnHeader_c211ad31.zip > >For DataBoundGrid: > >Try setting the DefaultView.Sort of the underlying datasource in a grid to string.Empty. Here is a code snippet > >DataTable dt = this.gridDataBoundGrid1.DataSource as DataTable; >dt.DefaultView.Sort = ""; >this.gridDataBoundGrid1.Refresh(); > >Let me know if this helps. >Best Regards, >Haneef

Loader.
Up arrow icon