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

Grid updated on rowclick

2 Answers 112 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 31 Jan 2009, 01:51 PM
Hello,

I have a RadGrid + Asp:Panel. What I want to accomplish is this:
1. On grid rowclick -> refresh update panel, don't refresh grid (this is important because grid has many rows)
2. On grid PageIndexChanged: only refresh grid, don't refresh update panel.

I started with:
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"
        <telerik:AjaxSetting AjaxControlID="GridList" EventName="ItemCommand"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="PanelPreview" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
Now the rowclick works perfectly: the Panel is updated on rowclick and grid isn't. Only problem is that paging doesn't work, so I added an AjaxSetting for PageIndexChanged:
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="GridList" EventName="ItemCommand"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="PanelPreview" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
        <telerik:AjaxSetting AjaxControlID="GridList" EventName="PageIndexChanged"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="GridList" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
Now the paging works, but on row click it updates the grid as well...
Anybody knows what's going on and how I can fix this?

Thanks in advance!



2 Answers, 1 is accepted

Sort by
0
Jan
Top achievements
Rank 1
answered on 02 Feb 2009, 04:06 PM
Nobody?
0
Iana Tsolova
Telerik team
answered on 03 Feb 2009, 08:58 AM
Hi Jan,

In case you need to use the EventName property to distinguish which content to be updated, I suggest that you try MS UpdatePanel instead of RadAjax:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">  
    <ContentTemplate> 
        <asp:Panel ID="Panel1" runat="server">  
        </asp:Panel> 
    </ContentTemplate> 
    <Triggers> 
        <asp:AsyncPostBackTrigger ControlID="RadGrid1" EventName="SelectedIndexChanged" /> 
    </Triggers> 
</asp:UpdatePanel> 
<asp:UpdatePanel ID="UpdatePanel2" runat="server">  
    <ContentTemplate> 
        <telerik:RadGrid ID="RadGrid1" runat="server">  
        </telerik:RadGrid> 
    </ContentTemplate> 
    <Triggers> 
        <asp:AsyncPostBackTrigger ControlID="RadGrid1" EventName="PageIndexChanged" /> 
    </Triggers> 
</asp:UpdatePanel> 

I hope this helps.
 
Best wishes,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Jan
Top achievements
Rank 1
Answers by
Jan
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or