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
close icon

Custom Column heading in GDBG

Hi, How can i get a custom Column heading in GDBG being used in multirowrecord view? Instead displaying the name of the columnsin eeach column heading i jst want to disply something like "Week-of-01/05/004". Thanks VivekS

3 Replies

AD Administrator Syncfusion Team May 25, 2004 04:55 PM UTC

You set the HeaderText property in the GridBoundColumn. this.gridDataBoundGrid1.Binder.InternalColumns["Fax"].HeaderText = "Special Fax"; This code assumes you did not explicilty add GridBoundColumns to the grid. If you did, then you would use this.gridDataBoundGrid1.GridBoundColumns["Fax"].HeaderText = "Special Fax"; instead.


VI Vivek May 25, 2004 05:10 PM UTC

Thanks I am trying to change Multirowrecord sample provided by SyncFusion for my testing. So if I do following this.gridDataBoundGrid1.Binder.InternalColumns["CustomerID"].HeaderText = "Special Fax"; this.gridDataBoundGrid1.Binder.InternalColumns["Address"].HeaderText = ""; this.gridDataBoundGrid1.Binder.InternalColumns["PostalCode"].HeaderText = ""; What it does it changes the Header text on first row but 2nd and 3rd row is still displaying old values. I just want to display one value there in column heading. I just want to display one value in column header text. So in header how can I just display one value while other actual rows are still displaying 3 rows? One more thing, How do would I set a value at cell[0,0]? Looking for help.


AD Administrator Syncfusion Team May 25, 2004 07:15 PM UTC

It looks like you are trying to blank out those last two header texts. If the header text is empty, the grid uses the MappingName, so that is why you are not seeing a change. When I tried it, I changes "Fax" to "Special Fax" and it changed the header on the second row. In your case, instead of setting the HeaderText to an empty string, set it equal to a single blank. This should make the grid use the blank as the header text. To set text in cell 0,0, try; this.gridDataBoundGrid1[0,0].Text = "Hello";

Loader.
Live Chat Icon For mobile
Up arrow icon