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

Can I open a web user control from a radgrid by using client-side row select on click

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael Hurse
Top achievements
Rank 1
Michael Hurse asked on 10 Nov 2011, 09:57 PM

Hi

I have a grid as shown below. I open a web user control for editing records. Instead of an edit button, my user community has requested that the web user control be opened by clicking on the row. I know I can use client-side row select this way but I am not sure if there is a way I can use it to open the web user control to edit the record. Can you please advise. thx Michael

<telerik:RadGrid ID="rgAppointments" Width="100%" runat="server" AllowSorting="True" GridLines="None" PageSize="20" Skin="WebBlue"

AutoGenerateColumns="False" AllowFilteringByColumn="False" AllowPaging="True" AutoGenerateEditColumn="True"

AutoGenerateDeleteColumn="False" OnNeedDataSource="rgAppointments_NeedDataSource" OnItemDataBound="rgAppointments_ItemDataBound"

OnInsertCommand="rgAppointments_InsertCommand" OnUpdateCommand="rgAppointments_UpdateCommand" >

<HeaderContextMenu EnableTheming="True">

<CollapseAnimation Duration="200" Type="OutQuint" />

</HeaderContextMenu>

 

 

<MasterTableView>

<RowIndicatorColumn>

<HeaderStyle Width="20px" />

</RowIndicatorColumn>

<ExpandCollapseColumn>

<HeaderStyle Width="20px" />

</ExpandCollapseColumn>

<Columns>

<telerik:GridBoundColumn DataField="id" UniqueName="id" Display="false"></telerik:GridBoundColumn>

<telerik:GridDateTimeColumn DataType="System.DateTime" HeaderText="Date" UniqueName="appointment_date" DataField="appointment_date" DataFormatString="{0:d}">

</telerik:GridDateTimeColumn>

<telerik:GridDateTimeColumn HeaderText="Start Time" PickerType="TimePicker" UniqueName="start_time" DataField="start_time">

</telerik:GridDateTimeColumn>

<telerik:GridBoundColumn DataField="Location" HeaderText="Location" UniqueName="location">

</telerik:GridBoundColumn>

<telerik:GridCheckBoxColumn DataField="confirmed" DataType="System.Boolean" HeaderText="Confirmed"

UniqueName="column">

</telerik:GridCheckBoxColumn>

<ItemStyle Wrap="False" />

</telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="canceled_reason" HeaderText="Cancel" UniqueName="column2">

</telerik:GridBoundColumn>

</Columns>

<PagerStyle Mode="NextPrevAndNumeric" />

<CommandItemSettings AddNewRecordText="Add new appointment" />

<EditFormSettings EditFormType="WebUserControl" UserControlName="PatientAppointmentControl.ascx">

<PopUpSettings Height="420px" Width="700px" Modal="True" ZIndex="2500" />

</EditFormSettings>

</MasterTableView>

<ClientSettings>

<Scrolling ScrollHeight="100px" />

<Selecting AllowRowSelect="True" />

</ClientSettings>

<FilterMenu EnableTheming="True" Skin="Telerik">

<CollapseAnimation Duration="200" Type="OutQuint" />

</FilterMenu>

<GroupingSettings CaseSensitive="False" />

</telerik:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 15 Nov 2011, 08:06 AM
Hello Michael,

You can modify the approach from this online demo to work on single click instead of double:
Grid / Edit on Double-click

Let us know if you have any problems with it.

Best wishes,
Tsvetina
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
Michael Hurse
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or