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

RadSplitButton inside RadGrid

1 Answer 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jo
Top achievements
Rank 1
Jo asked on 16 May 2011, 10:27 AM
Does anyone have an example of a RadSplitButton (RadButton with EnableSplitButton=true) inside the ItemTemplate of a RadGrid?  I need to know the best way to display the context menu (always the same options) for each row in the Grid.  Is this even possible?  The options in the context menu will either open a RadWindow or redirect the user to another page.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 May 2011, 11:34 AM
Hello Jo,

I am not quite sure about your requirement. You can place the RadButton inside the ItemTemplate as same as any other control.

aspx:
<telerik:GridTemplateColumn>
<ItemTemplate>
         <telerik:RadButton ID="button" runat="server" EnableSplitButton="true"  Text='<%# Eval("Text") %>' ></telerik:RadButton>
       </ItemTemplate>
</
telerik:GridTemplateColumn>

Also check the following demo which shows functionality of SplitButton.
Button / Split Button.

The RadGrid supports RadContextMenu. RadGrid control exposes OnRowContextMenu client event which can be handled to select the right-clicked record in the grid. In order to open the window hook onClientClicking event  to the ContextMenu and open the window.

aspx:
<telerik:RadContextMenu ID="RadContextMenuFirstName" runat="server"  OnClientItemClicking="OnClientItemClicking">
            <Items>
                . . . . . . . . . . . .
            </Items>
</telerik:RadContextMenu>
javascript:
function OnClientItemClicking()
 {
     var oWnd = $find("<%=RadWindow1.ClientID%>");//RadWindow1 is the window in page.
     oWnd.show();
 }

And check out the following demo for more on this.
Grid / AJAX-enabled Context Menu.

The following help article shows how to open RadWindow object from client-side javascript:
Opening Windows

Thanks,
Princy.
Tags
Grid
Asked by
Jo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or