4 Answers, 1 is accepted
0
Hi Ron,
I suppose you are referring to the RadGrid's selected row index or column. Since, the RadXmlHttpPanel uses ASP.NET callbacks this means that the control will not load and save its ViewState and its client state, which means the selected row index will not be available in the ServiceRequest event.
You could however send the needed information from the client as parameter to the set_value method, and then access it on the server.
Greetings,
Pero
the Telerik team
I suppose you are referring to the RadGrid's selected row index or column. Since, the RadXmlHttpPanel uses ASP.NET callbacks this means that the control will not load and save its ViewState and its client state, which means the selected row index will not be available in the ServiceRequest event.
You could however send the needed information from the client as parameter to the set_value method, and then access it on the server.
Greetings,
Pero
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Ron
Top achievements
Rank 1
answered on 28 Jul 2011, 02:55 AM
Understood, but I'm already using the set_value method for the radxmlhttppanel. I couldn't use it twice can I?
0
Accepted
Hello Ron,
You could pass more than one argument to the set_value method in the following way:
Client:
and access it on the server:
Regards,
Pero
the Telerik team
You could pass more than one argument to the set_value method in the following way:
Client:
<script type=
"text/javascript"
>
function
SetValue()
{
var
panel = $find(
"<%=XmlPanel1.ClientID %>"
);
var
name =
new
Object();
name.First =
"George"
;
name.Last =
"Brown"
;
panel.set_value(Sys.Serialization.JavaScriptSerializer.serialize(name));
}
</script>
and access it on the server:
protected
void
XmlPanel1_ServiceRequest(
object
sender, Telerik.Web.UI.RadXmlHttpPanelEventArgs e)
{
JavaScriptSerializer serializer =
new
JavaScriptSerializer();
Object value = serializer.Deserialize(e.Value,
typeof
(Object));
Dictionary<String,
object
> dict = (Dictionary<
string
,
object
>)value;
XmlPanel1.Controls.Add(
new
LiteralControl(dict[
"First"
].ToString() +
" "
+ dict[
"Last"
].ToString()));
}
Regards,
Pero
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Ron
Top achievements
Rank 1
answered on 05 Aug 2011, 10:11 AM
This worked, I really appreciate your assistance with this one, plus you introduce me to something new which. I will be doing some reading on the javascript serializer to learn more.
Thanks,
Ron
Thanks,
Ron