Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
190 views
Hi,
I try to do as this example
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandsplitterresizing/defaultcs.aspx?product=grid

without success, do you have an idea why, i put my code and thank for your patience..

Sylvain 

codebehind
 
 protected void RadAjaxManagerAll_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
 
            switch (e.Argument.ToString())
            {
 
                case "ChangePageSize":
 
                    //Calculate the number of rows that fit in the RadPane.
 
                    //In this case 23 is the sum of the height of a single row and its upper border width.
 
                    //Depending on the paticular scenario this value may vary.
 
                    int rows = (Int32.Parse(this.RadPanelGrid.Height.Value.ToString()) - 60) / 23;
                    if (rows >= 1)
                    {
                        RadGridEDI.PageSize = rows;
 
                        // Check whether the CurrentPageIndex is correct.
 
                        if (Session["itemsCount"] != null)
                        {
                            int itemsCount = (int)Session["itemsCount"];
                            int pageCount = (int)Math.Ceiling(((double)itemsCount / rows));
                            if (RadGridEDI.MasterTableView.CurrentPageIndex > pageCount - 1)
                            {
 
                                RadGridEDI.MasterTableView.CurrentPageIndex = pageCount - 1;
 
                            }
                        }
 
                        RadGridEDI.Rebind();
                    }
 
                    break;
 
            }
 
        }
 
 
        protected void RadAjaxManagerAll_AjaxSettingCreated(object sender, AjaxSettingCreatedEventArgs e)
        {
            if (e.Initiator.ID == "RadGridEDI")
            {
                this.RadGrid1PanelClientID = e.UpdatePanel.ClientID;
            }
 
        }

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ManageEDI.index" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<%@ Register Assembly="Telerik.OpenAccess.Web.40" Namespace="Telerik.OpenAccess.Web" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%">
<head id="Head1" runat="server">
    <meta charset="utf-8" />
    <title>Manage EDI</title>
    <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>
