| var insertUnorderedListCommand = RadEditorCommandList["InsertUnorderedList"]; | |
| RadEditorCommandList["InsertUnorderedList"] = function(commandName, editor, oTool) | |
| { | |
| insertUnorderedListCommand (commandName, editor, callBackFnUL); | |
| function callBackFnUL(result) | |
| { | |
| if (result) | |
| { | |
| editor.PasteHtml("<ul class='contentbullets' ><li> </li></ul>"); | |
| }; | |
| } | |
| } |
| var insertUnorderedListCommand = RadEditorCommandList["InsertUnorderedList"]; | |
| RadEditorCommandList["InsertUnorderedList"] = function(commandName, editor, oTool) | |
| { | |
| insertUnorderedListCommand (commandName, editor, callBackFnUL); | |
| editor.PasteHtml("<ul class='contentbullets' ><li> </li></ul>"); | |
| } |

Hi,
I have replaced the rad prometheus grid to new telerik (ASPNETAJAX grid) but it is giving me error in the below code.
Please assist.
private void insertRecord(GridCommandEventArgs e)
{
string args = string.Empty;
// Get the Exam Id
if (e.Item.OwnerTableView.Name == "Detractions")
{
GridDataItem parentExam = e.Item.OwnerTableView.ParentItem;
args = string.Format("\"Detractions/Edit.aspx?eid={0}\", \"DetractionDialog\"",
parentExam.OwnerTableView.DataKeyValues[parentExam.ItemIndex]["ID"].ToString());
}
else
{
args = "\"Edit.aspx\", \"ExamDialog\"";
}
// Create the script to open the editor window
grdExams.ResponseScripts.Clear();//error grdExams.ResponseScripts.Add(string.Format("window.radopen({0});", args)); //error
}
//Error
'Telerik.Web.UI.RadGrid' does not contain a definition for 'ResponseScripts' and no extension method 'ResponseScripts' accepting a first argument of type 'Telerik.Web.UI.RadGrid' could be found (are you missing a using directive or an assembly reference?)
Thanks
vivek

Is it just me, or does anyone think it would be nice if you had access to the old value of the Text property as well as the new one in the Serverside TextChanged event?
--
Stuart
| <telerik:radcombobox id="cboTime" runat="server" skin="Vista" DataSourceID="SqlTime" DataTextField="sTimeId" AutoPostBack="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </telerik:radcombobox> |
| <telerik:RadGrid ID="grdGrid" runat="server" DataSourceID="Sqlgrid" GridLines="None" Skin="Vista" AllowSorting="True" AllowPaging="True"> |
| <MasterTableView DataSourceID="Sqlgrid"> |
| <RowIndicatorColumn Visible="False"> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn Resizable="False" Visible="False"> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <EditFormSettings> |
| <PopUpSettings ScrollBars="None" /> |
| </EditFormSettings> |
| </MasterTableView> |
| <ClientSettings> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| <asp:SqlDataSource ID="Sqlgrid" runat="server" ConnectionString="<%$ ConnectionStrings:MyDbConnectionString %>" |
| SelectCommand="Get_TimeTest" SelectCommandType="StoredProcedure"> |
| <SelectParameters> |
| <asp:ControlParameter ControlID="cboTime" Direction="InputOutput" |
| Name="sTimeId" PropertyName="SelectedValue" Type="String" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource id="SqlTime" runat="server" SelectCommand="SELECT [sTimeId] FROM [Times]" |
| ConnectionString="<%$ ConnectionStrings:MyDBConnectionString2 %>"> |
| </asp:SqlDataSource> |
| </asp:Content> |
| function RadTreeView1_OnClientNodeEditing(sender, eventArgs) |
| { |
| var node = eventArgs.get_node(); |
| var oldText = node.get_text(); |
| var newText = eventArgs.get_newText(); |
| var siblings = node.get_parent().get_nodes(); |
| for(i = 0; i < siblings.get_count(); i++) |
| { |
| var currNode = siblings.getNode(i); |
| if(currNode != node && currNode.get_text() == newText) |
| { |
| alert('A folder with the given name already exists.'); |
| node.set_text(oldText); |
| node.startEdit(); |
| eventArgs.set_cancel(true); |
| return; |
| } |
| } |
| node.set_text(newText); |
| node.set_postBack(true); |
| } |