This is a migrated thread and some comments may be shown as answers.

[Solved] RadGrid doesnt raise OnRequestStart

1 Answer 221 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Servando
Top achievements
Rank 1
Servando asked on 12 May 2009, 03:27 PM
I've a RadGrid with a command button; it doesn't do grid editing, but some server processing and server redirect to an other page.

 

<telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="True" AutoGenerateColumns="False"

 

DataSourceID="ObjectDataSource1" AllowSorting="True" Skin="BavelLook" OnItemDataBound="RadGrid1_ItemDataBound"

 

 

 

OnItemCommand="RadGrid1_ItemCommand" GridLines="None" EnableEmbeddedSkins="False">

 

 

 

<MasterTableView HierarchyLoadMode="Client" DataSourceID="ObjectDataSource1">

 

 

 

<Columns>
<telerik:GridButtonColumn UniqueName="EditColumn" ButtonType="ImageButton" Text="Editar" ImageUrl="~/images/lupa.gif" HeaderText="Editar" CommandName="Editar">  

 

 

    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />

 

 

</telerik:GridButtonColumn>
</Columns>
</telerik:RadGrid>


The command argument is set on server side:

 

 

 

protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)

{

if (e.Item is Telerik.Web.UI.GridDataItem)

{

Telerik.Web.UI.

GridDataItem dataItem = e.Item as Telerik.Web.UI.GridDataItem;
transactionItem item = ((transactionItem)dataItem.DataItem);

 

 

 

 

ImageButton btnEditar = dataItem["EditColumn"].Controls[0] as ImageButton;

 

string argument = item.Id.ToString();

 

btnEditar.CommandArgument = argument;

 

}

}


Page is a content page, so it uses a RadManagerProxi:

 

 

 

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

 

 

<UpdatedControls>

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" />

 

 

 

 

</UpdatedControls>

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

</AjaxSettings>

 

 

 

 

 

</telerik:RadAjaxManagerProxy>


Master page has "OnRequestStart" handle defined:

 

 

 

<

 

telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

 

 

<script type="text/javascript">

 

function OnRequestStart(sender, args)

{

debugger; }

 

 

 

function OnResponseEnd(sender, args)

 {

debugger}

 

 

 

</script>

 

 

 </

 

telerik:RadScriptBlock>

 

 

 

 

 

<

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" DefaultLoadingPanelID="RadAjaxLoadingPanel1">

 

 

 

 

<ClientEvents OnRequestStart="OnRequestStart" OnResponseEnd="OnResponseEnd" />

 

 

 

 

</telerik:RadAjaxManager>


When a row command button is pushed the "OnRequestStart" client event from Master Page is not triggered....
Then I've tried something and set a handle for the "OnCommand" client event of the Grid:

 

 

 

 

 

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<

 

script type="text/javascript">

 

 

 

 

 

function RaiseCommand(sender, args)

 

 

{

 

//retrieve the current commandName and commandArgument

 

 

 

 

alert(String.format("CommandName: {0}, CommandArgument: {1}", args.get_commandName(), args.get_commandArgument()));

 

 

}

 

</script>

 

 

 

</telerik:RadCodeBlock>

 

 

 


...
 

 

 

<ClientSettings>

 

 

<ClientEvents OnCommand="RaiseCommand" />

 

 

 

 

</ClientSettings>

 

 

 

 

 

and I've got surprised... Now the "OnRequestStart" client event is rised after the "OnCommand" handle, but the command argument is empty both on the client handle and on the server side code !!!

I'm using the 2008.Q3 version, migrating to 2009.Q1.SP1 has been postposed because of some problems about skins. I don't know if this problem is version specific.



 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 15 May 2009, 07:37 AM
Hello Servando,

This behavior may be due to the ajax settings, or the setup of the project. Based on the information supplied, it is hard to say what is causing this behavior. If the issue persists, you can open a formal support ticket, and send us the problematic code. We will review it locally, and advise you further.

Best wishes,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Servando
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or