This is a migrated thread and some comments may be shown as answers.

Insert new row in custom place

4 Answers 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ali
Top achievements
Rank 1
Ali asked on 08 Sep 2011, 05:28 PM
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.

4 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 09 Sep 2011, 05:22 AM
Hello Alim

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

Best Regards,
Emanuel Varga

WinForms MVP
0
Ali
Top achievements
Rank 1
answered on 09 Sep 2011, 07:26 AM
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.
0
Emanuel Varga
Top achievements
Rank 1
answered on 09 Sep 2011, 07:31 AM
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
0
tuonglam
Top achievements
Rank 1
answered on 10 Sep 2011, 02:13 AM
yeah,i can't understand.can you give me a example.thank you
Tags
GridView
Asked by
Ali
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Ali
Top achievements
Rank 1
tuonglam
Top achievements
Rank 1
Share this question
or