Home All Groups Group Topic Archive Search About

how to get selected row after sorting a DataViewGrid ???

Author
14 Feb 2006 9:30 AM
cmrchs@yahoo.com
Hi,

I have a DataViewgrid (.NET 2005) that is filled with records sorted on a column 'Date'.When double-clicking on a row do I view the selected row in another window. So far so good

But when I sort the DataViewgrid on another column and dbl-click again do I get a different row than the one selected ???

How can I make sure that the selected row is always shown ?

thnx
Chris

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

Author
14 Feb 2006 11:15 AM
Ken Tucker [MVP]
Hi,

        You need to use the datatable default view to get the right row.
Here is a link to an example.

http://www.vb-tips.com/default.aspx?ID=3785fb7f-69ce-4089-8a35-b1ec09f63071

Ken
-----------------
Show quoteHide quote
"Chris C" <cmr***@yahoo.com> wrote in message
news:ejzFclUMGHA.3756@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I have a DataViewgrid (.NET 2005) that is filled with records sorted on a
> column 'Date'.When double-clicking on a row do I view the selected row in
> another window. So far so good
>
> But when I sort the DataViewgrid on another column and dbl-click again do
> I get a different row than the one selected ???
>
> How can I make sure that the selected row is always shown ?
>
> thnx
> Chris
>
> **********************************************************************
> Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &
> ASP.NET resources...