GridView Select Row By DataKey

  • Thread starter Thread starter JeffBuzz
  • Start date Start date
J

JeffBuzz

I have searched high and low and cannot figure this out. I want
programmatically select a row in my GridView based on a primary key
value (DataKey). You would think this is common, but I guess not. It
is easy to do when the data key is on the current page, but doesn't
work when the key is on another page.

Any ideas?

Thanks,
Jeff
 
Hello JeffBuzz,

What does "when the key is on another page" mean?

You can put your key inti the the grid and make that column hidden

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


J> I have searched high and low and cannot figure this out. I want
J> programmatically select a row in my GridView based on a primary key
J> value (DataKey). You would think this is common, but I guess not. It
J> is easy to do when the data key is on the current page, but doesn't
J> work when the key is on another page.
J>
J> Any ideas?
J>
J> Thanks,
J> Jef
 
Back
Top