Hi,
I visited the foll link http://www.telerik.com/community/forums/aspnet-ajax/menu/radmenuitem-onclient-events-anyone.aspx and realized that there are no click events for radmenuitems.
Following is the heirarchy of my menu items i need to handle click events for
<div style="color:Black"> <radM:RadMenu ID="RadMenu1" runat="server" OnClientLoad="onClientLoad" EnableEmbeddedSkins="False" Skin="Outlook" OnClientItemClosing="onClientItemClosing" EnableRoundedCorners="true" OnItemClick="RadMenu1_ItemClick"> <Items > <radM:RadMenuItem id = "lblWelcome" GroupSettings-Flow="Vertical"> <Items> <radM:RadMenuItem Text="SignOut" ImageUrl="../images/SignOut.gif" /> <radM:RadMenuItem id = "RadLanguageOptionMenu" Text="Set my language preference" ImageUrl="../images/MyProfile.gif" />
<items>
<radM:RadMenuItem Text="fr-FR" />
<radM:RadMenuItem Text="en-US" />
<items>
<radM:RadMenuItem Text="My Profile" ImageUrl="../images/MyProfile.gif" GroupSettings-Flow="Vertical" /> </Items> </radM:RadMenuItem> </Items> </radM:RadMenu> </div>1. Signout : onclicking signout it should navigate to home.aspx
2. for items (fr-FR, en-US etc) of "Select my language perference" on clicking fr-FR etc i need to display an icon besides it.
Kindly assist at your earliest.
Thank you,
Parthavi
<div style="color:Black"> <radM:RadMenu ID="RadMenu1" runat="server" OnClientLoad="onClientLoad" EnableEmbeddedSkins="False" Skin="Outlook" OnClientItemClosing="onClientItemClosing" EnableRoundedCorners="true" OnItemClick="RadMenu1_ItemClick"> <Items > <radM:RadMenuItem id = "lblWelcome" GroupSettings-Flow="Vertical"> <Items> <radM:RadMenuItem Text="<%$ Resources:,res:home_login_login_to_factnet%>" ImageUrl="../images/SignOut.gif" /> <radM:RadMenuItem id = "RadLanguageOptionMenu" Text="Set my language preference" ImageUrl="../images/MyProfile.gif" /> <Items> <radM:RadMenuItem text = "fr-FR" /> <radM:RadMenuItem text = "en-US" /> </Items> <radM:RadMenuItem Text="My Profile" ImageUrl="../images/MyProfile.gif" GroupSettings-Flow="Vertical" /> </Items> </radM:RadMenuItem> </Items> </radM:RadMenu> </div>Hi,
I have a page which displays a master record and contains one or more grids which display child records. The grids use user controls for displaying the data in edit mode.
If a user saves the master record (by clicking a SAVE button) while one of the child grids is still in edit mode, I would like to save the child grids automatically, ie find out if they are in edit or insert mode, retrieve the control values from the usercontrol and call insert/update on the data model (after validation).
If the insert/update is triggered by an event (Button Click), it is handled as follows:
protected void RadGrid1_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
//Get the GridEditableItem of the RadGrid
GridEditableItem editedItem = e.Item as GridEditableItem;
....
What I would like to to when the master record is saved:
protected void btnSave_Click(.....) //Save event of master record
{
...Save master record...
If (childGrid.IsInEditMode)
{
GridEditableItem editedItem = childGrid.GetCurrentEditableItem(); //How can this be achieved
ChildObject co = GetData(editableItem):
if (editableItem.IsInInsertMode()) //How can this be achieved
{
datamodel.insert(co):
}
else
{
datamodel.update(co);
}
}
}
Any help would be greatly appreciated.
Thanks,
Stefan
editorDirPath = string.Format("{0}/Temp/1", editorBasePath); System.IO.Directory.CreateDirectory(this.MapPath(editorDirPath)); // Setting ctrlProductPhoto.TreePaneWidth = 0; ctrlProductPhoto.Upload.ControlObjectsVisibility = ControlObjectsVisibility.None; ctrlProductPhoto.Upload.MaxFileInputsCount = 1; // DirPath targetDirPaths = new string[] {editorDirPath}; ctrlProductPhoto.Configuration.ViewPaths = targetDirPaths; ctrlProductPhoto.Configuration.UploadPaths = targetDirPaths; ctrlProductPhoto.Configuration.DeletePaths = targetDirPaths;