<body style="margin: 0px; height: 100%; overflow: hidden;" scroll="no">
    <form id="form1" runat="server" style="height: 100%; margin: 0px">
 
 
        <script type="text/javascript">
 
            function ClientResized(sender, eventArgs) {
 
                $find("<%= RadAjaxManagerAll.ClientID %>").ajaxRequest('ChangePageSize');
 
            }
 
            function requestStart(sender, args) {
 
                if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0) {
 
                    args.set_enableAjax(false);
 
                }
            }
            function GridCreated() {
 
                var RadGrid1 = $find('<%=RadGridEDI.ClientID%>');
 
 
                var row = RadGrid1.get_masterTableView().get_selectedItems()[0];
 
                if (row) {
 
                    setTimeout(function () {
 
                        var rowElement = row.get_element();
 
                        var scrollArea = RadGrid1.GridDataDiv;
 
                        if ((rowElement.offsetTop - scrollArea.scrollTop) + rowElement.offsetHeight + 20 > scrollArea.offsetHeight) {
 
                            scrollArea.scrollTop = scrollArea.scrollTop + (rowElement.offsetTop - scrollArea.scrollTop) + (rowElement.offsetHeight - scrollArea.offsetHeight) + rowElement.offsetHeight;
 
                        }
 
                        else if ((rowElement.offsetTop - scrollArea.scrollTop) < 0) {
 
                            scrollArea.scrollTop = rowElement.offsetTop;
 
                        }
 
                    }, 200);
 
                }
 
            }
 
        </script>
 
        <telerik:RadScriptManager ID="RadScriptManagerAll" runat="server">
        </telerik:RadScriptManager>
 
 
 
        <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" />
 
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManagerAll" OnAjaxSettingCreated="RadAjaxManagerAll_AjaxSettingCreated" OnAjaxRequest="RadAjaxManagerAll_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="TimerFTP">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadListBoxEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadSearchBoxEDI">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridEDI"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxFileEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxNoCommandeAssocie" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadSearchBoxNoApl">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridEDI"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadListBoxEDI">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanelInfoEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxFileEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxFile204" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadListBoxDocumentAssocie">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxDocumentAssocie" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadButtonAccept">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxFileEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadButtonCancel">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxFileEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadButtonSend">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadListBoxEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxFileEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxNoCommandeAssocie" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanelInfoEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxFile204" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxIdEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadGridEDI">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxNoCommandeAssocie" LoadingPanelID="RadAjaxLoadingPanelBarre"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxFileEDI" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadButtonSend"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadListBoxDocumentAssocie" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadTextBoxDocumentAssocie" LoadingPanelID="RadAjaxLoadingPanelAll"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanelAll" Transparency="50">
        </telerik:RadAjaxLoadingPanel>
 
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanelBarre" Skin="" Transparency="50" HorizontalAlign="Center" BackgroundPosition="None">
            <div class="loading">
                <asp:Image ID="Image1" runat="server" ImageUrl="Images/loading.gif" AlternateText="loading" Transparency="50" ImageAlign="AbsMiddle"></asp:Image>
            </div>
        </telerik:RadAjaxLoadingPanel>
 
 
        <div style="height: 35px">
            <asp:Label ID="Label1" runat="server" Text="Transport Légaré & Fils   -EDI Module-" Style="margin-left: 30px; margin-top: 10px;" Font-Bold="True" Font-Size="Large" ForeColor="#003399"></asp:Label>
            <telerik:RadSearchBox ID="RadSearchBoxEDI" Style="margin-left: 30px; margin-top: 5px;" runat="server" OnSearch="RadSearchBoxEDI_Search" DataSourceID="OpenAccessLinqDataSourceSearchEDI" DataTextField="CommandeID" DataValueField="CommandeID" EmptyMessage="No. Commande" Filter="StartsWith" MaxResultCount="10"></telerik:RadSearchBox>
            <telerik:RadSearchBox ID="RadSearchBoxNoApl" Style="margin-left: 30px; margin-top: 5px;" runat="server" OnSearch="RadSearchBoxNoApl_Search" DataSourceID="OpenAccessLinqDataSourceSearchNoApl" DataTextField="NoApl" DataValueField="NoApl" EmptyMessage="No. APL" Filter="StartsWith" MaxResultCount="10"></telerik:RadSearchBox>
            <telerik:RadComboBox ID="RadComboBoxTypeRapport" Style="margin-left: 30px; margin-top: 5px;" runat="server" RenderMode="Lightweight">
                <Items>
                    <telerik:RadComboBoxItem runat="server" Text="30 derniers jours" Value="30derniersjours" />
                    <telerik:RadComboBoxItem runat="server" Text="Mois courant" Value="MoisCourant" />
                </Items>
            </telerik:RadComboBox>
            <telerik:RadButton ID="RadButtonExportExcel" Style="margin-left: 30px; margin-top: 5px;" runat="server" Text="Exportation en Excel" ButtonType="SkinnedButton" Width="200px" OnClick="RadButtonExportExcel_Click"></telerik:RadButton>
 
            <telerik:RadComboBox ID="RadComboBoxEDI" Style="margin-left: 1000px; margin-top: -45px; width: 225px;" runat="server" RenderMode="Lightweight" Visible="False">
            </telerik:RadComboBox>
            <span>
                <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />
            </span>
        </div>
 
 
        <telerik:RadSplitter ID="RadSplitterAll" Width="100%" Height="100%" runat="server" RenderMode="Lightweight">
            <telerik:RadPane ID="RadPanelLeft" runat="server" RenderMode="Lightweight">
                <telerik:RadSplitter ID="RadSplitterGrid" runat="server" Orientation="Horizontal" VisibleDuringInit="false" RenderMode="Lightweight">
                    <telerik:RadPane ID="RadPanelGrid" runat="server" Scrolling="None" Height="800px" OnClientResized="ClientResized">
 
                        <telerik:RadGrid ID="RadGridEDI" Style="border: 0; outline: none" runat="server" AllowPaging="True" AllowSorting="True" CellSpacing="0" GridLines="None" AutoGenerateColumns="False" DataSourceID="SqlDataSourceListEDI" OnPreRender="RadGridEDI_PreRender" OnDeleteCommand="RadGridEDI_DeleteCommand" OnUpdateCommand="RadGridEDI_UpdateCommand" OnItemDataBound="RadGridEDI_ItemDataBound" OnExcelMLExportRowCreated="RadGridEDI_ExcelMLExportRowCreated" OnExcelMLExportStylesCreated="RadGridEDI_ExcelMLExportStylesCreated" PageSize="40" Width="100%" Height="100%" OnSelectedIndexChanged="RadGridEDI_SelectedIndexChanged">
                            <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
 
                                <Pdf>
                                    <PageHeader>
                                        <LeftCell Text="" />
                                        <MiddleCell Text="" />
                                        <RightCell Text="" />
                                    </PageHeader>
                                    <PageFooter>
                                        <LeftCell Text="" />
                                        <MiddleCell Text="" />
                                        <RightCell Text="" />
                                    </PageFooter>
                                </Pdf>
 
                                <Excel Format="ExcelML" />
                            </ExportSettings>
 
                            <ClientSettings EnablePostBackOnRowClick="True">
                                <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />
                                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
 
                                <Resizing AllowColumnResize="True" AllowResizeToFit="True" />
 
                            </ClientSettings>
 
                            <MasterTableView AutoGenerateColumns="False" PageSize="20" DataSourceID="SqlDataSourceListEDI" CommandItemDisplay="Top" DataKeyNames="CommandeID" ShowFooter="True" TableLayout="Fixed">
                                <CommandItemSettings ShowAddNewRecordButton="False"></CommandItemSettings>
 
                                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                </RowIndicatorColumn>
 
                                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column" Created="True">
                                </ExpandCollapseColumn>
 
                                <EditFormSettings>
                                    <EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton" CancelImageUrl="Skins/Default/Grid/Cancel.gif"
                                        UpdateImageUrl="Skins/Default/Grid/Update.gif" InsertImageUrl="Skins/Default/Grid/Insert.gif">
                                    </EditColumn>
                                </EditFormSettings>
 
                                <Columns>
                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="Skins/Web20/Grid/Edit.gif">
                                        <ItemStyle HorizontalAlign="Center" Width="60px" />
                                        <HeaderStyle Width="60px" />
 
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridDropDownColumn UniqueName="Status" ListTextField="Description"
                                        ListValueField="Id" DataSourceID="OpenAccessLinqDataSourceSysStatusCommand" HeaderText="Status"
                                        DataField="Status" DropDownControlType="RadComboBox" AllowSorting="true" HeaderStyle-Width="180px" ItemStyle-Width="180px">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
 
                                        <HeaderStyle Width="180px" />
                                        <ItemStyle Width="180px" />
                                    </telerik:GridDropDownColumn>
                                    <telerik:GridBoundColumn DataField="CommandeID" DataType="System.Int32" FilterControlAltText="Filter CommandeID column" HeaderText="Commande" ReadOnly="True" SortExpression="CommandeID" UniqueName="CommandeID" MaxLength="10">
 
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
 
                                        <HeaderStyle Width="80px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="FactureID" DataType="System.Int32" FilterControlAltText="Filter FactureID column" HeaderText="Facture" SortExpression="FactureID" UniqueName="FactureID" MaxLength="10" ReadOnly="True">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="80px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="NoApl" DataType="System.String" FilterControlAltText="Filter NoApl column" HeaderText="NoApl" SortExpression="NoApl" UniqueName="NoApl">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridDateTimeColumn DataField="DatePrevuePickUp" FilterControlAltText="Filter DatePrévuePickUp column" HeaderText="DatePrevuePickUp" SortExpression="DatePrevuePickUp" UniqueName="DatePrevuePickUp">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="110px" />
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridDateTimeColumn DataField="HeurePrevuePickUp" FilterControlAltText="Filter HeurePrevuePickUp column" HeaderText="HeurePrevuePickUp" SortExpression="HeurePrevuePickUp" UniqueName="HeurePrevuePickUp" PickerType="TimePicker">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="110px" />
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridDateTimeColumn DataField="DateReelPickUp" FilterControlAltText="Filter DateReelPickUp column" HeaderText="DateReelPickUp" SortExpression="DateReelPickUp" UniqueName="DateReelPickUp">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="110px" />
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridDateTimeColumn DataField="HeureReelPickUp" FilterControlAltText="Filter HeureReelPickUp column" HeaderText="HeureReelPickUp" SortExpression="HeureReelPickUp" UniqueName="HeureReelPickUp" PickerType="TimePicker">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="110px" />
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridBoundColumn DataField="ShipperInfo" FilterControlAltText="Filter ShipperInfo column" HeaderText="ShipperInfo" ReadOnly="True" SortExpression="ShipperInfo" UniqueName="ShipperInfo" DataFormatString='<nobr>{0}</nobr>'>
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ConsigneeInfo" FilterControlAltText="Filter ConsigneeInfo column" HeaderText="ConsigneeInfo" ReadOnly="True" SortExpression="ConsigneeInfo" UniqueName="ConsigneeInfo" DataFormatString='<nobr>{0}</nobr>'>
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridDateTimeColumn DataField="DatePrevueDelivery" FilterControlAltText="Filter DatePrevueDelivery column" HeaderText="DatePrevueDelivery" SortExpression="DatePrevueDelivery" UniqueName="DatePrevueDelivery">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="110px" />
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridDateTimeColumn DataField="HeurePrevueDelivery" FilterControlAltText="Filter HeurePrevueDelivery column" HeaderText="HeurePrevueDelivery" SortExpression="HeurePrevueDelivery" UniqueName="HeurePrevueDelivery" PickerType="TimePicker">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="110px" />
                                    </telerik:GridDateTimeColumn>
 
                                    <telerik:GridDateTimeColumn DataField="DateReelDelivery" FilterControlAltText="Filter DateReelDelivery column" HeaderText="DateReelDelivery" SortExpression="DateReelDelivery" UniqueName="DateReelDelivery">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="110px" />
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridDateTimeColumn DataField="HeureReelDelivery" FilterControlAltText="Filter HeureReelDelivery column" HeaderText="HeureReelDelivery" SortExpression="HeureReelDelivery" UniqueName="HeureReelDelivery" PickerType="TimePicker">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="110px" />
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridBoundColumn DataField="Palette" FilterControlAltText="Filter Palette column" HeaderText="Palette" SortExpression="Palette" UniqueName="Palette">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="80px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridDateTimeColumn DataField="ETA" FilterControlAltText="Filter ETA column" HeaderText="Date ETA" SortExpression="ETA" UniqueName="ETA">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="110px" />
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridBoundColumn DataField="Carrier" FilterControlAltText="Filter Carrier column" HeaderText="Carrier" ReadOnly="True" SortExpression="Carrier" UniqueName="Carrier" DataFormatString='<nobr>{0}</nobr>'>
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                        <HeaderStyle Width="100px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Note" DataType="System.String" FilterControlAltText="Filter Note column" HeaderText="Note" SortExpression="Note" UniqueName="Note" DataFormatString='<nobr>{0}</nobr>'>
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
                                        ButtonType="ImageButton" ImageUrl="Skins/Web20/Grid/Delete.gif" HeaderStyle-Width="20px">
                                        <HeaderStyle Width="20px" />
                                    </telerik:GridButtonColumn>
 
                                </Columns>
 
                                <BatchEditingSettings EditType="Cell"></BatchEditingSettings>
 
                                <PagerStyle PageSizeControlType="RadComboBox" Position="TopAndBottom"></PagerStyle>
 
                            </MasterTableView>
 
                            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
 
                        </telerik:RadGrid>
 
                    </telerik:RadPane>
                    <telerik:RadSplitBar ID="RadSplitBarHorizontal" runat="server">
                    </telerik:RadSplitBar>
 
 
                    <telerik:RadPane ID="listBoxPane" runat="server" CssClass="TextStyle" BackColor="#d9eeff" ForeColor="Black">
                        <table>
                            <tr style="background-color: #3E4E85; line-height: 20px;">
                                <td style="width: 125px; font-weight: bold; text-align: center; color: #fff;">Liste des EDI à traiter
                                </td>
                                <td style="width: 520px; font-weight: bold; text-align: center; color: #fff;">Information sur le EDI à traiter
                                </td>
                                <td style="font-weight: bold; text-align: center; color: #fff">Fichier 990 à traiter
                                </td>
 
                            </tr>
                            <tr>
                                <td style="width: 125px;">
                                    <telerik:RadListBox ID="RadListBoxEDI" runat="server" Height="160px" Width="125px" OnSelectedIndexChanged="RadListBoxEDI_SelectedIndexChanged" AutoPostBack="True">
                                    </telerik:RadListBox>
                                </td>
                                <td style="width: 520px; background-color: #FFFFFF;">
                                    <telerik:RadAjaxPanel ID="RadAjaxPanelInfoEDI" runat="server" Height="200px" Width="520px">
                                        <table>
                                            <tr>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxIdEDI" runat="server" Label="APL No." LabelWidth="80px" Width="200px" Style="margin-top: 5px" ReadOnly="True"></telerik:RadTextBox></td>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextPO" runat="server" Label="PO:" LabelWidth="30px" Width="255px" ReadOnly="True" Style="margin-top: 5px"></telerik:RadTextBox></td>
                                            </tr>
                                            <tr>
                                                <td style="font-weight: bold; text-align: center;"> </td>
                                                <td style="font-weight: bold; text-align: center;"> </td>
 
                                            </tr>
                                            <tr>
                                                <td style="font-weight: bold; text-align: center;">Expéditeur</td>
                                                <td style="font-weight: bold; text-align: center;">Consignataire</td>
 
                                            </tr>
 
                                            <tr>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxDateSM1" runat="server" Label="Date:" LabelWidth="80px" Width="200px" ReadOnly="True"></telerik:RadTextBox></td>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxDateSM2" runat="server" Label="Date:" LabelWidth="80px" Width="200px" ReadOnly="True"></telerik:RadTextBox></td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxHeureSM1" runat="server" Label="Heure:" LabelWidth="80px" Width="200px" ReadOnly="True"></telerik:RadTextBox></td>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxHeureSM2" runat="server" Label="Heure:" LabelWidth="80px" Width="200px" ReadOnly="True"></telerik:RadTextBox></td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxExpediteurSM1" runat="server" Label="Expéditeur:" LabelWidth="80px" Width="250px" ReadOnly="True" Font-Size="X-Small"></telerik:RadTextBox></td>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxConsignataireSM2" runat="server" Label="Consignataire:" LabelWidth="80px" Width="250px" ReadOnly="True" Font-Size="X-Small"></telerik:RadTextBox></td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxAdresseSM1" runat="server" Label="Adresse:" LabelWidth="80px" Width="250px" ReadOnly="True" Font-Size="X-Small"></telerik:RadTextBox></td>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxAdresseSM2" runat="server" Label="Adresse:" LabelWidth="80px" Width="250px" ReadOnly="True" Font-Size="X-Small"></telerik:RadTextBox></td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxAdresseSM1_2" runat="server" Label="" LabelWidth="80px" Width="250px" ReadOnly="True" Font-Size="X-Small"></telerik:RadTextBox></td>
                                                <td>
                                                    <telerik:RadTextBox ID="RadTextBoxAdresseSM2_2" runat="server" Label="" LabelWidth="80px" Width="250px" ReadOnly="True" Font-Size="X-Small"></telerik:RadTextBox></td>
                                            </tr>
 
 
                                        </table>
                                    </telerik:RadAjaxPanel>
                                </td>
                                <td>
                                    <table>
                                        <tr>
                                            <td style="border-style: none; width: 10px;"></td>
                                            <td style="border-style: none; width: 150px;">No. Commande
                                            </td>
                                            <td style="border-style: none;">
                                                <telerik:RadTextBox ID="RadTextBoxNoCommandeAssocie" runat="server" Enabled="False"></telerik:RadTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="border-style: none; width: 10px;"></td>
                                            <td style="border-style: none; width: 150px;">
                                                <telerik:RadButton ID="RadButtonAccept" runat="server" Text="Accepter" OnClick="RadButtonAccept_Click" Width="140px"></telerik:RadButton>
                                                <telerik:RadButton ID="RadButtonCancel" runat="server" Text="Annuler" Width="140px" OnClick="RadButtonCancel_Click"></telerik:RadButton>
                                                <telerik:RadButton ID="RadButtonSend" runat="server" Text="Envoyer" Enabled="False" Width="140px" OnClick="RadButtonSend_Click"></telerik:RadButton>
                                            </td>
                                            <td style="border-style: none;">
                                                <telerik:RadTextBox ID="RadTextBoxFileEDI" runat="server" Rows="3" TextMode="MultiLine" Text="SYSaapllegarefils      X005010      990   PJ3S                                                     24581612        GF_ENTETE        LEGA1197152-1                     XXXXXXXX      0558-A                                              GF_REFERENCE           0128-CN 54632                                                                       " Columns="108" LabelWidth="0px" Font-Names="Courier New" Font-Size="10pt" ReadOnly="True">
                                                    <EmptyMessageStyle Resize="None" />
                                                    <ReadOnlyStyle Font-Names="Courier New" Font-Size="10pt" Resize="None" />
                                                    <FocusedStyle Font-Names="Courier New" Font-Size="10pt" Resize="None" />
                                                    <DisabledStyle Font-Names="Courier New" Font-Size="10pt" Resize="None" />
                                                    <InvalidStyle Resize="None" Font-Names="Courier New" Font-Size="10pt" />
                                                    <HoveredStyle Font-Names="Courier New" Font-Size="10pt" Resize="None" />
                                                    <EnabledStyle Font-Names="Courier New" Font-Size="10pt" Resize="None" />
                                                </telerik:RadTextBox>
                                            </td>
                                        </tr>
                                    </table>
 
 
                                </td>
                            </tr>
                        </table>
                    </telerik:RadPane>
                </telerik:RadSplitter>
            </telerik:RadPane>
 
            <telerik:RadSplitBar ID="RadSplitBarVertical" runat="server">
            </telerik:RadSplitBar>
 
            <telerik:RadPane ID="RadPanelRight" runat="server" Width="22" RenderMode="Lightweight">
                <telerik:RadSlidingZone ID="RadSlidingZoneDocument" runat="server" Width="22" SlideDirection="Left" ClickToOpen="true">
 
                    <telerik:RadSlidingPane ID="RadSlidingPane1DocumentAttache" Title="Documents attachés" runat="server" Width="750"
                        MinWidth="750">
                        <telerik:RadListBox ID="RadListBoxDocumentAssocie" runat="server" Height="150px" Width="700px" AutoPostBack="True" OnSelectedIndexChanged="RadListBoxDocumentAssocie_SelectedIndexChanged">
                        </telerik:RadListBox>
                        <telerik:RadTextBox ID="RadTextBoxDocumentAssocie" runat="server" TextMode="MultiLine" Rows="60" Text="" Columns="185" LabelWidth="0px" Font-Names="Courier New" Font-Size="9pt" ReadOnly="True">
                            <EmptyMessageStyle Resize="None" />
                            <ReadOnlyStyle Font-Names="Courier New" Font-Size="9pt" Resize="None" />
                            <FocusedStyle Font-Names="Courier New" Font-Size="9pt" Resize="None" />
                            <DisabledStyle Font-Names="Courier New" Font-Size="9pt" Resize="None" />
                            <InvalidStyle Resize="None" Font-Names="Courier New" Font-Size="9pt" />
                            <HoveredStyle Font-Names="Courier New" Font-Size="9pt" Resize="None" />
                            <EnabledStyle Font-Names="Courier New" Font-Size="9pt" Resize="None" />
                        </telerik:RadTextBox>
                    </telerik:RadSlidingPane>
 
                    <telerik:RadSlidingPane ID="RadSlidingPaneFile204" Title="Fichier 204" runat="server" Width="750"
                        MinWidth="750">
                        <telerik:RadTextBox ID="RadTextBoxFile204" runat="server" TextMode="MultiLine" Rows="60" Text="" Columns="185" LabelWidth="0px" Font-Names="Courier New" Font-Size="9pt" ReadOnly="True">
                            <EmptyMessageStyle Resize="None" />
                            <ReadOnlyStyle Font-Names="Courier New" Font-Size="9pt" Resize="None" />
                            <FocusedStyle Font-Names="Courier New" Font-Size="9pt" Resize="None" />
                            <DisabledStyle Font-Names="Courier New" Font-Size="9pt" Resize="None" />
                            <InvalidStyle Resize="None" Font-Names="Courier New" Font-Size="9pt" />
                            <HoveredStyle Font-Names="Courier New" Font-Size="9pt" Resize="None" />
                            <EnabledStyle Font-Names="Courier New" Font-Size="9pt" Resize="None" />
                        </telerik:RadTextBox>
                    </telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </telerik:RadPane>
        </telerik:RadSplitter>
        <asp:Timer ID="TimerFTP" runat="server" OnTick="TimerFTP_Tick" Interval="60000">
        </asp:Timer>
 
        <asp:SqlDataSource ID="SqlDataSourceListEDI" runat="server" ConnectionString="<%$ ConnectionStrings:LConnectionHome%>" SelectCommand="ListEDI" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
 
        <telerik:OpenAccessLinqDataSource ID="OpenAccessLinqDataSourceSysStatusCommand" runat="server" ContextTypeName="ManageEDIModel.EntitiesModelL" EntityTypeName="" OrderBy="Ordre" ResourceSetName="SysStatusCommands" Where="Langue == @Langue">
            <WhereParameters>
                <asp:Parameter DefaultValue="en" Name="Langue" Type="String" />
            </WhereParameters>
        </telerik:OpenAccessLinqDataSource>
        <telerik:OpenAccessLinqDataSource ID="OpenAccessLinqDataSourceSearchEDI" runat="server" ContextTypeName="ManageEDIModel.EntitiesModelL" EntityTypeName="" OrderBy="CommandeID" ResourceSetName="tblEDIs" Select="new (CommandeID)" />
        <telerik:OpenAccessLinqDataSource ID="OpenAccessLinqDataSourceSearchNoApl" runat="server" ContextTypeName="ManageEDIModel.EntitiesModelL" EntityTypeName="" OrderBy="NoApl" ResourceSetName="tblEDIs" Select="new (NoApl)" />
 
 
    </form>
