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

Update viewpath dynamically after grid row selected

2 Answers 56 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Jack Voss
Top achievements
Rank 1
Jack Voss asked on 07 Apr 2011, 08:26 PM
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 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 08 Apr 2011, 12:58 PM
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
0
Jack Voss
Top achievements
Rank 1
answered on 08 Apr 2011, 01:36 PM
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
Tags
FileExplorer
Asked by
Jack Voss
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Jack Voss
Top achievements
Rank 1
Share this question
or