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

Ajaxify RadButton inside Nested Radgrid

1 Answer 22 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 05 May 2015, 03:05 PM

Hello,

I have a master page that loads a RadTabStrip into it's ContentPlaceHolder.  When the user clicks on a tab a WebUserControl is dynamically loaded into the place holder.  Here's the code:

private void LoadMyUserControl(string controlName, Control parent)
{
    parent.Controls.Clear();
    UserControl ctrl = (UserControl)LoadControl(controlName);
    string userControlID = controlName.Split('.')[0];
    userControlID = userControlID.Replace("/", "").Replace("~", "");
    ctrl.ID = userControlID;
    parent.Controls.Add(ctrl);
}

One of the user controls contains a RadComboBox that's loaded with values.  When the user selects a value from this combo box I load a RadGrid into the user control based on the selected value from the combo box.  

The RadGrid contains one column and a NestedViewTemplate that contains a Nested RadGrid.  Within this nested grid I have some GridTemplateColumns that contain RadButtons within their ItemTemplates.  When the user clicks on one of these buttons I display a panel (make it visible/invisible) that contains another RadComboBox that gets its values based on which button was clicked and the value of the current cell.

The problem is that every time I click the button the entire page reloads (posts back), and if there are a lot of records in the nested grid it takes a long time for the panel to become visible.  I have ajaxified the main radgrid by using a RadAjaxManagerProxy within the user control.  I also tried ajaxifying the nested grid and the buttons within the ItemDataBound event of the nested grid.  

None of my efforts have paid off.  I'm not sure how to make it so that when I click the button only the RadComboBox within the panel gets updated and the whole user control page doesn't get posed back.  If I put "if (!IsPostBack)" on the page_load event of the user control then the radgrid won't get loaded.  

Can anyone help me figure out what to do with this?

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 08 May 2015, 06:52 AM
Hello Shawn,

I am afraid that we need your ajax setting in order to investigate the cause for this issue further. Nevertheless if you have ajax setting whether the grid updates itself you do not need any additional setting if the controls are inside of it.

Regards,
Kostadin
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Grid
Asked by
Shawn
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or