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

Telerik Rad grid miss-fire event

2 Answers 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Phaneendra
Top achievements
Rank 1
Phaneendra asked on 06 Jun 2012, 01:48 PM
Hi,
I'm using rad grid for displaying data, when I click on View button with commandName="view",
my grid is moving to previous page.
If Grid page is 1 view command is working, 
If Grid page is 2 and view command is clicked grid is moving to previous page.
Once please look into the Issue, ASAP -

Regards
Phaneendra

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Jun 2012, 11:54 AM
Hi,

Here is the sample code I tried with the given information.I couldn't replicate the issue you are facing. Please take a look into the code snippet.

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server"
        onneeddatasource="RadGrid1_NeedDataSource" AutoGenerateColumns="false"
        AllowPaging="true" onitemcommand="RadGrid1_ItemCommand">
    <MasterTableView CommandItemDisplay="Top">
        <Columns>
            <telerik:GridBoundColumn UniqueName="OrderID" HeaderText="OrderID" DataField="OrderID"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="EmployeeID" HeaderText="EmployeeID" DataField="EmployeeID"></telerik:GridBoundColumn>
            <telerik:GridButtonColumn UniqueName="View" CommandName="View" ButtonType="PushButton" Text="View"></telerik:GridButtonColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

C#:
protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    if (e.CommandName == "View")
    {
       //your code
    }
}

Please provide the code for further help.

Thanks,
Princy.
0
Phaneendra
Top achievements
Rank 1
answered on 22 Jun 2012, 02:14 PM
Thanks, It due to RadAjaxPanel
Tags
Grid
Asked by
Phaneendra
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Phaneendra
Top achievements
Rank 1
Share this question
or