</body>
</html>
Sylvain Guay
Top achievements
Rank 1
 answered on 17 Oct 2013
1 answer
98 views
Is there a way to set the OnClientCheckFinished method in the client?

I want to reuse the same javascript and single radspell control if I can.

I have 3 buttons.

Each button can go through the same code to run the spellcheck (the same control is being checked each time), but after completing I want them to do different things.

Is this possible or will I need to duplicate my code?

Thanks

Cheryl
Marin Bratanov
Telerik team
 answered on 17 Oct 2013
6 answers
469 views
Hi,

How to show 5 rows in the grid by default?

Thanks
Kostadin
Telerik team
 answered on 17 Oct 2013
2 answers
159 views
Telerik AsyncUpload still cannot directly upload to Amazon S3?

Doubtful this a connectivity issue, as Rad File Explorer can hook up to S3.
Is it limitations related to multiple file handling?

Any speculation on a timeframe for S3 support?

Anyone know any controls that can do drag and drop multi file uploads to S3?

Amazon S3 announces Cross-Origin Resource Sharing (CORS) support
http://aws.amazon.com/about-aws/whats-new/2012/08/31/amazon-s3-announces-cross-origin-resource-sharing-CORS-support/
Peter Filipov
Telerik team
 answered on 17 Oct 2013
