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

BeginInsert() in middle of grid

6 Answers 46 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gen
Top achievements
Rank 1
Gen asked on 28 Apr 2011, 10:21 PM
Hello,

Is there a way to insert a line somewhere in the grid (ex. at click location), and not at the end of the grid?

I would like to do that because I am using RadDataPager and can have 10+ pages. BeginInsert() will add the new item at the bottom of the last page, regardless of the page I'm in, making it not user friendly.
Thanks,
Gen

6 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 29 Apr 2011, 07:16 AM
Hello Gen,

You may set the ShowInsertRow property of the grid. Thus a special row will be displayed at the top of the RadGridView that will allow you to add items.
 

All the best,
Maya
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Gen
Top achievements
Rank 1
answered on 29 Apr 2011, 06:42 PM
Thank you for your quick response.

I see that the RadTreeListView also has the same proprety.
I need to have a template for the new line, and I based myself on this example:
http://www.telerik.com/community/forums/silverlight/gridview/newrowstyle-example.aspx

For the RadGridView, I use TargetType="telerik:GridViewRow", but I can't figue out witch Type to use for the TreeList.
Any idea?
Thanks,
Gen
0
Gen
Top achievements
Rank 1
answered on 29 Apr 2011, 07:29 PM
Turns out that the same TargetType will do for both RagGridView and RadTreeListView, i.e. TargetType="telerik:GridViewRow"
0
Vanya Pavlova
Telerik team
answered on 29 Apr 2011, 07:48 PM
Hello Gen,

 

As you might know RadTreeListView directly inherits RadGridView in order to display hierarchical data in a TreeView manner. By that reason you may create styles targeted either at GridViewRow or at TreeListViewRow and they will be applied to RadTreeListView. This will work in cases when you are creating simple styles. In case you have to modify the default TreeListViewRow's template create a style targeted at TreeListViewRow, not at GridViewRow. Then everything should work as expected. 


All the best,
Vanya Pavlova
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Yogish
Top achievements
Rank 1
answered on 10 Jan 2012, 09:22 AM
hai, If We want to insert multiple row then what we have to do
0
Yogish
Top achievements
Rank 1
answered on 10 Jan 2012, 09:22 AM
hai, If We want to insert multiple row then what we have to do
Tags
GridView
Asked by
Gen
Top achievements
Rank 1
Answers by
Maya
Telerik team
Gen
Top achievements
Rank 1
Vanya Pavlova
Telerik team
Yogish
Top achievements
Rank 1
Share this question
or