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

Selected Row Lost

3 Answers 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tracy Dryden
Top achievements
Rank 1
Tracy Dryden asked on 17 Dec 2010, 10:44 PM
I have a radGrid on my page and a user control containing a radWindow which contains a radTabStrip. When a row of the radGrid is double-clicked I open the radWindow and load the first tab of the radTabStrip. Clicking on one of the tabs in the tabstrip causes a postback to load that tab. When the postback occurs, the currently selected row in the radGrid is lost! This only happens if I ajaxify the grid. I've tried got the tabstrip and its multipage ajaxified as per your examples and it works fine. The AjaxManagerProxy in the user control looks like this:

<telerik:RadAjaxManagerProxy runat="server" ID="rampTicketDetail">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rtsTicketDetail">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rtsTicketDetail" LoadingPanelID="ralpTicketDetail" />
                <telerik:AjaxUpdatedControl ControlID="rmpTicketDetail" LoadingPanelID="ralpTicketDetail" />
                <telerik:AjaxUpdatedControl ControlID="hfTicketDetailParams" LoadingPanelID="ralpTicketDetail" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rmpTicketDetail">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rmpTicketDetail" LoadingPanelID="ralpTicketDetail" />
                <telerik:AjaxUpdatedControl ControlID="hfTicketDetailParams" LoadingPanelID="ralpTicketDetail" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

As I said, that works great, but I'd like to be able to perform an action from one of the tabs that will affect the selected row of the grid. I can successfully get the selected row of the grid as long as it is not ajaxified, but I apparently, according to your examples, need to ajaxify the grid and the AjaxManagerProxy in order to rebind the grid when the radWindow is closed. However, as soon as I add the AjaxManagerProxy to the page containing the radGrid and set it up, the currently selected row is lost on postback. Here is the AjaxManagerProxy for the page containing the grid:

<telerik:RadAjaxManagerProxy runat="server" ID="rampMainContent">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rampMainContent">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="cpRadGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="cpRadGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="cpRadGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

I've also tried adding the user control to the above AjaxManagerProxy, both as an updated control of the grid and as an updater of the grid, but neither of those options work either. FYI: the user control does implement INamingContainer.

3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 22 Dec 2010, 02:06 PM
Hello Tracy,

A possible reason for the grid selection to be cleared is if the grid is rebound or the page housing it is fully reloaded. Can you confirm this is not the case?

Best wishes,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Tracy Dryden
Top achievements
Rank 1
answered on 22 Dec 2010, 02:57 PM
Neither one is the case. The grid is not being cleared, just the index of the selected row is lost. All I am doing is on row double-click I'm opening a a radWindow containing a tab strip and loading a page view in it. The window, tab strip and multipage (and a hidden field) are ajaxified. If I don't ajaxify the grid, the selected row index is passed on postback with no problem, but when the grid is ajaxified the selected row index is 0.
0
Iana Tsolova
Telerik team
answered on 23 Dec 2010, 11:20 AM
Hello Tracy,

I am afraid we are not aware of such problems with RadGrid when it is ajaxified. It seems that we will need to debug the problematic pages so we can find what is the source of the problem. Can you open a formal support ticket and send us a runnable sample there?

Kind regards,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Tracy Dryden
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Tracy Dryden
Top achievements
Rank 1
Share this question
or