Asp.NET DataGrid SelectedRow

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Asp.NET DataGrid SelectedRow

Post by JoeRuspante » Wed 22 Sep 2010 01:00

Hi everybody.

I used an OracleDataSource for read data and populate a grid. Now, when I am in the code behind called when a selection change in the grid (AutoGenerateSelectButton to true), I have the SelectedValue correct (key column of my table), but I don't have the SelectedRow valid. It is always an empty SelectedRow (not null, but empty).

So, how can I know the value of a column that isn't the primary key?

Could be this a limit of the "Direct mode"?

I have the DotConnect 5.70.152 and using .NET framework 4


Thank you in advance

Shalex
Site Admin
Posts: 8239
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 27 Sep 2010 14:27

I cannot reproduce the mentioned problem neither in Direct Mode, nor in OCI. Please try to retrieve the necessary value in the handler of the SelectedIndexChanged event (not SelectedIndexChanging) and notify us about the results:

Code: Select all

string myValue = GridView1.SelectedRow.Cells[3].Text;

JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Post by JoeRuspante » Sat 02 Oct 2010 11:43

Ok, using ".cells" seems to work.

Thank you

Post Reply