Insert new row in custom place

5 posts, 0 answers
  1. Ali
    Ali avatar
    2 posts
    Member since:
    Apr 2011

    Posted 08 Sep 2011 Link to this post

    Hi
    How to insert new row to RadGridView in custom place. this code add new row at top or bottom :
    RadGridView1.Rows.Add("x","y")
    Thank you.
  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 09 Sep 2011 Link to this post

    Hello Alim

    Just use the Rows.Insert, like so:
    radGridView1.Rows.Insert(position, row);

    Best Regards,
    Emanuel Varga

    WinForms MVP
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ali
    Ali avatar
    2 posts
    Member since:
    Apr 2011

    Posted 09 Sep 2011 Link to this post

    Hi Emanuel

    I use this code but new row again add to top of datagrid:
    RadGridView1.Rows.Insert(Me.RadGridView1.Rows.IndexOf(Me.RadGridView1.CurrentRow), RadGridView1.Rows.NewRow)


    Thank you.
  5. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 09 Sep 2011 Link to this post

    Hello again,

    Sorry... i don't think i understand what you are trying to accomplish, could you please post some screenshots to illustrate this?

    Best Regards.
    Emanuel Varga
  6. tuonglam
    tuonglam avatar
    3 posts
    Member since:
    Sep 2011

    Posted 09 Sep 2011 Link to this post

    yeah,i can't understand.can you give me a example.thank you
Back to Top
UI for WinForms is Visual Studio 2017 Ready