datagrid problem [SELF-RESOLVED]

  • 12 years ago

    Hi,


    I am working with ado.net and I have such a problem:


    Is it possible to get value of particular datagrid cell  concerning that I have  row index and column name???


    I know that I can get value of cell like this:
    datagrid.item(rowindex,columnindex)


    but if in dataset cloumnindex will change due to query change it won't work properly. So that's why I would like to get value of cell using rowindex and column name. Column name comes form dataset.
    Is it possible to do???


    please help
    thank's in advance for help

  • 12 years ago

    I managed to solve it myself. Here is answer:


    Code:
    CType(dtgNumPlanif.DataSource, DataTable).Rows(MyRowIndex).Item("MyColName")


Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“You can stand on the shoulders of giants OR a big enough pile of dwarfs, works either way.”