or
protected void rauIMAGE_ValidatingFile(object sender, Telerik.Web.UI.Upload.ValidateFileEventArgs e) { //we will check image height and width if (rauIMAGE.UploadedFiles.Count > 0) { foreach (UploadedFile theFile in rauIMAGE.UploadedFiles) { //Stream stream = theFile.InputStream; (when uncomment problem occurs) //using (System.Drawing.Bitmap myImage = new System.Drawing.Bitmap(stream,false)) //{ // if (myImage.Width > 128 || myImage.Height > 128) // { // master.ShowMessage("Image bigger than width :300px by height: 100px not allowed", null, ""); // e.IsValid = false; // } //} //e.SkipInternalValidation = true; } } }if (!Page.IsPostBack) { CSModel.CsMenu menu = new CSModel.CsMenu(); IList<CsMenuSection> getMenuItems = menu.GetAllItems(); foreach (CsMenuSection section in getMenuItems) { RadPanelItem newItem = new RadPanelItem(section.Text); RadPanelBar1.Items.Add(newItem); CsMenuItem item = new CsMenuItem(); for (int i = 0; i <= section.MenuItems.Count-1; i++) { RadPanelItem childItem = new RadPanelItem(section.MenuItems[i].Text); RadPanelItem InternalChildItem = new RadPanelItem(); // add to the child childItem.Items.Add(InternalChildItem); // set the content InternalChildItem.Value = section.MenuItems[i].Link; newItem.Items.Add(childItem); } } } My .aspx page is like this <table> <tr> <td> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadPanelBar ID="RadPanelBar1" runat="server" ExpandMode="FullExpandedItem" Height="250px" > </telerik:RadPanelBar> </td> </tr> </table> My CsMenu section looks like this public IList<CsMenuSection> GetMenuItems() { // go to DB to find menu items. CsMenuSection section = new CsMenuSection("DataReview",""); section.AddMenuItem(new CsMenuItem("Score rep", "/RepScore/Index")); section.AddMenuItem(new CsMenuItem("Something else", "/something/something")); CsMenuSection section2 = new CsMenuSection("Section 2", ""); section2.AddMenuItem(new CsMenuItem("Sample", "/repScoring/Selectreps")); _menu_item_list.Add(section); _menu_item_list.Add(section2); return MenuItemList; } protected void ItemDataBound(object sender, TreeListItemDataBoundEventArgs e) { if (e.Item.ItemType == TreeListItemType.AlternatingItem || e.Item.ItemType == TreeListItemType.Item) { TreeListDataItem item = e.Item as TreeListDataItem; int level = (int)DataBinder.Eval(item.DataItem,"Level"); if (level == 4) { item["InsertCommandColumn"].Enabled = false; } } }function showMenu(e) { var contextMenu = $find("<%ctl00_phHead_pbCaseDetails_i0_i0_RadContextMenu1"); if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget))) { contextMenu.show(e); } $telerik.cancelRawEvent(e); }<telerik:RadButton ID="btnCaseSave" runat="server" EnableSplitButton="True" AutoPostBack="false" Skin="Windows7" Text="Spara" OnClientClicked="showMenu(event)"> </telerik:RadButton> <telerik:RadContextMenu ID="RadContextMenu1" runat="server" Skin="Windows7"> <Targets> <telerik:ContextMenuElementTarget ElementID="ctl00_phHead_pbCaseDetails_i0_i0_btnCaseSave" /> </Targets> <Items> <telerik:RadMenuItem Text="Spara och avsluta"> </telerik:RadMenuItem> </Items> </telerik:RadContextMenu> <div style="clear:both; padding-top:5px;"></div> <div class="HeaderButtons"> <div class="Previous"> <telerik:RadButton ID="btnPrevious" Text="Previous" runat="server" Width="220px" onclick="btnPrevious_Click"> <Icon PrimaryIconCssClass="rbPrevious" PrimaryIconLeft="5" PrimaryIconTop="5" SecondaryIconCssClass="rbPrevious" SecondaryIconRight="5" SecondaryIconTop="5"/> </telerik:RadButton> </div> <div class="Progress"> <asp:Label ID="lblProgress" runat="server" Text="Progress"></asp:Label> </div> <div class="Next"> <telerik:RadButton ID="btnNext" Text="Next" runat="server" Width="220px" onclick="btnNext_Click"> <Icon SecondaryIconCssClass="rbNext" SecondaryIconRight="5" SecondaryIconTop="5" PrimaryIconCssClass="rbNext" PrimaryIconLeft="5" PrimaryIconTop="5"/> </telerik:RadButton> </div> <div id="divSubmit" runat="server" class="Progress" style="display:none" > <telerik:RadButton ID="btnSubmit" Text="Submit Evaluation" runat="server" Width="320px" onclick="btnSubmit_Click"> </telerik:RadButton> </div> </div>.HeaderButtons { margin:auto; position:relative; display:block; margin:auto; text-align:center; width:955px; float:left; } .Previous { width:250px; position:absolute; left:0px; top:0px; text-align:left; float: left; } .Next { width:250px; position:absolute; right:0px; top:0px; text-align:right; float: right; } .Progress { width:955px; position:absolute; top:0px; left:0px; text-align:center; }I am currently builting a resource management app. I have a row of data which consists of a resource name and their hours per month for 12 months.
I want the user to be able to edit each month's hours by double click and then edit in place (e.g. http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx) - this works fine.
However, I also want to be able to edit the resource name in a popup window, as I need to have related comboboxes to select the resource name.
Is this possible? I only seem to be able to set the EditMode at MasterTableView level - which means one or the other, but not both.
Any help would be greatly appreciated!
Matt