Moving Columns

hi,

To extract particular column value, i am using grid[row, col].Text, however if the user changes the column position...the above technique will fail..is there a better way of dng the same?

Thanks,
Raul Dsouza

2 Replies

RA Raul June 5, 2007 07:52 AM UTC

Forgot to mention I am using a DGBG.


HA haneefm Syncfusion Team June 5, 2007 06:51 PM UTC

Hi Rahul,

You can use the Binder.NameToColIndex method to get the column index of a column that matches a given name. Please try the below code and let me know if this helps.

this.grid.Model[row , this.grid.Binder.NameToColIndex("YourColumnName")].Text

Best regards,
Haneef

Loader.
Up arrow icon