or
function OpenPositionedWindow(oButton, url, windowName) {
var oWnd = window.radopen(url, windowName);
}
function openWin() {
var oWnd = radopen("http://www.google.com", "RadWindow1");
oWnd.setSize(500, 500);
oWnd.center();
<
button onclick="openWin(); return false;">Test</button>
I am using Q1 2009.
| protected void AppointmentsGrid_DeleteCommand( object source, GridCommandEventArgs e ) |
| { |
| DALDataContext dc = new DALDataContext(); |
| int appointmentID = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["AppointmentID"]; |
| dc.Appointments.DeleteOnSubmit(dc.GetAppointmentByID(appointmentID)); |
| dc.SubmitChanges(); |
| AppointmentsGrid.DataBind(); |
| } |
| DALDataContext dc = new DALDataContext(); |
| vw_Appointment appointment = (vw_Appointment)e.Item.DataItem; |
| dc.Appointments.DeleteOnSubmit(dc.GetAppointmentByID(appointment.AppointmentID)); |
| dc.SubmitChanges(); |

| <telerik:GridDropDownColumn DataField="SubscriptionID" HeaderText="Subscription" |
| ListTextField="SubscriptionDescription" ListValueField="SubscriptionTypeID" UniqueName="SubscriptionTypeID"/> |
| protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem) |
| { |
| if (!_isBound) |
| { |
| CapitalPortalDataContext db = new CapitalPortalDataContext(); |
| var nSubscriptions = from s in db.Subscriptions.Where(s => (bool)s.Active) |
| select new |
| { |
| s.SubscriptionTypeID, |
| s.SubscriptionDescription |
| }; |
| (((GridDropDownColumnEditor) |
| ((GridDropDownColumn)RadGrid1.MasterTableView.GetColumnSafe("SubscriptionTypeID")).ColumnEditor)).DataSource = nSubscriptions; |
| _isBound = true; |
| } |
| } |
| } |
<asp:BoundField
| <telerik:GridTemplateColumn HeaderText="Image File" UniqueName="ImageUpload"> |
| <ItemTemplate> |
| <asp:Label ID="LabelImage" runat="server" Text='<%# Eval("FileName") %>'></asp:Label> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <telerik:RadUpload ID="RadUploadImage" runat="server" |
| InitialFileInputsCount="1" MaxFileInputsCount="1" |
| ControlObjectsVisibility="None" MaxFileSize="100000" |
| AllowedFileExtensions=".jpg,.gif,.jpeg" TargetFolder="~/Uploads"/> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
| protected void RadGridPanelImages_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| var editableItem = ((GridEditableItem)e.Item); |
| string thumbURL = string.Empty; |
| string ImageURL = string.Empty; |
| string url = TheCompanyBL.Helpers.GetSiteURL(); |
| string ImageUploadURL = url + "/Uploads/"; |
| RadComboBox rcb = (RadComboBox)e.Item.FindControl("RadComboBoxPanelID"); |
| if (rcb != null) |
| { |
| ip.PanelID = int.Parse(rcb.SelectedValue); |
| } |
| else |
| { |
| ip.PanelID = -1; |
| } |
| int id = -1; |
| RadUpload ru = (RadUpload)e.Item.FindControl("RadUploadImage"); |
| if (null != ru) |
| { |
| string target = Server.MapPath(ru.TargetFolder); |
| string sFileType = ru.UploadedFiles[0].GetExtension(); --- this generates an error even though I HAVE selected a file |
| ip.FileName = ru.UploadedFiles[0].FileName; |
| imagemanager.ResizeAndSave(ru.UploadedFiles[0], ImageUploadURL, target, "PanelImages", true, out thumbURL); |
| imagemanager.ResizeAndSave(ru.UploadedFiles[0], ImageUploadURL, target, "PanelImages", false, out ImageURL); |
| ip.ImageURL = ImageURL; |
| ip.ThumbnailURL = thumbURL; |
| } |
| if (!String.IsNullOrEmpty(thumbURL) && !String.IsNullOrEmpty(ImageURL)) |
| { |
| string err = panelmanager.Add(ip, out id); |
| } |
| } |