Qualify/Reference datagrid cells by name

  • Thread starter Evert Wiesenekker
  • Start date
E

Evert Wiesenekker

Now I am referencing datagrid cells by index, eq. '...Cells[1].Text'.
I always find this a little bit tricky to use. With DataSets it is
pssible to reference by name eq. 'string someString =
someDataTable.Rows[someRowNumber][someColumnName].ToString()'. Is the
same possible with DataGrids?

Thanks for any help!
 
E

Eliyahu Goldin

Evert,

No, they are different creatures. For the Cells there is only an integer
indexer, but for DataRow there is also a string one. That's why you can
index by column names. And with typed dataset you get an automatically built
..cs file containing a lot of definitions. You don't have this for a
datagrid.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top