I am trying to add an Append option to the context menu utilizing an Edit Form Template pop-up. The Insert option was easy since you had many examples. I tried, client side, to change the command to InitInsert with a currentIndex of -1 to indicate an Append operation, see below. When it runs, I do not get the Edit Form Template pop-up. I am also trying to incorporate the same functionality into Insert and Append buttons, separate from the Tree List control.
function CM_onClientItemClicked(sender, args) {
var commandName = args.get_item().get_value();
if (commandName == 'Append')
_tlConfig.fireCommand('InitInsert', -1);
else
_tlConfig.fireCommand(commandName, currentIndex);
}Protected Sub RadTreeList1_DataBound(sender As Object, e As System.EventArgs) Handles RadTreeList1.DataBound RadTreeList1.ExpandAllItems()End SubFaulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: nlssorting.dll, version: 4.0.30319.239, time stamp: 0x4e182039
Exception code: 0xc00000fd
Fault offset: 0x0000000000001e4e
Faulting process id: 0x1900
Faulting application start time: 0x01cc9db854916354
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\nlssorting.dll
Report Id: 93fd70b4-09ab-11e1-8d6d-1cc1de54a95b

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>
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { //access_layerDataContext db=new access_layerDataContext(); ques_tbl t1= new ques_tbl(); if (e.Row.DataItem == "qAnswered") { Image img = (Image)e.Row.FindControl("image1"); if (t1.qanswered == true) { img.ImageUrl = "/images/question_mark.jpg"; } } }
Is my code with simple asp.net Grid
now for telerik I wrote the following but its not helping me .
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item.Cells[1].Text== "True")
{
Image img = (Image)e.Item.FindControl("Image1");
img.ImageUrl = "/images/question_mark.jpg";
}
}
and I am getting this error ,at Line 55 the index is out of Range .
Line 53: {
Line 54: ques_tbl t1 = new ques_tbl();
Line 55: if (e.Item.Cells[1].Text== "True")
Line 56: {
Line 57: Image img = (Image)e.Item.FindControl("Image1");