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

Page size event for detail grid...

1 Answer 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raymond
Top achievements
Rank 1
Raymond asked on 02 Apr 2018, 09:27 PM

I have a radgrid with a parent table and single detail table.  The ItemCommand event works properly for the "Page" and "ChangePageSize" commands coming from the parent grid.  It also works properly for the "Page" command from the detail grid.  However, when changing the page size of the detail grid, the ItemCommand event does not get fired.  The postback occurs and the new page size gets applied properly to the detail table of the grid.  But the ItemCommand event does never fires.  Since it works for the page change event, I don't think this is a configuration issue.

 

I'm using version 2018.1.117.45

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 05 Apr 2018, 02:37 PM
Hi Raymond,

Thank you for pointing out this error. We've run several tests and found it to be a bug of RadGrid control. We have updated your Telerik points as a token of gratitude for reporting this issue.

As a workaround, using the Load event of the Page, you can verify the PostBack initiator as well the event arguments. (Determine PostBack Control or AJAX Request Initiator)
protected void Page_Load(object sender, EventArgs e)
{
    if (IsPostBack && Request.Params["__EVENTTARGET"].StartsWith(RadGrid1.UniqueID))
    {
        // check whether the command was PageSizeChange
        if (Request.Params["__EVENTARGUMENT"].Contains("PageSize;"))
        {
            string[] details = Request.Params["__EVENTARGUMENT"].Split(';');
            GridTableView tableView = FindControl(details[0].Replace("FireCommand:", "")) as GridTableView;
            int newPageSize = int.Parse(details[2]);
            Label1.Text += "TableView Name: " + tableView.Name + ", NewPageSize: " + newPageSize+"<br />";
        }
    }
}

In the meantime, we have logged the issue in our system and can be accessed through the publicly available Feedback Portal: ChangePageSize event does not fire for DetailTables in RadGrid. You can Follow the item to get notified about the upcoming news as well vote up to help raise its priority.

Please excuse us for any inconvenience caused by this problem.

Kind regards,
Attila Antal
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Raymond
Top achievements
Rank 1
Answers by
Attila Antal
Telerik team
Share this question
or