This question is locked. New answers and comments are not allowed.
Hi Guys
I currently have a grid with a master / detail configuration, whereby the detail is a tabstrip control. This all works very well however, when I try to use the tabstrip LoadContentFrom method to dynamically load the content of the tab, it does not parse the route values correctly, see below...
items.Add().Text("User Details").LinkHtmlAttributes(new { id = "<#= UserId #>" }).LoadContentFrom("_GetUserDetailsPartial", "Admin", new { userId = "<#= UserId #>" });
This is the line where I add the tab item, as you can see I add the tab item, set the id on the link via LinkHtmlAttributes(new { id = "<#= UserId #>" }) and then try and set up the dynamic content via LoadContentFrom. What results is that the link is created the id attribute is set correctly but the actual link ends up looking like this...
/Admin/_GetUserDetailsPartial?userId=<#= UserId #>
At this point I should let you know that the <#= UserId #> field is a bound field from the master grid. It looks like what is happening is that the URL is being created before the data is bound thereby binding the string value as the id instead of the actual bound data?
I'm not sure if I am just missing something here or what but it is really frustrating the it binds as the correct value but the action doesn't.
Please help
Thanks
Mark
I currently have a grid with a master / detail configuration, whereby the detail is a tabstrip control. This all works very well however, when I try to use the tabstrip LoadContentFrom method to dynamically load the content of the tab, it does not parse the route values correctly, see below...
items.Add().Text("User Details").LinkHtmlAttributes(new { id = "<#= UserId #>" }).LoadContentFrom("_GetUserDetailsPartial", "Admin", new { userId = "<#= UserId #>" });
This is the line where I add the tab item, as you can see I add the tab item, set the id on the link via LinkHtmlAttributes(new { id = "<#= UserId #>" }) and then try and set up the dynamic content via LoadContentFrom. What results is that the link is created the id attribute is set correctly but the actual link ends up looking like this...
/Admin/_GetUserDetailsPartial?userId=<#= UserId #>
At this point I should let you know that the <#= UserId #> field is a bound field from the master grid. It looks like what is happening is that the URL is being created before the data is bound thereby binding the string value as the id instead of the actual bound data?
I'm not sure if I am just missing something here or what but it is really frustrating the it binds as the correct value but the action doesn't.
Please help
Thanks
Mark