or
I have a Rad grid bound to a sqldatasources using hierarchical Declarative relations which works fine. However I would like to have only specific rows expanded on load based on the value in one of the columns of the master table. I have tried the following code which does target the correct rows but does not expand them on load.
Protected
Sub
RadGrid1_ItemDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridItemEventArgs)
Handles
RadGrid1.ItemDataBound
If
(
TypeOf
e.Item
Is
GridDataItem)
Then
If
(e.Item.OwnerTableView.DataSourceID =
"SqlDSmaster"
)
Then
'process requested operations
Dim
DataItem
As
GridDataItem =
CType
(e.Item, GridDataItem)
If
DataItem(
"Status"
).Text =
"Hasdetailrows"
Then
DataItem.BackColor = Drawing.Color.Red
DataItem.FireCommandEvent(
"ExpandCollapse"
, DataItem)
DataItem.Expanded =
True
End
If
End
If
End
If
End
Sub
_onReadyStateChange=function(){
if
(a._xmlHttpRequest.readyState===4){
try
{
if
(
typeof
a._xmlHttpRequest.status===
"undefined"
)
return
}
catch
(b){
return
}a._clearTimer();a._responseAvailable=
true
;
try
{a._webRequest.completed(Sys.EventArgs.Empty)}
finally
{
***** debugger stop here *********************
if
(a._xmlHttpRequest!=
null
){a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest=
null
}}}};
this
._clearTimer=function(){
if
(a._timer!=
null
){window.clearTimeout(a._timer);a._timer=
null
}};
this
._onTimeout=function(){
if
(!a._responseAvailable){a._clearTimer();a._timedOut=
true
;a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest.abort();a._webRequest.completed(Sys.EventArgs.Empty);a._xmlHttpRequest=
null
}}};Sys.Net.XMLHttpExecutor.prototype={get_timedOut:function(){
return
this
._timedOut},get_started:function(){
return
this
._started},get_responseAvailable:function(){
return
this
._responseAvailable},get_aborted:function(){
return
this
._aborted},executeRequest:function(){
this
._webRequest=
this
.get_webRequest();var c=
this
._webRequest.get_body(),a=
this
._webRequest.get_headers();
this
._xmlHttpRequest=
new
XMLHttpRequest;
this
._xmlHttpRequest.onreadystatechange=
this
._onReadyStateChange;var e=
this
._webRequest.get_httpVerb();
this
._xmlHttpRequest.open(e,
this
._webRequest.getResolvedUrl(),
true
);
this
._xmlHttpRequest.setRequestHeader(
"X-Requested-With"
,
"XMLHttpRequest"
);
if
(a)
for
(var b
in
a){var f=a[b];
if
(
typeof
f!==
"function"
)
this
._xmlHttpRequest.setRequestHeader(b,f)}
if
(e.toLowerCase()===
"post"
){
if
(a===
null
||!a[
"Content-Type"
])
this
._xmlHttpRequest.setRequestHeader(
"Content-Type"
,
"application/x-www-form-urlencoded; charset=utf-8"
);
if
(!c)c=
""
}var d=
this
._webRequest.get_timeout();
if
(d>0)
this
._timer=window.setTimeout(Function.createDelegate(
this
,
this
._onTimeout),d);
this
._xmlHttpRequest.send(c);
this
._started=
true
},getResponseHeader:function(b){var a;
try
{a=
this
._xmlHttpRequest.getResponseHeader(b)}
catch
(c){}
if
(!a)a=
""
;
return
a},getAllResponseHeaders:function(){
return
this
._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){
return
this
._xmlHttpRequest.responseText},get_statusCode:function(){var a=0;
try
{a=
this
._xmlHttpRequest.status}
catch
(b){}
return
a},get_statusText:function(){
return
this
._xmlHttpRequest.statusText},get_xml:function(){var a=
this
._xmlHttpRequest.responseXML;
if
(!a||!a.documentElement){a=Sys.Net.XMLDOM(
this
._xmlHttpRequest.responseText);
if
(!a||!a.documentElement)
return
null
}
else
if
(navigator.userAgent.indexOf(
"MSIE"
)!==-1)a.setProperty(
"SelectionLanguage"
,
"XPath"
);
if
(a.documentElement.namespaceURI===
"http://www.mozilla.org/newlayout/xml/parsererror.xml"
&&a.documentElement.tagName===
"parsererror"
)
return
null
;
if
(a.documentElement.firstChild&&a.documentElement.firstChild.tagName===
"parsererror"
)
return
null
;
return
a},abort:function(){
if
(
this
._aborted||
this
._responseAvailable||
this
._timedOut)
return
;
this
._aborted=
true
;
this
._clearTimer();
if
(
this
._xmlHttpRequest&&!
this
._responseAvailable){
this
._xmlHttpRequest.onreadystatechange=Function.emptyMethod;
this
._xmlHttpRequest.abort();
this
._xmlHttpRequest=
null
;
this
._webRequest.completed(Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass(
"Sys.Net.XMLHttpExecutor"
,Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){
this
._defaultTimeout=0;
this
._defaultExecutorType=
"Sys.Net.XMLHttpExecutor"
};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(a){
this
._get_eventHandlerList().addHandler(
"invokingRequest"
,a)},remove_invokingRequest:function(a){
this
._get_eventHandlerList().removeHandler
There is no or empty series
".
waiting for your early reply.
Thanks
Gopi Krishna