| <telerik:RadGrid ID="rgCT" runat="server" Width="345" OnNeedDataSource="rgCT_NeedDataSource" |
| AutoGenerateColumns="false" EnableAjaxSkinRendering="true" AllowMultiRowSelection="true"> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <SelectedItemStyle BackColor="Gray" ForeColor="White" /> |
| <EditItemStyle BackColor="#F7BD02" ForeColor="Black" /> |
| <MasterTableView TableLayout="Fixed" CommandItemDisplay="None" DataKeyNames="CT_ID"> |
| <Columns> |
| <telerik:GridTemplateColumn UniqueName="Selection" HeaderStyle-Width="10%"> |
| <ItemTemplate> |
| <asp:CheckBox ID="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" |
| runat="server"></asp:CheckBox> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn UniqueName="CT_ID" DataField="CT_ID" Visible="false" /> |
| <telerik:GridBoundColumn UniqueName="CT_NAME" DataField="CT_NAME" HeaderText="CT" HeaderStyle-Width="89%"/> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings> |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" |
| ScrollHeight="200px" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| protected void ToggleRowSelection(object sender, EventArgs e) |
| { |
| ((sender as CheckBox).Parent.Parent as GridItem).Selected = (sender as CheckBox).Checked; |
| } |
| If TypeOf e.Item Is GridFilteringItem Then |
| Dim filteringItem As GridFilteringItem = CType(e.Item, GridFilteringItem) |
| 'set dimensions for the filter textbox |
| Dim box As TextBox = CType(filteringItem("CheckBoxTemplateColumn").Controls(0), TextBox) |
| box.Visible = False |
| protected virtual IEnumerable<ScriptDescriptor> GetScriptDescriptors() |
| { |
| ScriptControlDescriptor descriptor = new ScriptControlDescriptor("Unigestion.Web.UI.HTMLGrid", this.ClientID); |
| descriptor.AddProperty("gridClientID", this._radGrid.ClientID); |
| descriptor.AddProperty("ajaxManagerClientID", this._radAjaxManager.ClientID); |
| return new ScriptDescriptor[] { descriptor }; |
| } |
| Unigestion.Web.UI.HTMLGrid.prototype = { |
| initialize: function() { |
| this.$grid = $find(this.gridClientID); |
| this.$ajax = $find(this.ajaxManagerClientID); |
| } |
| } |
| <script type="text/javascript"> |
| //<![CDATA[ |
| Sys.Application.initialize(); |
| Sys.Application.add_init(function() { |
| $create(Unigestion.Web.UI.HTMLGrid, {"ajaxManagerClientID":"AjaxManager","gridClientID":"innergrid"}, null, null, $get("radGrid")); |
| }); |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadAjaxManager, {"_updatePanels":"","ajaxSettings":[{InitControlID : "AjaxManager",UpdatedControls : [{ControlID:"innergrid",PanelID:""}]},{InitControlID : "AjaxManager",UpdatedControls : [{ControlID:"gridmenu",PanelID:""}]},{InitControlID : "innergrid",UpdatedControls : [{ControlID:"innergrid",PanelID:""}]}],"clientEvents":{OnRequestStart:"OnRequestStart",OnResponseEnd:"OnResponseEnd"},"defaultLoadingPanelID":"","enableAJAX":true,"enableHistory":false,"links":[],"styles":[],"uniqueID":"AjaxManager","updatePanelsRenderMode":0}, null, null, $get("AjaxManager")); |
| }); |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadGrid, {"ClientID":"innergrid","ClientSettings":{"AllowAutoScrollOnDragDrop":true,"AllowColumnsReorder":true,"ColumnsReorderMethod":1,"ShouldCreateRows":true,"ReorderColumnsOnClient":true,"DataBinding":{},"KeyMappings":{"ExitEditInsertModeKey":27,"UpdateInsertItemKey":13},"Selecting":{"AllowRowSelect":true,"EnableDragToSelectRows":true},"Scrolling":{"AllowScroll":true,"SaveScrollPosition":true,"ScrollHeight":"300px","UseStaticHeaders":true},"Resizing":{"AllowColumnResize":true,"ClipCellContentOnResize":true,"EnableRealTimeResize":true,"ResizeGridOnColumnResize":true},"ClientMessages":{"PagerTooltipFormatString":"Page \u003cstrong\u003e{0}\u003c/strong\u003e of \u003cstrong\u003e{1}\u003c/strong\u003e"},"KeyboardNavigationSettings":{"AllowActiveRowCycle":false,"FocusKey":89}},"Skin":"Unigestion","UniqueID":"innergrid","_activeRowIndex":"","_controlToFocus":"","_currentPageIndex":0,"_editIndexes":"[]","_embeddedSkin":false,"_gridTableViewsData":"[{\"ClientID\":\"innergrid_ctl00\",\"UniqueID\":\"innergrid$ctl00\",\"PageSize\":10,\"PageCount\":1,\"EditMode\":\"EditForms\",\"CurrentPageIndex\":0,\"VirtualItemCount\":0,\"AllowMultiColumnSorting\":false,\"IsItemInserted\":false,\"clientDataKeyNames\":[],\"_dataBindTemplates\":false,\"_selectedItemStyle\":\"\",\"_selectedItemStyleClass\":\"rgSelectedRow\",\"_columnsData\":[{\"UniqueName\":\"515156\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"FilteringColumn\",\"DataFormatString\":\"{0:#,##0.00}\",\"Display\":true},{\"UniqueName\":\"515154\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"FilteringColumn\",\"DataFormatString\":\"{0:#,##0.00}\",\"Display\":true},{\"UniqueName\":\"515153\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"FilteringColumn\",\"DataFormatString\":\"{0:#,##0.00}\",\"Display\":true}]}]","_groupingSettings":{"GroupContinuesFormatString":" Group continues on the next page.","GroupContinuedFormatString":"... group continued from the previous page. ","GroupSplitDisplayFormat":"Showing {0} of {1} items.","GroupSplitFormat":" ({0})","GroupByFieldsSeparator":"; ","CaseSensitive":false,"ExpandTooltip":"Expand group","CollapseTooltip":"Collapse group","UnGroupTooltip":"Drag out of the bar to ungroup","UnGroupButtonTooltip":"Click here to ungroup","ShowUnGroupButton":false,"ViewState":{}},"_masterClientID":"innergrid_ctl00","allowMultiRowSelection":true,"clientStateFieldID":"innergrid_ClientState"}, {"columnSwapped":OnColumnSwapped,"groupCollapsed":OnGroupCollapsed,"groupExpanded":OnGroupExpanded,"rowContextMenu":OnRowContextMenu}, null, $get("innergrid")); |
| }); |
| //]]> |
| </script> |
What is the best way to ensure that there is no default selection in my combo box? I can clear it client side with:
| var combo = $find("<%= RadComboBox1.ClientID %>"); |
| combo.clearSelection(); |
I just downloaded the Q1 2009. I uninstalled my eval and installed the Q1 2009. I moved the appropriate DLLs to my project and referenced them. My website runs fine but the design view is having problems finding RadComboboxes, RadSliders, RadGrids and RadDatePickers. The RadTextboxes render fine. I made sure to reference the new Telerik.Web.Design but to no avail. I thought maybe there was some disconnect because of the split of design.dll (and still do) so I drag and dropped a control to see if this would right the wrong but the dropped control also had the error creating control.
The error reads: "Could not load file or assembly 'Telerik.Web.UI, Version=2009.1.311.35, Culture=...' or one of its dependencies..." Which tells me that it's looking in the wrong DLL it should be looking in Telerik.Web.Design. I don't know how to tell it where to look though. Are the RadTextBoxes still rendered (Design) from the Telerik.Web.UI?
Thanks,
Doug