3 answers
171 views
Hi,

After establishing Office2010Silver as the default theme for telerik components in the web.config
<add key="Telerik.Skin" value="Office2010Silver" />

The titlebar has disappeared on my radwindows
I have tried to force it by setting VisibleTitlebar="true" but it has no effect.
How can i solve this problem?

Thank you,
Sonia.
Sonia
Top achievements
Rank 1
 answered on 17 Oct 2013
3 answers
806 views
hey everyone

I have a RadComboBox in which i want items to sort in ascending order.this is my combobox--
<telerik:RadComboBox ID="cmbName" runat="server" Skin="Hay" DataSourceID="SqlDataSource1"
                                Height="60px" Width="204px" DataTextField="CustomerName" MarkFirstMatch="true"
                                DataValueField="CustomerId" AllowCustomText="true" EmptyMessage="Please select a Name"
                                OnSelectedIndexChanged="cmbName_SelectedIndexChanged" AutoPostBack="true" ToolTip="Select your Name"
                                CausesValidation="false" Sort="Ascending" SortCaseSensitive="true">
                            </telerik:RadComboBox>
But its not working,items does'nt get sorted.It comes as it is in data base table.Does this need something to be written in codebehind too?...

Thanks
Amit
Shinu
Top achievements
Rank 2
 answered on 17 Oct 2013
