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

[Solved] BeginInsert method not working well with filtering

1 Answer 98 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael Hassinger
Top achievements
Rank 1
Michael Hassinger asked on 01 Nov 2010, 11:04 PM
I have a grid where the user adds an item via a context menu choice of "Add New Item." When they click this, I call the grid's BeginInsert method, which creates a new row at the bottom of the grid and allows them to start inputting values.

This works fine until I have filtered on two or more columns.  The grid pre-filters on a column called "status," and if I filter on the column called "assigned to" and then call BeginInsert, the new row isn't visible - I assume because the filtering options are hiding it.

We want to keep the "Excel" feel to the grid and keep input on the grid itself without DataForms and what not.  What's the best way to go about this?

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 02 Nov 2010, 10:21 AM
Hello Michael Hassinger,

Indeed you are right, since that row didn't pass the filter it is not shown. You have 2 options:

1. You could set RadGridView.ShowInsertRow property to true, that way you will add new item in a separate UI that do not care about the filter. (Recommended approach)

2. Another option is to handle RadGridView.AddingNewDataItem event and provide e.NewObject which passes current filter.

Best wishes,
Nedyalko Nikolov
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
Tags
GridView
Asked by
Michael Hassinger
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or