This is a migrated thread and some comments may be shown as answers.

Datagrid Resize???

4 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sylvain Guay
Top achievements
Rank 1
Sylvain Guay asked on 08 Oct 2013, 03:17 PM
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>

4 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 11 Oct 2013, 10:44 AM
Hello Sylvain,

Could you please elaborate a bit more on  the exact issue you are facing with the presented code? Also please let me know what the result is in case the Ajax is disable don the page?

Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Sylvain Guay
Top achievements
Rank 1
answered on 12 Oct 2013, 12:17 AM
Hi, the problem is RadGrid will shrink itself, ignoring its Height=100% parameter, but you're right when i disable ajax, it's work... do you have an idea why? I put an image..

thank a lot for your interest

merci

Sylvain
0
Pavlina
Telerik team
answered on 16 Oct 2013, 03:26 PM
Hello,

The current CSS specification requires that a web page element with height set in percent must have a parent element with set height (either in percent or in pixels). This creates problems for example when a control with a set height of 100% is ajaxified. In this case the control is surrounded by an update panel with no height, which breaks the expected layout.

To avoid this behavior you can try setting the UpdatePanelHeight property to "100%" of the AjaxUpdatedControl tag in the RadAjaxManager's settings. This property provides the ability to set height explicitly for the update panel generated by the setting.

Regards,
Pavlina
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Sylvain Guay
Top achievements
Rank 1
answered on 17 Oct 2013, 02:03 PM
It's work fine...

Thanks for your support.

Best regards,

Sylvain
Tags
Grid
Asked by
Sylvain Guay
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Sylvain Guay
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or