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

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

1 Answer 8 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manish
Top achievements
Rank 2
Manish asked on 21 Apr 2014, 07:16 AM
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

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 22 Apr 2014, 06:35 AM
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
Tags
Grid
Asked by
Manish
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 1
Share this question
or