We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How can we edit Column name in GridGroupingControl

HI

How can we edit Column name or Header in the GridGroupingControl.

Kindly give your tips or examples

Thank you
Kallyani


5 Replies

AD Administrator Syncfusion Team June 24, 2008 02:46 PM UTC

Hi Kallyani,

If you are binding a System.DataTable to the GridGroupingControl in code, such as ...

this.GridGroupingControl1.DataSource = myDataTable;
this.GridGroupingControl1.DataBind();

I have found that it is much easier to first change the column names in the DataTable, such as ...

int i = 0;
foreach (DataColumn col in myDataTable.Columns)
{
i ++;
col.ColumnName = "Column Number " + i;
}

If you are not binding to a DataTable at runtime, this solution will not work. In that case, I defer to someone else because I have never changed the GridGroupingControl column names after DataBind().




RS Rajarajeswari S Syncfusion Team June 28, 2008 06:00 PM UTC


Hi Kallyani,

Thanks for using Syncfusion products.

The HeaderText property is used to set desired text to the ColumnHeader. Please refer the below code snippet which illustrates this:


this.GridGroupingControl1.TableDescriptor.Columns[0].HeaderText = "ID";


Please refer the sample from the below link, which illustartes this:

http://websamples.syncfusion.com/samples/Grid.Web/6.1.0.34/Grid_Web_ColHeader/main.htm

Please let me know if you have any other concerns.

Regards,
Raji




KL Kallyani Lanje July 4, 2008 10:11 AM UTC

Can we make column header editable on double
click.means when we double click on column header i want to display column header in editable mode i.e.user should be able to edit header text and save the changes on button click.

Thanks.



RS Rajarajeswari S Syncfusion Team July 7, 2008 06:57 AM UTC


Hi Kalyani,

Thanks for you patience.

Editing ColumnHeaders:

I regret to let you know that currently we do not provide support for this feature in our code library. We have notified our development team on this regard and will get back to you once we hear back from them.

Regards,
Raji





ZO zoujing March 6, 2009 02:28 AM UTC

Thanks!


Loader.
Live Chat Icon For mobile
Up arrow icon