How to get the selected Row Data in radgridview in

2 posts, 0 answers
  1. A.p.kumar
    A.p.kumar avatar
    8 posts
    Member since:
    Oct 2015

    Posted 27 Oct 2015 Link to this post

    i have table like

     Id     Name      Age       Sex       Address

     1        xxx         23          m           yyyyyyyy

    2        eee         24          f          zzzzzzzzzz

    So i want the name When i select the row ,  so please tell me ............
  2. Stefan Nenchev
    Stefan Nenchev avatar
    237 posts

    Posted 28 Oct 2015 Link to this post


    In order to get the value of the selected row, you can use the SelectedItem property of the RadGridView. You  can find more information regarding it at the following documentation page - Basic Selection - Selected Items.

    So in your case, the code that you can apply is something similar to the following example:

    var name = ((Person)radGridView.SelectedItem).Name; //c#

    Dim name = DirectCast(radGridView.SelectedItem, Person).Name //VB.Net

    The example assumes that the objects bound to the RadGridView are of type Person, so you can make the necessary changes at your end.

    Stefan Nenchev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top