I have 10 telerik tabs in which each page is a partial view.
On click of first tab a grid appears which has few records in it and a row in the grid is highlighted upon some condition.
There are few buttons in the page which has different functionality each.
Onclick of any button an action happens and grid rebinds accordingly(i.e the data in the grid changes based on the button action).
For this I am using grid.rebind();
Again I am checking for the condition to highlight the same row which was highlighted before through jQuery like this
var parentTR = $("input:checkbox[class=check-box]:checked").parent().parent();
$(parentTR).addClass("hover_active");
But whichever class I add or delete to grid rows nothing is updated to the grid.
May I know the solution for this?
<script type="text/javascript">
function
SetScrollPositionOnlineContacts() {
//var pane = splitter.GetPaneById("RadPanelBarRoster");
//document.getElementById("RadPanelBarRoster").scrollTop;
var
splitter =$find(
"RadSplitterBottomParent"
);
var
intY = splitter.GetPaneById(
"RadPanelBarRoster"
).scrollTop;
var
date =
new
Date();
date.setTime(date.getTime() + (1 * 60 * 60 * 1000));
var
expires =
"; expires="
+ date.toGMTString();
document.cookie =
"cookieDivOnlineContacts"
+
"="
+ intY + expires +
"; path=/"
;
//document.title = intY;
}
function
readCookieOnlineContacts(name) {
var
nameEQ = name +
"="
;
var
ca = document.cookie.split(
';'
);
for
(
var
i = 0; i < ca.length; i++) {
var
c = ca[i];
while
(c.charAt(0) ==
' '
) c = c.substring(1, c.length);
if
(c.indexOf(nameEQ) == 0)
return
c.substring(nameEQ.length, c.length);
}
return
null
;
}
</script>
<
telerik:RadSplitter
ID
=
"RadSplitterBottomParent"
runat
=
"server"
Height
=
"100%"
Width
=
"100%"
Orientation
=
"Vertical"
BackColor
=
"#ECECFF"
Skin
=
"WebBlue"
LiveResize
=
"True"
SplitBarsSize
=
""
HeightOffset
=
"124"
Visible
=
"true"
BorderSize
=
"0"
PanesBorderSize
=
"0"
>
<!-- Start Left Roster Panel -->
<
telerik:RadPane
ID
=
"RadPaneRoster"
runat
=
"server"
Width
=
"220px"
Scrolling
=
"None"
>
<
telerik:RadContextMenu
ID
=
"RadContextMenuRoster"
runat
=
"server"
OnClientItemClicked
=
"onRosterContextMenuClick"
EnableShadows
=
"True"
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"View Conversation"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"View Properties"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Add to Favourites"
Enabled
=
"False"
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadContextMenu
>
<
telerik:RadPanelBar
ID
=
"RadPanelBarRoster"
runat
=
"server"
Skin
=
"Metro"
Width
=
"100%"
onscroll
=
"SetScrollPositionOnlineContacts()"
Height
=
"3000px"
OnClientItemClicked
=
"onRosterClick"
OnClientContextMenu
=
"onRosterContextMenu"
PersistStateInCookie
=
"True"
Style="width: 100%; border-top: 0; border-bottom: 0;
z-index: 2"
ExpandMode
=
"FullExpandedItem"
EnableViewState
=
"True"
ViewStateMode
=
"Inherit"
OnItemClick
=
"RadPanelBarRoster_ItemClick"
>
</
telerik:RadPanelBar
>
</
telerik:RadPane
>
</
telerik:RadSplitter
>
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
StringBuilder sbScript =
new
StringBuilder();
sbScript.Append(
"<script language='JavaScript' type='text/javascript'>"
);
//For order Panel
sbScript.Append(
"document.cookie = cookieDivOnlineContacts + \"=\" + \"\" + -1 + \"; path=/\";"
);
sbScript.Append(
"</script>"
);
//// Make use ScriptManager to register the script
ScriptManager.RegisterStartupScript(
this
,
this
.GetType(),
"@@@@MyCallBackAlertScript"
, sbScript.ToString(),
false
);
}
StringBuilder sbScript1 =
new
StringBuilder();
sbScript1.Append(
"<script language='JavaScript' type='text/javascript'>"
);
//For order Panel
sbScript1.Append(
"var strCookOnlineContacts = readCookieRfqOrder(\"cookieDivOnlineContacts\"); "
+
"document.getElementById(\"RadPanelBarRoster\").scrollTop = strCookOnlineContacts;"
);
sbScript1.Append(
"</script>"
);
// Make use ScriptManager to register the script
ScriptManager.RegisterStartupScript(
this
,
this
.GetType(),
"@@@@MyCallBackAlertScript"
, sbScript1.ToString(),
false
);
}