or
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListBoxErrorTesting2.aspx.cs" Inherits="Testing.ListBoxErrorTesting2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> <telerik:RadListBox ID="SourceListBox" runat="server" AllowTransfer="true" TransferMode="Move" TransferToID="DestinationListBox" /> <telerik:RadListBox ID="DestinationListBox" runat="server" /> <br /> <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" /> <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1"> <telerik:RadFilter runat="server" ID="ReportFilter"> <FieldEditors> <telerik:RadFilterTextFieldEditor FieldName="Title" DisplayName="Title" /> </FieldEditors> </telerik:RadFilter> </telerik:RadAjaxPanel> </div> </form></body></html>using System;namespace Testing{ public partial class ListBoxErrorTesting2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) return; var data = new[] { "Item1", "Item2", "Item3", "Item4", "Item5" }; DestinationListBox.DataSource = data; DestinationListBox.DataBind(); } }}System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at System.Web.UI.StateManagedCollection.System.Collections.IList.get_Item(Int32 index) at Telerik.Web.UI.ControlItemCollection.get_Item(Int32 index) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\Common\Navigation\ControlItemCollection.cs:line 30 at Telerik.Web.UI.ClientStateLogPlayer`1.Remove(ControlItemCollection items, Int32 index) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\Common\Navigation\ClientStateLogPlayer.cs:line 142 at Telerik.Web.UI.ClientStateLogPlayer`1.Play(ClientStateLogEntry entry) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\Common\Navigation\ClientStateLogPlayer.cs:line 62 at Telerik.Web.UI.ClientStateLogPlayer`1.Play(IEnumerable`1 clientStateLogEntry) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\Common\Navigation\ClientStateLogPlayer.cs:line 27 at Telerik.Web.UI.RadListBox.LoadLogEntries(RadListBoxClientState clientState) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\ListBox\RadListBox.cs:line 906 at Telerik.Web.UI.RadListBox.LoadClientState(RadListBoxClientState clientState) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\ListBox\RadListBox.cs:line 892 at Telerik.Web.UI.RadListBox.LoadPostData(String postDataKey, NameValueCollection postCollection) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\ListBox\RadListBox.cs:line 800 at Telerik.Web.UI.RadDataBoundControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\Common\RadDataBoundControl.cs:line 653 at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.main_testing_listboxerrortesting2_aspx.ProcessRequest(HttpContext context) in c:\Users\trasmussen\AppData\Local\Temp\Temporary ASP.NET Files\root\e99f54ff\b41660f1\App_Web_listboxerrortesting2.aspx.dc92d279.2k6ikk-w.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="100%"AllowCollapseAllItems="true" CollapseAnimation-Type="Linear"ExpandAnimation-Type="Linear" Skin="WebBlue" BorderStyle="None" BorderWidth="0px"> <Items> <telerik:RadPanelItem Text="Welcome, John Doe" runat="server" Expanded="true"> <Items> <telerik:RadPanelItem> <ItemTemplate> <telerik:RadMenu ID="Menu1" runat="server" CssClass="RadMenu_MetroTouch" Skin="MetroTouch" EnableRoundedCorners="true" Width="100%" Font-Names="Calibri"> </telerik:RadMenu> </ItemTemplate> </telerik:RadPanelItem> </Items> </telerik:RadPanelItem> </Items></telerik:RadPanelBar>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"><script type="text/javascript"> function pageLoad() { var grid = $find("<%= RadGrid1.ClientID %>"); var columns = grid.get_masterTableView().get_columns(); for (var i = 0; i < columns.length; i++) { columns[i].resizeToFit(); } } </script></telerik:RadCodeBlock>
Now the grid (Mastertable) is resize to fit, but the detailtables not.
What can i do to use resizeToFit() on the detailtables?
Sorry because of my english ;)