<
telerik:RadAjaxManager ID="radAjaxManager" runat="server" OnAjaxRequest="radAjaxManager_AjaxRequest"
DefaultLoadingPanelID="radAjaxLoadPanel">
</telerik:RadAjaxManager>
function
refreshGrid(arg)
{
if (!arg) {
$find("<%= radAjaxManager.ClientID %>").ajaxRequest("Rebind");
}
else {
$find("<%= radAjaxManager.ClientID %>").ajaxRequest("RebindAndNavigate");
}
}
function OnClientclose(sender, eventArgs) {
if (!eventArgs) {
$find("<%= radAjaxManager.ClientID %>").ajaxRequest("Rebind");
}
else {
$find("<%= radAjaxManager.ClientID %>").ajaxRequest("RebindAndNavigate");
}
protected void radAjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument == "Rebind" || e.Argument == "RebindAndNavigate")
{
using (DataContext db = new DataContext())
{
db.ObjectTrackingEnabled = false;
LoadCountry(db);
LoadConcept(db);
fileUpload.Visible =
true;
if (Convert.ToInt16(ddlFileType.SelectedValue) != Convert.ToInt16(ConceptAttachmentType.Board))
{
grvConcept.DataSource = null;
grvConcept.DataBind();
grvConcept.Visible = false;
}
}
}
}
Child Page:
function CloseAndRebind(args) {
GetRadWindow().BrowserWindow.refreshGrid(args);
GetRadWindow().Close();
}
function GetRadWindow() {
var varWindow = null;
if (window.radWindow) varWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) varWindow = window.frameElement.radWindow; //IE (and Moz as well)
return varWindow;
}
protected
void btnSave_Click(object sender, EventArgs e)
{
.................objMsg.ShowMessage(
"Add filler", "Saved Successfully", (Int16)MessageType.SUCCESS);
ScriptManager.RegisterStartupScript(this.updProjectCreation, this.GetType(), "strScript", "javascript: CloseAndRebind()", true);
}
}
I have this because when the tab's grid is sorted, I have to clear the target controls lest they maintain the wrong data. At least that is the solution I came up with.
So, now I may pose the question, is my solution above (maintain tooltip integrity on a grid sort) the right one? If not, I could remove it ( thus solving my current problem) and implement it the correct way.
Thanks for any info.
<asp:ObjectDataSource ID=
"DS"
runat=
"server"
EnablePaging=
"True"
SelectCountMethod=
"GetListCount"
<br> SelectMethod=
"GetList"
SortParameterName=
"sortType"
TypeName=
"...."
><br></asp:ObjectDataSource>
<
telerik:RadChart
ID
=
"RadChart1"
runat
=
"server"
DataSourceID
=
"edsTotalStakesForEachShop"
IntelligentLabelsEnabled
=
"true"
>
<
Series
>
<
telerik:ChartSeries
Name
=
"Series 2"
DataXColumn
=
"ShopId"
DataYColumn
=
"TotalStakes"
>
</
telerik:ChartSeries
>
</
Series
>
<
PlotArea
>
<
XAxis
AutoScale
=
"False"
DataLabelsColumn
=
"Name"
MaxValue
=
"7"
MinValue
=
"1"
Step
=
"1"
>
<
AxisLabel
>
<
Appearance
>
</
Appearance
>
</
AxisLabel
>
<
Appearance
>
<
LabelAppearance
RotationAngle
=
"90"
>
</
LabelAppearance
>
</
Appearance
>
</
XAxis
>
</
PlotArea
>
</
telerik:RadChart
>
<
telerik:RadChart
ID
=
"RadChart1"
runat
=
"server"
DataSourceID
=
"edsTotalStakesForEachShop"
IntelligentLabelsEnabled
=
"true"
>
<
Series
>
<
telerik:ChartSeries
Name
=
"Series 2"
DataXColumn
=
"ShopId"
DataYColumn
=
"TotalStakes"
>
</
telerik:ChartSeries
>
</
Series
>
<
PlotArea
>
<%--<
XAxis
AutoScale
=
"False"
DataLabelsColumn
=
"Name"
MaxValue
=
"7"
MinValue
=
"1"
Step
=
"1"
>
<
AxisLabel
>
<
Appearance
>
</
Appearance
>
</
AxisLabel
>
<
Appearance
>
<
LabelAppearance
RotationAngle
=
"90"
>
</
LabelAppearance
>
</
Appearance
>
</
XAxis
>--%>
</
PlotArea
>
</
telerik:RadChart
>
<
telerik:RadMaskedTextBox
ID
=
"sesTotalTime"
Label
=
"Total Time:"
runat
=
"server"
Text="<%# Bind('sesTotalTimeFormatted') %>"
ToolTip="Total Session Time (hh:mm:ss)" Mask="##:##:##">
</
telerik:RadMaskedTextBox
>