I have a pretty simple request, I just can't seem to figure out how to do it =)
I have an AJAXified grid with a GridTemplateColumn defined as follows
In the ItemTemplate, there is a LinkButton that executes the code below:
This is in Sitefinity, so I have to use the AjaxManager to redirect or I get a funky URL. When I click on the LinkButton, I get the LoadingPanel displaying in the center of the grid, then it disappears and the page redirects.
What I'd like to do is to disable the LoadingPanel when these LinkButtons are clicked so that it just redirects like a normal page click.
I have to keep Ajax enabled on the grid though because there are other grid functions that require having Ajax.
Is there a way in the LinkButton click event or in the Grid's ItemDataBound event that I can turn off the loading panel for these LinkButtons?
Thanks =)
I have an AJAXified grid with a GridTemplateColumn defined as follows
<
telerik:GridTemplateColumn
HeaderText
=
"Request #"
DataField
=
"ReqNm"
UniqueName
=
"ReqNm"
Groupable
=
"false"
SortExpression
=
"ReqID"
AllowFiltering
=
"true"
HeaderStyle-Wrap
=
"false"
ItemStyle-Wrap
=
"false"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"btn_ReqID"
Text='<%# Eval("ReqID") %>' OnClick="btn_ReqID_Click"
CommandArgument='<%# Eval("ReqID") %>' runat="server" />
<
br
/>
<
asp:Label
ID
=
"lbl_ReqNm"
Text='<%# Eval("ReqNm") %>' runat="server" />
</
ItemTemplate
>
<
FilterTemplate
>
<
telerik:RadComboBox
ID
=
"dd_type_filter"
Skin
=
"Default"
Width
=
"120px"
Font-Size
=
"11px"
MarkFirstMatch
=
"true"
AppendDataBoundItems
=
"true"
SelectedValue='<%# (Container as GridItem).OwnerTableView.GetColumn("ReqNm").CurrentFilterValue %>'
OnClientSelectedIndexChanged="TypeIndexChanged" runat="server">
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"All"
/>
</
Items
>
</
telerik:RadComboBox
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function TypeIndexChanged(sender, args) {
var tableView = $find("<%# (Container as GridItem).OwnerTableView.ClientID %>");
tableView.filter("ReqNm", args.get_item().get_value(), "EqualTo");
}
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
</
telerik:GridTemplateColumn
>
In the ItemTemplate, there is a LinkButton that executes the code below:
protected
void
btn_ReqID_Click(
object
sender, EventArgs e)
{
LinkButton btn_ReqID = (LinkButton)sender;
Session[
"s_ReqID"
] =
int
.Parse(btn_ReqID.CommandArgument.ToString());
string
url =
"~/eis/request/"
;
var AjaxManager = RadAjaxManager.GetCurrent(
this
.Page);
AjaxManager.Redirect(url);
}
This is in Sitefinity, so I have to use the AjaxManager to redirect or I get a funky URL. When I click on the LinkButton, I get the LoadingPanel displaying in the center of the grid, then it disappears and the page redirects.
What I'd like to do is to disable the LoadingPanel when these LinkButtons are clicked so that it just redirects like a normal page click.
I have to keep Ajax enabled on the grid though because there are other grid functions that require having Ajax.
Is there a way in the LinkButton click event or in the Grid's ItemDataBound event that I can turn off the loading panel for these LinkButtons?
Thanks =)