1 answer
85 views
Hi,
I want to hide the dropdown option of page size. How can this be done? Can it be done only from code behind?

Thanks,
Joslyn.
Princy
Top achievements
Rank 2
 answered on 17 Oct 2013
6 answers
443 views
Hi,

I have not found a method for capturing when a selected node changes as the OnSelectedNodeChanged provided by asp:TreeView.
Do you know how to capture this event?
Thank you,
Sonia.
Shinu
Top achievements
Rank 2
 answered on 17 Oct 2013
1 answer
105 views
Hi,

I  have an autogenerated grid with edit mode as InPlace. I want to set the width of the textbox in editmode. How to do this as i don't have any unique name since its autogenerated

Thanks,
Alyssa.
Princy
Top achievements
Rank 2
 answered on 17 Oct 2013
4 answers
114 views
I've been trying to figure out how to delete a radgrid, but it seems the best solution is to set its visibility to false and work off of that.

So i tried that, and now lets say i have 4 grids:

Grid1
Grid2
Grid3
Grid4

And i delete Grid3, and now i am left with:

Grid1
Grid2
Grid4

And i have a button that you can click on, that shows all the grids and the data in the grid, if i don't delete any grids it works fine, but if i delete one of the grids, i get the following error when i click to PreviewAll grids.

Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

