or
| function DetailGridKeyPressed(sender, args) |
| { |
| var masterTable = $find("<%= EntryGrid.ClientID %>").get_masterTableView(); |
| var items = masterTable.get_dataItems(); |
| var i = 0; |
| var j = 0; |
| for(i = 0; i < items.length; i++) |
| { |
| if (items[i].findControl(sender.get_id()) != null) |
| { |
| if (i + 1 == items.length) |
| { |
| masterTable.insertItem(); |
| } |
| break; |
| } |
| } |
| } |
if i am dropping the node from tree view to image (like recycle bin in desktop ), at this time I wanted open or close the radsplitter bar?
| EditorDropDown InsertEmoticon = new EditorDropDown("InsertEmoticon"); |
| InsertEmoticon.Text = "Dynamic dropdown"; |
| //Set the popup width and height |
| InsertEmoticon.Attributes["width"] = "110px"; |
| InsertEmoticon.Attributes["popupwidth"] = "240px"; |
| InsertEmoticon.Attributes["popupheight"] = "100px"; |
| for (int i = 1; i < 94; i++) |
| { |
| InsertEmoticon.Items.Add(new EditorDropDownItem("<IMG SRC='pages/emoticons/"+i+".gif' />", "pages/emoticons/"+i+".gif")); |
| } |
| main.Tools.Add(InsertEmoticon); |
| //main.Tools.Add(InsertEmoticon); |
| editor.OnClientCommandExecuted = "OnClientCommandExecuting"; |
| string script = "function OnClientCommandExecuting(editor, args)" + |
| "{" + |
| "var name = args.get_name();" + |
| "var val = args.get_value();" + |
| "if (name == 'InsertEmoticon'){" + |
| "editor.pasteHtml('<img src=\"' + val + '\"/>');" + |
| "args.set_cancel(true);" + |
| "}" + |
| "}"; |
| Page.ClientScript.RegisterStartupScript(this.GetType(), "InsertEmoticon", script, true); |