Open user control as view mode of row in rowclick like how we load user control in edit mode on edit button click

2 posts, 0 answers
  1. Manish
    Manish avatar
    64 posts
    Member since:
    Jul 2011

    Posted 21 Apr 2014 Link to this post

    Hi,

    I want to load user control as view mode of row on row click. Like how we open user control of edit mode on row.

    I am using Edit button in grid which is opening ~/UserControls/Issues_View_ActionItems.ascx user control as edit mode of row now i just want to open
    ~/UserControls/Issues_Edit_ActionItems.ascx user control on Row Click.


      <telerik:GridEditCommandColumn UniqueName="EditColumn" HeaderText="Edit" ButtonType="ImageButton">
                                        <HeaderStyle Width="15px"></HeaderStyle>
                                        <ItemStyle Width="15px" HorizontalAlign="Center"></ItemStyle>
                                    </telerik:GridEditCommandColumn>



        <EditFormSettings UserControlName="~/UserControls/Issues_View_ActionItems.ascx" EditFormType="WebUserControl">
                                    <EditColumn UniqueName="EditColumn">
                                    </EditColumn>
                                </EditFormSettings>

    Thanks
    Manish
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Apr 2014 in reply to Manish Link to this post

    Hi Manish,

    I guess you want to open the EditForm on row click of the grid. Please try the following code snippet. Elaborate on your requirement if this doesn't help.

    ASPX:
    <ClientSettings Selecting-AllowRowSelect="true" >
      <ClientEvents OnRowClick="OnRowClick" />
    </ClientSettings>

    JS:
    <script type="text/javascript">
        function OnRowClick(sender, eventArgs) {
            sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
        
    </script>

    Thanks,
    Shinu
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top