or
Hi,
We currently have multiple RadEditor's inside an IFrame and we want the standard dialogs (RadWindow) i.e. ImageManager to be displayed on the topmost page. At present the dialogs are restricted to the IFrame of the RadEditor.
We have fixed the problem by setting the editor to use classic dialogs (editor.set_useClassicDialogs(true)), however this doesn't prevent the user from clicking on the toolbar and we require the dialogs to be cross browser and modal i.e. use div elements.
Thanks

OnClientSelectedIndexChanging(sender, eventArgs) {// isUserInformationChanged is a local variable used for the data validationif(isUserInformationChanged){ if (confirm("Do you want to save changes")) { $($("#btnSave")).click(); } else{ $($("#btnCancel")).click(); } }}OnClientSelectedIndexChanging(sender, eventArgs) { // isUserInformationChanged is a local variable used for the data validation if(isUserInformationChanged){ if (confirm("Do you want to save changes")) { $($("#btnSave")).click(); } else{ $($("#btnCancel")).click(); } } eventArgs.set_cancel(true); }<EditFormSettings EditFormType="Template"> <FormTemplate> <div id="editdetail"> <h2> Truck information</h2> <table class="detailtable" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" style="border-collapse: collapse;"> <tr> <td class="detaillabel"> Brand: </td> <td> <asp:PlaceHolder ID="phBrandComboBox" runat="server"></asp:PlaceHolder> </td> </tr> </table> </div> </FormTemplate></EditFormSettings>
In ItemDatBound I inject a UserControle containing a Telerik ComboBox in the PlaceHolder.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyTruckItemComboBox.ascx.cs"
Inherits="Truck_marketplace.MyPortfolio.User_controls.MyTruckItemComboBox" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>MyTruckItemComboBox</title>
</head>
<body>
<telerik:RadComboBox ID="cbMyTruckItemComboBox"
OnSelectedIndexChanged="cbMyTruckItemComboBox_SelectedIndexChanged"
runat="server">
</telerik:RadComboBox>
</body>
</html>
protected void grMyTruck_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is Telerik.Web.UI.GridEditableItem && e.Item.IsInEditMode)
{
// Insert + Edit mode.
Telerik.Web.UI.GridEditableItem EditItem = (Telerik.Web.UI.GridEditableItem)e.Item;
//Brand
MyPortfolio.User_controls.MyTruckItemComboBox ComboBoxBrand = (MyPortfolio.User_controls.MyTruckItemComboBox)LoadControl("MyTruckItemComboBox.ascx");
ComboBoxBrand.ID = "cbBrand";
ComboBoxBrand.GroupID = "BRD";
ComboBoxBrand.Languagecode = "en-US";
}
if (e.Item is Telerik.Web.UI.GridEditFormInsertItem || e.Item is Telerik.Web.UI.GridDataInsertItem)
{
// Insert mode
//Brand
ComboBoxBrand.BindComboBox2();
PlaceHolder phBrandComboBox = (PlaceHolder)e.Item.FindControl("phBrandComboBox");
phBrandComboBox.Controls.Add(ComboBoxBrand);
}
}
In the InsertCommand I the try to find the ComboBox and reading the SelectedValue from it. But I dont have any luck.
All of the code in the code here fails because the cb is null.
protected void grMyTruck_InsertCommand(object sender, GridCommandEventArgs e)
{
NMHG.Data.Truck_marketplace.Advert.Advert NewAdvert = new NMHG.Data.Truck_marketplace.Advert.Advert();
if (e.Item is GridEditableItem && e.Item.IsInEditMode)
{
GridEditableItem editableItem = e.Item as GridEditableItem;
UserControl userControl = editableItem.FindControl(GridEditFormItem.EditFormUserControlID) as UserControl;
Telerik.Web.UI.RadComboBox cb = userControl.FindControl("cbBrand") as Telerik.Web.UI.RadComboBox;
var temp = cb.SelectedValue;
PlaceHolder phBrandComboBox = (PlaceHolder)editableItem.FindControl("phBrandComboBox");
Telerik.Web.UI.RadComboBox cb2 = phBrandComboBox.FindControl("cbBrand") as Telerik.Web.UI.RadComboBox;
var temp2 = cb2.SelectedValue;
Telerik.Web.UI.RadComboBox cb3 = editableItem.FindControl("cbBrand") as Telerik.Web.UI.RadComboBox;
var temp3 = cb3.SelectedValue;
Telerik.Web.UI.RadComboBox cb4 = editableItem.FindControl("cbMyTruckItemComboBox") as Telerik.Web.UI.RadComboBox;
var temp4 = cb4.SelectedValue;
}
}
Can some one please help - Thanks.
I properly do some thing stupid so please bare with me ;-)
Anders Pedersen
| Protected Sub MyGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles MyGrid.ItemDataBound |
| If e.Item.ItemType = GridItemType.Item Or e.Item.ItemType = GridItemType.AlternatingItem Then |
| Dim dataItem As GridDataItem = CType(e.Item, GridDataItem) |
| Dim currentRow As DataRowView = DirectCast(e.Item.DataItem, DataRowView) |
| For Each col As GridColumn In RadgridWinServerOSCount.Columns |
| If col.UniqueName = "columnOS" Then |
| Dim strTxt As String = currentRow.Row("Operating_System").ToString |
| Dim NewUrl As String |
| NewUrl = Server.UrlEncode(strTxt) |
| CType(dataItem("columnOS").Controls(0), HyperLink).NavigateUrl = "~/test.aspx?Os=" & NewUrl |
| End If |
| Next |
| End If |
| End Sub |