Update viewpath dynamically after grid row selected

3 posts, 0 answers
  1. Jack Voss
    Jack Voss avatar
    27 posts
    Member since:
    May 2010

    Posted 07 Apr 2011 Link to this post

    What I am trying to do is to dynamically change the viewpath on my fileexplorere based on the selected item in a radgrid.

    Unfortunately ItemCommand fires off after the Page_load event.  This means that when the user makes his selection Page_load still does not know that an item has been selected at all.

    Which means I cannot update the viewpath for the fileexplorer, as page_load is the latest event that this can be done it seems. 

    Does anyone have any other ideas?

    I've actually had it sort of working where I dynamically create a fileexplorer in the ItemCommand event. When I do this though, the upload and delete commands do not seem to function properly.  Not to mention if a postback occurs that is not casused by the grids itemcommand event fireing the fileexplorer disappears.

    Right now it looks like I will just manually create my own.
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 08 Apr 2011 Link to this post

    Hi Jack,

    You can use the Request parameters __EVENTTARGET and __EVENTARGUMENT to determine which control caused the postback in Page_Load event and apply the changes to the RadFileExplorer. However, to provide more to the point answer I will need more details regarding the specific scenario. On what command exactly you want to change the ViewPaths of the explorer?

    As an alternative solution, you can use a hidden field to store the selected row index, update it with JavaScript using the RadGrid's ClientRowSelected event and set the paths to RadFileExplorer according to the value of this hidden field in Page_Load.

    Greetings,
    Dobromir
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jack Voss
    Jack Voss avatar
    27 posts
    Member since:
    May 2010

    Posted 08 Apr 2011 Link to this post

    I beleive your alternative solution will solve all my problems.  
    As this will allow me to not dynamically create the control each time.
    I will try that out over the next couple of days and post my results.

    Thank you very much Dobromir
Back to Top