How to get RadGrid in Expended mode after back from another page ?

7 posts, 0 answers
  1. Manish
    Manish avatar
    64 posts
    Member since:
    Jul 2011

    Posted 07 Jul 2011 Link to this post

    Hi,

    I have a grid on page1 and it contain the record that can expend. After expend we can redirect on the page2 and on page2 we have a link button "Back to list". I want to ask that is it possible that can i get it back in expended mode when i came to from page2 ?
    Please help in this matter as soon as possible.


    Thanks
    Manish
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 07 Jul 2011 Link to this post

    Hi,

    U can use Persisting Grid Settings.
    or
    u can also expand row with conditionally
    protected void RadGrid1_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if(e.Item is GridDataItem)
        {
            GridDataitem item = (GridDataItem)e.item;
            // check your condition if needed
            item.Expanded = true;
        }
    }


    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Manish
    Manish avatar
    64 posts
    Member since:
    Jul 2011

    Posted 08 Jul 2011 Link to this post

    Hi,

    I have already used this code in my code but i did't got any result. So i am sending you some screen shots that can be easy for you to understand my problem.

    Screenshot1 of page1
    Screenshot2 of page2
    Screenshot3 of page1 (After come back from page2).



    Thanks
    Manish.
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Jul 2011 Link to this post

    Hello Manish,

    Try the same approach in this following help documentation to persist grid settings after paging.
    Persisting the selected rows client-side on sorting/paging/filtering/grouping.

    Thanks,
    Shinu.
  6. Manish
    Manish avatar
    64 posts
    Member since:
    Jul 2011

    Posted 08 Jul 2011 Link to this post

    Hi Princy,

    Thanks for your link but I am doing it with the server side coding. So i need some server side solution please help me.




    Thanks
    Manish.
  7. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Jul 2011 Link to this post

    Hi Manish,

    If you are using server side approach, you can try the same in the following help documentation.
    Persisting the selected rows server-side on sorting/paging/filtering/grouping.

    Thanks,
    Shinu.
  8. Manish
    Manish avatar
    64 posts
    Member since:
    Jul 2011

    Posted 11 Jul 2011 Link to this post

    Hi Shinu,

    Thanks for the help and it works with some changes.
    Perfect code....


    Thanks
    Manish.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017