Geeth
Geeth

Reputation: 5343

How to find control in CommandItemTemplate for RadGrid in clientside function rowcreated

i am using radgrid in my application. i want to enable/disable the inside the CommandItemTemplate of RadGrid in rowselected client event. i have tried some sample codes but always returns null values for the control. Tried this sample but returns null. http://www.telerik.com/community/forums/aspnet-ajax/grid/getting-at-the-gridcommanditem-via-the-client-side-api.aspx

   var toolbar = $telerik.findControl(sender.get_masterTableView().get_element(), "export");


    <CommandItemTemplate>

                <a href="#" target="_blank" onclick="return ShowExportPortfolioDialog();" runat="server" id="export">
                    <asp:Image ID="ExportPortfolio" runat="server" ImageUrl="~/ExportIcon.png"
                    AlternateText="Export Portfolio" Height="16px" Width="16px" />
                    Export
                </a>
            </CommandItemTemplate>

Upvotes: 0

Views: 2477

Answers (1)

Daniel Benitez
Daniel Benitez

Reputation: 236

Try this: var anchorWrapper = $telerik.findElement(document, "export");

Make sure that you call this code when the client-side object of RadGrid is already created.

Good luck

Upvotes: 1

Related Questions