Selected Row by Default

2 posts, 1 answers
  1. Vuyiswa
    Vuyiswa avatar
    188 posts
    Member since:
    Jan 2010

    Posted 05 May 2011 Link to this post

    Good Day

    I have a Radgrid on a Windows app. Win apps are not really my field. Now i have binded the Datagrid from the Datatable and everything is fine. Now on "SelectCanged" event i show a Child window, now my problem is that after the grid is being binded the event gets Fired and the first record gets selected. Now this behavior its a bit annoying for me. Is there any way to turn it off ?

  2. Answer
    Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 06 May 2011 Link to this post

    Hello Vuyiswa Maseko,

    Sadly there is no property that will do this, but the easiest way to accomplish this is to NOT register from the designer to the SelectionChanged event, but to do this in the form Load:

    protected override void OnLoad(EventArgs e)
        radGridView1.CurrentRow = null;
        radGridView1.SelectionChanged += new EventHandler(radGridView1_SelectionChanged);

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga

    Telerik WinForms MVP
Back to Top