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

2 radgrids and ajaxrefresh only on itemcommand

3 Answers 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
matan
Top achievements
Rank 1
matan asked on 03 Oct 2011, 12:38 PM

Hi everyone,
I've a small issue with my radgrids. This is the scenario

2 radgrids in the page: the first one with "temporary" records, while the second one with the "confirmed" records. In the first grid there's a commandbutton in the footer which allows the user to confirm, in one click, all the records. When the user confirms, then I need to refresh the 2 radgrids and I've achieved this task by writing this piece of code:

<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="RadGridSales" />
        <telerik:AjaxUpdatedControl ControlID="RadGridSoldlConfirmed" />
    </UpdatedControls>
</telerik:AjaxSetting>

The problem is that if the user clicks on the Header of the first radgrid in order to sort the rows the 2 radgrid are being refreshed, while I need to refresh only the first one in this particular case.
The same if the user clicks on another commandbutton which allows it to delete a single row (so one commandbutton for each row) or the complete grid (another commandbutton in the footer).

So, there's a way to refresh the two radgrids only on certains condition?
I hope it's clear what I've just described and don't hesitate to ask for more clarifications.
Thank you in advance to everyone who would help me.

Regards

3 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 03 Oct 2011, 12:48 PM
Hello,

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGridSales">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridSoldlConfirmed" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
               
            </AjaxSettings>
        </telerik:RadAjaxManager>


or
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGridSales">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridSoldlConfirmed" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                 <telerik:AjaxSetting AjaxControlID="RadGridSoldlConfirmed">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridSales" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>



Thanks,
Jayesh Goyani
0
matan
Top achievements
Rank 1
answered on 03 Oct 2011, 01:51 PM
Hello Jayesh,
many thanks for your reply but, unfortunately, it's not the behavior I expected: I'd like to have the refresh of both radgrids only on certain conditions (such as itemcommand == 'SOMETHING') and not on each user action on the grid.
Following your instructions, I get a full refresh of both radgrids on columns sorting of the first one. The same if the user tries to sort the second one.
It's not what I need.

Thank you.    
0
Iana Tsolova
Telerik team
answered on 06 Oct 2011, 04:39 AM
Hi Matan,

Try using the approach illustrated in this demo and see if it works for you.

Regards,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
matan
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
matan
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or