First item in grid selected

2 posts, 0 answers
  1. ranro
    ranro avatar
    50 posts
    Member since:
    Aug 2007

    Posted 16 Jun 2008 Link to this post

    I was wondering if someone could tell me how to make the first row of the grid selected when the page loads for the first time.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Jun 2008 Link to this post

    Hi Ranro,

    Try the following code snippet to achieve the desired scenario.

    CS:
     protected void RadGrid1_PreRender(object sender, EventArgs e) 
        { 
            if (!IsPostBack) 
            { 
                RadGrid1.MasterTableView.Items[0].Selected = true
            } 
        } 


    Thanks
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top