Below is the code i am using to "Delete the grid" which is just setting the visibility to false:

public void DeleteGrid(object sender, EventArgs e, PlaceHolder ph)
   {
       LinkButton gridLink = (LinkButton)sender;
       String gridNum = gridLink.ID.ToString().Split('-').Last();
 
       System.Web.UI.Page currentPage;
       currentPage = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;
 
       RadGrid grid = (RadGrid)currentPage.FindControl("RadGrid" + gridNum);
       Label lbl = (Label)currentPage.FindControl("Break-" + gridNum);
       LinkButton lbd = (LinkButton)currentPage.FindControl("Delete-Grid-" + gridNum);
       LinkButton lb = (LinkButton)currentPage.FindControl("Show-Grid-" + gridNum);
 
       grid.Visible = false;
       lbl.Visible = false;
       lbd.Visible = false;
       lb.Visible = false;
 
       HttpContext.Current.Session.Add(gridNum, null);
 
   }


PreviewAll grids method, which runs and shows all the grids

public void PreviewAll(PlaceHolder ph)
{
 
    ph.Controls.Clear();
 
 
    for (int i = 1; i <= Convert.ToInt32(GetSession()); i++)
    {
        if (HttpContext.Current.Session[i.ToString()] == null)
        {
 
            HttpContext.Current.Response.Write("Session " + i.ToString() + " is null");
        }
        else
        {
            LinkButton btn = new LinkButton();
            btn.ID = "Modal-" + i.ToString();
            btn.Text = "Show Room " + i.ToString();
            btn.Click += (sender, e) => ShowPopUp(sender, e, i, ph);
 
            DataTable table = (DataTable)HttpContext.Current.Session[i]; // Get the data table.
            Label lbl = new Label();
            lbl.ID = "Room-" + i.ToString();
            lbl.Text = "Room " + i.ToString();
 
            Label lblBreak = new Label();
            lblBreak.ID = "Label-Break" + i.ToString();
            lblBreak.Text = "<br/>";
 
 
 
            ph.Controls.Add(lbl);
            ph.Controls.Add(lblBreak);
            ph.Controls.Add(btn);
            ph.Controls.Add(lblBreak);
 
            foreach (DataRow row in table.Rows) // Loop over the rows.
            {
                foreach (var item in row.ItemArray) // Loop over the items.
                {
                    Label lblValue = new Label();
                    lblValue.ID = "Label-Value-" + item.ToString();
                    lblValue.Text = item.ToString();
 
                    Label lblBreak2 = new Label();
                    lblBreak2.ID = "Label-Break" + i.ToString();
                    lblBreak2.Text = "<br/>";
 
                    ph.Controls.Add(lblValue);
                    ph.Controls.Add(lblBreak2);
                }
            }
            
        }
    }
}

Any help is very much appreciated.
Angel Petrov
Telerik team
 answered on 17 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?