or
| <ExportSettings Pdf-PageWidth="350mm" Pdf-PaperSize="C5_Envelope" IgnorePaging="true" ExportOnlyData="true"></ExportSettings> |
| protected void btnExport_Click(object sender, EventArgs e) |
| { |
| ApplyPDFStyles(); |
| RadGrid1.MasterTableView.ExportToPdf(); |
| } |
| protected void ApplyPDFStyles() |
| { |
| foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns) |
| { |
| if (col.UniqueName == "exCol") |
| { |
| col.Visible = false; //this is a manual expand/collapse collumn I'm hiding. |
| } |
| } |
| GridItem headerItem = RadGrid1.MasterTableView.GetItems(GridItemType.Header)[0]; |
| headerItem.Style["horizaontal-align"] = "left"; |
| headerItem.Style["background-color"] = "#777"; |
| RadGrid1.MasterTableView.GetColumn("ItemNumber").HeaderStyle.Width = Unit.Pixel(35); |
| RadGrid1.MasterTableView.GetColumn("ItemNumber").HeaderStyle.HorizontalAlign = HorizontalAlign.Left; |
| RadGrid1.MasterTableView.GetColumn("COURSE_ID").HeaderStyle.Width = Unit.Pixel(70); |
| RadGrid1.MasterTableView.GetColumn("COURSE_ID").HeaderStyle.HorizontalAlign = HorizontalAlign.Left; |
| RadGrid1.MasterTableView.GetColumn("COURSE_TITLE").HeaderStyle.Width = Unit.Pixel(130); |
| // |
| // many more column styles removed for simplicity...these all apply when ignorePaging is set to false |
| // |
| foreach (TableCell cell in headerItem.Cells) |
| { |
| cell.Style["text-align"] = "left"; |
| } |
| } |
| function AddOtherCSRClick() { |
| var rcbOther = $find("<%= rcbOtherCSRs.ClientID %>"); |
| var rlbOther = $find("<%= rlbOtherCSRs.ClientID %>"); |
| if (rcbOther.get_selectedIndex() > 0) { |
| var selected = rcbOther.get_selectedItem(); |
| var existingitem = rlbOther.findItemByValue(selected.get_value()); |
| if (!existingitem) { |
| var newitem = new Telerik.Web.UI.RadListBoxItem(); |
| newitem.set_value(selected.get_value()); |
| newitem.set_text(selected.get_text()); |
| rlbOther.trackChanges(); |
| rlbOther.get_items().add(newitem); |
| newitem.select(); |
| rlbOther.commitChanges(); |
| } |
| } |
| } |