Show a new row when Filter condition is applied in Grid View

5 posts, 0 answers
  1. Srini
    Srini avatar
    5 posts
    Member since:
    Nov 2010

    Posted 02 Nov 2010 Link to this post

    We have to show a newly added row even when a filter condition is applied. How can we achieve this
  2. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 02 Nov 2010 Link to this post

    Hello Srini,

    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.

    Kind regards,
    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
  3. DevCraft banner
  4. Srini
    Srini avatar
    5 posts
    Member since:
    Nov 2010

    Posted 02 Nov 2010 Link to this post

    Hello Nikolov,

    Thank you for your reply.

    The user wants to see the new row even when a filter condition is applied, so i cant use the first approach.

    Could you please provide a small sample for the second approach.
  5. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 09 Aug 2011 Link to this post

    Hey,

    We have the same problem for non-paged lists. In a paged list, after adding a new item we see the new item and the filters aren't reapplied until we save or refresh the list. Is there a way to get this behavior for non-paged lists?

    Sodi We
  6. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 12 Aug 2011 Link to this post

    Hello Sodi We,

    I'm not sure that I can understand your requirement. Generally filtering is applied before paging and I cannot reproduce such scenario when item is visible when it is committed and doesn't pass the filter (no matter if there is paging or not). Could you please provide me with a little bit more information about your scenario?
    Thank you in advance.

    Regards,
    Nedyalko Nikolov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top
DevCraft banner