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

RadGrid and RowClick

3 Answers 28 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jesper
Top achievements
Rank 1
Jesper asked on 16 Sep 2011, 10:01 AM
Hi,
I have a RadGrid that I want to load other user controls when clicking on a row. How to accomplish this?

I have set ClientSetting EnablePostBackOnRowClick to true and enabled Ajax (EnableAJAX="true").

I have tried to create a method in code behind as below but this will not add the text "Postback" to Label1.

protected void gvShipments_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName == "RowClick")
            {
                e.Item.Selected = true;
                Label1.Text += "Postback";
            }
        }

Pls advice.

Br,
Jesper

3 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 16 Sep 2011, 10:08 AM
Hello,

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

Thanks,
Jayesh Goyani
0
Jesper
Top achievements
Rank 1
answered on 16 Sep 2011, 11:13 AM
Thx,
I made some "trial and error" with above suggestion without success.

Today I am selecting a row in my RadGrid and click a button to visualize some information and other user controls for being able to take further actions with selected row (item). What I want is to remove this button and visualize information and other user controls directly when I select/click a row in my RadGrid. That must be possible in some easy way I hope.

Other "Good-to-know":
My RadGrid and my information and other user controls section is placed in separate updatepanels.
0
Pavlina
Telerik team
answered on 21 Sep 2011, 01:55 PM
Hi Jesper,

Please review the below articles for further information about loading user controls with ajax and RadAjax with UserControls:

http://www.telerik.com/help/aspnet-ajax/ajax-user-controls.html
http://www.telerik.com/help/aspnet-ajax/ajax-load-user-controls.html
http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanagerproxy.html
http://demos.telerik.com/aspnet-ajax/Ajax/Examples/Common/LoadingUserControls/DefaultCS.aspx

Check them out and let me know if any questions arise.

Best wishes,
Pavlina
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
Jesper
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Jesper
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or