Retrieve cell text by Column name

Is it possible to retrieve the cell text by the column name? For instance I have a ciolumn called Marketid, and I''m currently on row 5, I would like to retrieve the value for marketid on the row i;m currently on. Thx

4 Replies

AD Administrator Syncfusion Team February 1, 2005 09:23 PM UTC

Hi AMX, Is it a GridDataBoundGrid? You could use the this.gridDataBoundGrid1.Binder.NameToColIndex(); to get the colindex for the appropriate column and can retrive the celltext. this.gridDataBoundGrid1[5, this.gridDataBoundGrid1.Binder.NameToColIndex("Col1")].Text Best Regards, Jay N


TT Tito Toro February 2, 2005 07:20 PM UTC

>Hi AMX, >Is it a GridDataBoundGrid? > >You could use the > >this.gridDataBoundGrid1.Binder.NameToColIndex(); > >to get the colindex for the appropriate column and can retrive the celltext. > > >this.gridDataBoundGrid1[5, this.gridDataBoundGrid1.Binder.NameToColIndex("Col1")].Text > > >Best Regards, >Jay N Sorry yes it is a databound grid. Im getting the following error error: object ''this._AmerexMarketGrid'' doesn''t have an indexer Thanks


AD Administrator Syncfusion Team February 2, 2005 09:28 PM UTC

Hi AMX, I tried seeing the issue in the attached sample. It seems work fine in 3.0.1.0. What are you doing differently? Can you post a small sample? Thanks, Jay N Forum_Grid_7650.zip


TT Tito Toro February 3, 2005 01:45 PM UTC

Thanks for the sample. I found my problem, I was having a type conversion issue. Thanks

Loader.
Up arrow icon