Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
109 views
This is my rad grid:

<telerik:RadGrid ID="rgrdUsers" runat="server" AllowAutomaticDeletes="True" AllowPaging="True"
  AllowSorting="True" DataSourceID="sdsUsers" GridLines="None" HorizontalAlign="Center"
  ShowStatusBar="True" OnItemCommand="rgrdUsers_ItemCommand"
  OnItemDataBound="rgrdUsers_ItemDataBound"
  Width="938px" AutoGenerateColumns="False" OnNeedDataSource="rgrdUsers_NeedDataSource"
  OnInsertCommand="rgrdUsers_InsertCommand" OnUpdateCommand="rgrdUsers_UpdateCommand">
  <PagerStyle Position="TopAndBottom" />
  <MasterTableView CommandItemDisplay="Top" DataKeyNames="PKUser" DataSourceID="sdsUsers"
    EditMode="EditForms" Width="100%">
    <Columns>
      <telerik:GridEditCommandColumn ButtonType="ImageButton">
        <ItemStyle HorizontalAlign="Center" />
      </telerik:GridEditCommandColumn>
      <telerik:GridBoundColumn DataField="PKUser" HeaderText="User ID" ReadOnly="True"
        SortExpression="PKUser" UniqueName="PKUser" Visible="False">
      </telerik:GridBoundColumn>
      <telerik:GridTemplateColumn DataField="usrName" EditFormColumnIndex="0"
      HeaderText="<%$ Resources:Localization, usrName %>"
      SortExpression="usrName" UniqueName="usrName">
        <ItemTemplate>
          <%#DataBinder.Eval(Container.DataItem,"usrName")%>
        </ItemTemplate>
        <EditItemTemplate>
          <asp:TextBox ID="txtUsrName" runat="server" Text='<%#Bind("usrName") %>' />
          <asp:FilteredTextBoxExtender ID="ftxtUsrName" runat="server"
          FilterType="Custom, LowercaseLetters, UppercaseLetters"
          TargetControlID="txtUsrName" ValidChars=" áéíóúñÁÉÍÓÚÑ" />
        </EditItemTemplate>
        <HeaderStyle Width="150px" HorizontalAlign="Center" />
        <ItemStyle Width="150px" HorizontalAlign="Left" />
      </telerik:GridTemplateColumn>
      <telerik:GridTemplateColumn DataField="usrAccount" EditFormColumnIndex="0"
      HeaderText="<%$ Resources:Localization, usrAccount %>"
        SortExpression="usrAccount" UniqueName="usrAccount">
        <ItemTemplate>
          <%#DataBinder.Eval(Container.DataItem,"usrAccount")%>
        </ItemTemplate>
        <EditItemTemplate>
          <asp:TextBox ID="txtUsrAccount" runat="server" Text='<%#Bind("usrAccount") %>' />
          <asp:FilteredTextBoxExtender ID="ftxtUsrAccount" runat="server"
          FilterType="Custom, LowercaseLetters, UppercaseLetters, Numbers"
          TargetControlID="txtUsrAccount" ValidChars="." />
        </EditItemTemplate>
        <HeaderStyle Width="120px" HorizontalAlign="Center" />
        <ItemStyle Width="120px" />
      </telerik:GridTemplateColumn>
      <telerik:GridTemplateColumn DataField="usrDateAdd" EditFormColumnIndex="0"
      HeaderText="<%$ Resources:Localization, usrDateAdd %>"
      SortExpression="usrDateAdd" UniqueName="usrDateAdd">
        <ItemTemplate>
          <%#DataBinder.Eval(Container.DataItem, "usrDateAdd", "{0:dd/MM/yyyy}")%>
        </ItemTemplate>
        <HeaderStyle Width="120px" HorizontalAlign="Center" />
        <ItemStyle Width="120px" />
      </telerik:GridTemplateColumn>
      <telerik:GridTemplateColumn DataField="usrObserv" EditFormColumnIndex="0"
      HeaderText="<%$ Resources:Localization, usrComments %>"
      SortExpression="usrObserv" UniqueName="usrObserv">
        <ItemTemplate>
          <%#DataBinder.Eval(Container.DataItem,"usrObserv")%>
        </ItemTemplate>
        <EditItemTemplate>
          <asp:TextBox ID="txtUsrObserv" runat="server" Text='<%#Bind("usrObserv") %>' />
        </EditItemTemplate>
        <HeaderStyle Width="120px" HorizontalAlign="Center" />
        <ItemStyle Width="120px" />
      </telerik:GridTemplateColumn>
      <telerik:GridTemplateColumn DataField="Privileges" EditFormColumnIndex="1"
      HeaderText="<%$ Resources:Localization, usrPrivileges%>"
      UniqueName="Privileges">
        <ItemTemplate>
          <asp:Label ID="lblPrivileges" runat="server" />
        </ItemTemplate>
        <EditItemTemplate>
          <asp:CheckBoxList ID="chkPrivileges" runat="server" CellPadding="0" CellSpacing="0"
            DataSourceID="sdsPermits" DataTextField="prmDescript" DataValueField="PKPermit">
          </asp:CheckBoxList>
        </EditItemTemplate>
        <HeaderStyle Width="150px" HorizontalAlign="Center" />
        <ItemStyle Width="150px" HorizontalAlign="Left" />
      </telerik:GridTemplateColumn>
      <telerik:GridTemplateColumn DataField="Authorizer" EditFormColumnIndex="2"
      HeaderText="<%$ Resources:Localization, usrApprover%>"
      UniqueName="Authorizer">
        <ItemTemplate>
          <asp:Label ID="lblAuthorizer" runat="server" />
        </ItemTemplate>
        <EditItemTemplate>
          <asp:CheckBoxList ID="chkAuthorizer" runat="server" CellPadding="0" CellSpacing="0"
          DataSourceID="sdsTypeAuth" DataTextField="typeAuthDesc"
          DataValueField="PKTypeAuth">
          </asp:CheckBoxList>
        </EditItemTemplate>
        <HeaderStyle Width="150px" HorizontalAlign="Center" />
        <ItemStyle Width="150px" HorizontalAlign="Left" VerticalAlign="Top" />
      </telerik:GridTemplateColumn>
      <telerik:GridTemplateColumn DataField="usrSignature" EditFormColumnIndex="0"
      HeaderText="<%$ Resources:Localization, usrSign%>"
      UniqueName="usrSignature">
        <ItemTemplate>
          <telerik:RadBinaryImage runat="server" ID="rb"
          DataValue='<%#Eval("usrSignature") is DBNull ? null : Eval("usrSignature")%>'
          AutoAdjustImageControlSize="false" Height="30px" Width="100px"
          AlternateText="<%$ Resources:Localization, NoSignature %>" />
        </ItemTemplate>
        <EditItemTemplate>
          <telerik:RadAsyncUpload ID="raupSignature" runat="server"
          AllowedFileExtensions="bmp,gif,jpg,jpeg,png"
          OnClientFileUploaded="clientFileUploaded" MaxFileInputsCount="1" Width="120px" />
        </EditItemTemplate>
        <HeaderStyle Width="120px" HorizontalAlign="Center" />
      </telerik:GridTemplateColumn>
      <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
      ConfirmText="<%$ Resources:Localization, usrDelete%>"
        Text="Delete" UniqueName="Delete">
        <ItemStyle HorizontalAlign="Center" />
      </telerik:GridButtonColumn>
    </Columns>
    <EditFormSettings CaptionDataField="usrName"
    CaptionFormatString="<%$ Resources:Localization, usrEdit %>"
      InsertCaption="<%$ Resources:Localization, usrInsert %>" ColumnNumber="3">
      <FormCaptionStyle CssClass="editFormHeader" />
      <FormTableItemStyle Wrap="False" />
      <FormMainTableStyle BackColor="#fafad2" GridLines="None" CellSpacing="2" CellPadding="2"
      Width="100%" />
      <FormTableStyle CellSpacing="2" CellPadding="2" CssClass="editFormBody" />
      <FormTableAlternatingItemStyle Wrap="False" />
      <EditColumn ButtonType="ImageButton"
        InsertText="<%$ Resources:Localization, lblInsert %>"
        UpdateText="<%$ Resources:Localization, lblUpdate %>" UniqueName="EditCommand"
        CancelText="<%$ Resources:Localization, lblCancel %>">
        <ItemStyle CssClass="handCursor" />
      </EditColumn>
      <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="editFormFooter" />
    </EditFormSettings>
    <EditItemStyle Width="33.3%" />
    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
  </MasterTableView>
  <ClientSettings>
    <Selecting AllowRowSelect="True" />
    <ClientEvents OnRowDblClick="RowDblClick" />
  </ClientSettings>
</telerik:RadGrid>

And when i trying to insert o edit a record, the display it's weird. It's posible to correct the widht of the columns in the EditForm and the size of the items inside without using a Template?

I interested in obtain a result like the design of the Grid / Edit Form with Multiple Columns example. With columns with equal width and centered items.

Regards,
Felipe Meléndez.
Felipe de Jesús
Top achievements
Rank 1
 answered on 26 May 2011
3 answers
137 views
Hello,

I Currently have a couple of radSchedulers inside of radtabstrip  and I switch calendars when clicking on different tabs.

the issue I am having is I am getting a full page refresh when clicking on the calendar events and displaying the edit form in Modal, I have the Ajax manager setup an example of the code is below , thanks in advance

<telerik:RadTabStrip runat="server" ID="RadTabStrip1" Orientation="HorizontalTop"
        SelectedIndex="0" MultiPageID="RadMultiPage1">
        <Tabs>
            <telerik:RadTab Text="Cal1">
            </telerik:RadTab>
            <telerik:RadTab Text="Cal2" >
            </telerik:RadTab>
            <telerik:RadTab Text="Cal3" >
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0">
        <telerik:RadPageView runat="server" ID="RadPageView1">
        <telerik:RadScheduler ID="RadScheduler1" runat="server" >
         </telerik:RadScheduler>
</telerik:RadMultiPage>
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />
<telerik:RadAjaxManager runat="server" ID="AjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadScheduler1" >
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadScheduler2" >
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadScheduler2" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadScheduler2" >
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadScheduler2" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
 
Kalina
Telerik team
 answered on 26 May 2011
2 answers
281 views

As a new user of the Telerik controls I am still feeling my way around - I'm used to the Infragistcs control suite so I'm sure there is something simple I am missing.  Here is the problem:

1) Master Page with standar header/footer, content panel
2) Child Content Page with RadGrid, RadToolBar
3) RadToolBar has an "Add" button which does an async postback - the handler calls a method which configures the Title and IconUrl of the RadWindow (since it functions for both "add" and "edit") and then adds script function call to open the RadWindow - works fine - the RadWindow opens as expected.
4) There are two asp:TextBox controls on the RadWindow and both have RequiredFieldValidators configured
5) There are two buttons - "Cancel" and "Save" - the cancel button functions fine and prompt's user to confirm cancellation and closes the RadWindow if true otherwise does not. "CausesValidation" is set to false on the Cancel button.
6) The Save button has "CausesValidation" set to true - but when I click the button the validation does not appear to work because the page post's back and I get an error because I'm trying to save a record with no values.

The question is, why are the RequiredFieldValidators not "firing" - I expect the error text to show and focus to be set to the control failing validation - am I missing a setting or something??  Here is the content page markup...also attached an image of what the page looks like when the RadWindow is opened in "add" context.

 

<%@ Page Title="" Language="C#" MasterPageFile="~/ToolMaster.Master" AutoEventWireup="true" CodeBehind="Roles.aspx.cs" Inherits="SAIC.ISR.CMO.WebUI.Roles" %>
<%@ MasterType VirtualPath="~/ToolMaster.Master" %>
<asp:Content ID="RolesContent" ContentPlaceHolderID="MasterContentPlaceHolder" runat="server">
    <div class="pageContentOuter">
        <div class="pageContentInner">
            <br />
            <div class="group" style="width: 98%;">
                <div class="groupHeader">
                    <span class="left">
                        <span class="small-white-bold-label">Roles</span>
                    </span>
                    <span class="right">
                        <asp:Label ID="RecordCountLabel" runat="server" CssClass="small-white-bold-label">
                        </asp:Label>
                    </span>
                </div>
                <div class="groupToolbar">
                    <div class="groupToolbarContent">
                        <telerik:RadToolBar ID="RolesRadToolbar" runat="server" Width="100%" OnButtonClick="RolesRadToolbar_ButtonClick">
                            <Items>
                                <telerik:RadToolBarButton AccessKey="N" Text="New" CausesValidation="false" PostBack="true" ToolTip="Create New Role" 
                                    CommandName="New" ImageUrl="Content/Images/add16.png" ImagePosition="Left"></telerik:RadToolBarButton>
                                <telerik:RadToolBarButton AccessKey="R" Text="Refresh" CausesValidation="false" PostBack="true" ToolTip="Refresh Roles List" 
                                    CommandName="Refresh" ImageUrl="Content/Images/refresh16.png" ImagePosition="Left"></telerik:RadToolBarButton>
                            </Items>
                        </telerik:RadToolBar>
                    </div>
                </div>
                <div class="groupContent">
                    <telerik:RadGrid ID="RolesRadGrid" runat="server" AllowPaging="true"
                        AllowSorting="true"
                        AutoGenerateEditColumn="false"
                        AutoGenerateDeleteColumn="false"
                        PageSize="15"
                        ShowStatusBar="true"
                        OnItemDataBound="RolesRadGrid_ItemDataBound"
                        OnDeleteCommand="RolesRadGrid_DeleteCommand"
                        OnEditCommand="RolesRadGrid_EditCommand"
                        OnPageIndexChanged="RolesRadGrid_PageIndexChanged">
                        <PagerStyle Mode="NextPrevAndNumeric" Position="Bottom" />
                        <MasterTableView AutoGenerateColumns="false" DataKeyNames="RoleID">
                            <Columns>
                                <telerik:GridBoundColumn UniqueName="RoleID" DataField="RoleID" DataType="System.Int32" Visible="false">
                                    <ItemStyle HorizontalAlign="Left" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="FullName" DataField="FullName" DataType="System.String" MaxLength="100" HeaderText="Role Name">
                                    <ItemStyle HorizontalAlign="Left" Width="20%" />
                                </telerik:GridBoundColumn>  
                                <telerik:GridBoundColumn UniqueName="Description" DataField="Description" DataType="System.String" MaxLength="10" HeaderText="Role Description">
                                    <ItemStyle HorizontalAlign="Left" Width="80%" />
                                </telerik:GridBoundColumn>
                                <telerik:GridButtonColumn UniqueName="EditColumn" CommandName="Edit" ButtonType="ImageButton" ImageUrl="Content/Images/editbutton.png">
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="22px" Height="20px" />
                                </telerik:GridButtonColumn
                                <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" ConfirmDialogType="RadWindow" 
                                    ConfirmTitle="Delete Role" ConfirmText="Are you sure you want to delete this role?" 
                                    ButtonType="ImageButton" ImageUrl="Content/Images/deleteButton.png">
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="22px" Height="20px" />
                                </telerik:GridButtonColumn
                            </Columns>
                            <NoRecordsTemplate>
                                <div class="center">
                                    <br />
                                    <br />
                                    <span class="small-black-bold-label">No Roles Found</span>
                                    <br />
                                    <br />
                                </div>
                            </NoRecordsTemplate>
                        </MasterTableView>
                    </telerik:RadGrid>
                </div>
            </div>
        </div>
    </div>
    <telerik:RadWindowManager ID="RolesRadWindowManager" runat="server" EnableEmbeddedScripts="true" EnableViewState="true">
        <Windows>
    <telerik:RadWindow ID="AddEditWindow" runat="server" Height="250px" Width="500px" EnableEmbeddedScripts="true" 
        Animation="Fade" Modal="true" Behaviors="None" KeepInScreenBounds="true" EnableViewState="true">
        <ContentTemplate>
            <div class="row">
                <span class="label" style="width: 30%;">
                    <asp:RequiredFieldValidator ID="RoleNameValidator" runat="server" ControlToValidate="RoleNameTextBox" CssClass="small-red-bold-label" 
                        Text="*" SetFocusOnError="true">
                    </asp:RequiredFieldValidator>
                    <span class="small-red-label">Role Name:</span>
                 </span>
                <span class="field" style="width: 65%;">
                    <asp:TextBox ID="RoleNameTextBox" runat="server" CausesValidation="true" CssClass="textbox" MaxLength="50" Width="300px"></asp:TextBox>
                </span>
            </div>
            <div class="row" style="height: 55px;">
                <span class="label" style="width: 30%;">
                    <asp:RequiredFieldValidator ID="DescriptionValidator" runat="server" ControlToValidate="RoleDescriptionTextBox" CssClass="small-red-bold-label" 
                        Text="*" SetFocusOnError="true">
                    </asp:RequiredFieldValidator>
                    <span class="small-red-label">Description:</span>
               </span>
               <span class="field" style="width: 65%;">
                    <asp:TextBox ID="RoleDescriptionTextBox" runat="server" CausesValidation="true" CssClass="textbox" TextMode="MultiLine" Height="50px" Width="300px"></asp:TextBox>
                </span>
            </div>
            <div class="row"><span class="label"></span><span class="field"></span></div>
            <div class="row">
                <span class="label" style="width: 48%;">
                    <asp:Button ID="SaveButton" CausesValidation="true" runat="server" Text="Save" Width="100px" OnClick="SaveButton_Click" />
                </span>
                <span class="field" style="width: 48%;">
                    <asp:Button ID="CancelButton" CausesValidation="false" runat="server" Text="Cancel" Width="100px" />
                </span>
            </div>
        </ContentTemplate>
    </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
      
    <asp:HiddenField ID="AddEditContextHidden" runat="server" />
    <div class="spacer"> </div>
</asp:Content>

Michael
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 26 May 2011
1 answer
69 views
I've noticed that when i click on sorting column, when using client-side binding, sorting triangles are not shown. How to show them? Do i need to add some extra javascript code?
Pavlina
Telerik team
 answered on 26 May 2011
15 answers
383 views
Hi All

Is there a way to rebind the Scheduler Client side?
I am currently calling the Ajax Manager to rebind this,
The only problem with that is the Ajax manager rebinds all my Grids at the same time because they are updated controls of the Ajax Manager!

Many Thanks

Regards
Cush
Top achievements
Rank 1
 answered on 26 May 2011
3 answers
135 views
Text on the RadButton displayed outside the RadButton if the  number of characters are more than 15 in IE 7 & IE8(With compatibility mode) but it working fine with the FF 3.6 or FF 4.0.
Any solution???
Bozhidar
Telerik team
 answered on 26 May 2011
3 answers
172 views
I have a page in development that is basically a large hierarchical radgrid. What is happening is any sort of AJAX request is causing the page to scroll to the top. The loading panel is also not working. Please help!

Also, please note that there is a script manager inside the "DashboardSelector" user control.

ASP:
<%@ Page Title="" Language="VB" MasterPageFile="~/All/Site.master" EnableEventValidation="false" AutoEventWireup="false" CodeFile="Orders.aspx.vb" Inherits="Management_Dashboard_AllOrders" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<%@ Register src="../../Controls/DashboardSelector.ascx" tagname="DashboardSelector" tagprefix="uc1" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
        MinDisplayTime="5" Skin="Default" Transparency="20">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server"
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="OrdersGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="OrdersGrid"
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <uc1:DashboardSelector ID="DashboardSelector1" runat="server" />
    <h4>New Orders</h4>
    <telerik:RadButton ID="btnExportToExcel" runat="server"
            Text="Export to Excel">
        </telerik:RadButton>
     
    <telerik:RadGrid ID="OrdersGrid" runat="server" AllowFilteringByColumn="True"
        AllowPaging="True" DataSourceID="GPOrderHeadersDataSource" GridLines="None"
        Skin="Telerik" AllowSorting="True" ShowGroupPanel="True">
        <ExportSettings FileName="OrdersExport" IgnorePaging="True"
            ExportOnlyData="True">
            <Excel Format="ExcelML" />
<Excel Format="ExcelML"></Excel>
        </ExportSettings>
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True"
            ReorderColumnsOnClient="True">
        </ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="SOPNUMBE"
            DataSourceID="GPOrderHeadersDataSource" PageSize="50">
 
    <DetailTables>
        <telerik:GridTableView runat="server" DataKeyNames="SOPNUMBE"
            AllowFilteringByColumn="False" AllowPaging="False" AutoGenerateColumns="False"
            DataSourceID="DetailsDataSource">
            <ParentTableRelation>
                <telerik:GridRelationFields DetailKeyField="SOPNUMBE"
                    MasterKeyField="SOPNUMBE" />
            </ParentTableRelation>
            <CommandItemSettings ExportToPdfText="Export to Pdf" />
 
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <Columns>
                <telerik:GridBoundColumn DataField="SOPNUMBE" HeaderText="SOPNUMBE"
                    SortExpression="SOPNUMBE" UniqueName="SOPNUMBE" Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ITMSHNAM" HeaderText="ITMSHNAM"
                    SortExpression="ITMSHNAM" UniqueName="ITMSHNAM">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ITEMDESC" HeaderText="ITEMDESC"
                    SortExpression="ITEMDESC" UniqueName="ITEMDESC">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="STATUS" HeaderText="STATUS"
                    SortExpression="STATUS" UniqueName="STATUS">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Qty" DataFormatString="{0:0}"
                    DataType="System.Double" HeaderText="Qty" SortExpression="Qty" UniqueName="Qty">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ATYALLOC" DataFormatString="{0:0}"
                    DataType="System.Double" HeaderText="ATYALLOC" SortExpression="ATYALLOC"
                    UniqueName="ATYALLOC">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="QTYFULFI" DataFormatString="{0:0}"
                    DataType="System.Double" HeaderText="QTYFULFI" SortExpression="QTYFULFI"
                    UniqueName="QTYFULFI">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LOCNCODE" HeaderText="LOCNCODE"
                    SortExpression="LOCNCODE" UniqueName="LOCNCODE">
                </telerik:GridBoundColumn>
            </Columns>
        </telerik:GridTableView>
    </DetailTables>
<CommandItemSettings ExportToPdfText="Export to Pdf" ShowAddNewRecordButton="False"
        ShowExportToExcelButton="True" ShowExportToPdfButton="True"></CommandItemSettings>
 
    <ExpandCollapseColumn Visible="True">
    </ExpandCollapseColumn>
    <Columns>
        <telerik:GridTemplateColumn UniqueName="Color"
            AllowFiltering="False" Groupable="False">
            <ItemTemplate>
                <telerik:RadComboBox ID="cboColorChanger" Runat="server" AutoPostBack="True"
                    DataTextField="Color" DataValueField="SOPNUMBE"
                    onselectedindexchanged="cboColorChanger0_SelectedIndexChanged"
                    SelectedValue='<%# GetColor() %>' Skin="Telerik" Width="65px" >
                    <Items>
                        <telerik:RadComboBoxItem runat="server" Owner="cboColorChanger" Text="None"
                            Value="None" />
                        <telerik:RadComboBoxItem runat="server" BackColor="Red" ForeColor="Red"
                            Owner="cboColorChanger" Text="Red" Value="Red" />
                        <telerik:RadComboBoxItem runat="server" BackColor="#FF8000" ForeColor="#FF8000"
                            Owner="cboColorChanger" Text="Orange" Value="Orange" />
                        <telerik:RadComboBoxItem runat="server" BackColor="Yellow" ForeColor="Yellow"
                            Owner="cboColorChanger" Text="Yellow" Value="Yellow" />
                        <telerik:RadComboBoxItem runat="server" BackColor="Lime" ForeColor="Lime"
                            Owner="cboColorChanger" Text="Green" Value="Green" />
                        <telerik:RadComboBoxItem runat="server" BackColor="Cyan" ForeColor="Cyan"
                            Owner="cboColorChanger" Text="Blue" Value="Blue" />
                        <telerik:RadComboBoxItem runat="server" BackColor="Fuchsia" ForeColor="Fuchsia"
                            Owner="cboColorChanger" Text="Pink" Value="Pink" />
                    </Items>
                </telerik:RadComboBox>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="CUSTNMBR" HeaderText="CUSTNMBR"
            ReadOnly="True" SortExpression="CUSTNMBR" UniqueName="CUSTNMBR"
            HeaderTooltip="Customer Number">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="CUSTNAME" HeaderText="CUSTNAME"
            ReadOnly="True" SortExpression="CUSTNAME" UniqueName="CUSTNAME"
            Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="SOPNUMBE" HeaderText="SOP"
            ReadOnly="True" SortExpression="SOPNUMBE" UniqueName="SOPNUMBE"
            HeaderTooltip="SOP Number">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="PO" HeaderText="PO" ReadOnly="True"
            SortExpression="PO" UniqueName="PO">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ReqShipDate"
            DataFormatString="{0:MM/dd/yyyy}" HeaderText="RSD" ReadOnly="True"
            SortExpression="ReqShipDate" UniqueName="ReqShipDate"
            HeaderTooltip="Required Ship Date">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ORDRDATE" DataFormatString="{0:MM/dd/yyyy}"
            HeaderText="OD" ReadOnly="True" SortExpression="ORDRDATE"
            UniqueName="ORDRDATE" HeaderTooltip="Order Date">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="CITY" HeaderText="CITY" ReadOnly="True"
            SortExpression="CITY" UniqueName="CITY">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="STATE" HeaderText="ST" ReadOnly="True"
            SortExpression="STATE" UniqueName="STATE"
            HeaderTooltip="State">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DOCID" HeaderText="DOCID" ReadOnly="True"
            SortExpression="DOCID" UniqueName="DOCID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="OREMSUBT" DataFormatString="{0:C}"
            HeaderText="OREMSUBT" ReadOnly="True" SortExpression="OREMSUBT"
            UniqueName="OREMSUBT" HeaderTooltip="Original Remaining Subtotal">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="NumLines" DataType="System.Int32"
            HeaderText="NL" ReadOnly="True" SortExpression="NumLines"
            UniqueName="NumLines"
            HeaderTooltip="Number of Lines">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn AllowFiltering="False" Groupable="False"
            HeaderText="Notes" Reorderable="False" UniqueName="Notes" Visible="False">
            <%--<ItemTemplate>
                <table style="border-width: 0px; border-style: none; text-align: center;">
                    <tr><td>
                        <telerik:RadTextBox ID="txtNotes" Runat="server" Height="50px" Skin="Telerik"
                            Text="<%# GetNotes() %>" TextMode="MultiLine" Width="250px">
                        </telerik:RadTextBox>               
                    </td></tr>
                    <tr><td>
                        <telerik:RadButton ID="btnUpdateNotes" runat="server" Skin="Telerik"
                            Text="Update Notes" onclick="btnUpdateNotes_Click">
                        </telerik:RadButton>
                    </td></tr>
                </table>
            </ItemTemplate>--%>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn AllowFiltering="False" HeaderText="Note"
            Resizable="False" UniqueName="Notes Icon">
            <ItemTemplate>
                <asp:Panel ID="NotesPanel" Visible="true" runat="server">
                    <asp:ImageButton ID="imgNote" runat="server" AlternateText="<%# GetNotes() %>"
                        ImageUrl="<%# NoteImage() %>" onclick="ImageButton1_Click"
                        ToolTip="<%# GetNotes() %>" />
 
                </asp:Panel>                   
                <asp:Panel ID="EditNotesPanel" Visible="false" runat="server">
                                    <table style="border-width: 0px; border-style: none; text-align: center;">
                    <tr><td>
                        <telerik:RadTextBox ID="txtNotes" Runat="server" Height="50px" Skin="Telerik"
                            Text="<%# GetNotes() %>" TextMode="MultiLine" Width="250px">
                        </telerik:RadTextBox>               
                    </td></tr>
                    <tr><td>
                        <telerik:RadButton ID="btnUpdateNotes" runat="server" Skin="Telerik"
                            Text="Update Notes" onclick="btnUpdateNotes_Click">
                        </telerik:RadButton>
                    </td></tr>
                </table>
                    </asp:Panel>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
</MasterTableView>
 
<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="GPOrderHeadersDataSource" runat="server"
        ConnectionString="<%$ ConnectionStrings:OrdersConString %>" SelectCommand="SELECT        RTRIM(SOP10100.CUSTNAME) AS CUSTNAME, RTRIM(SOP10100.SOPNUMBE) AS SOPNUMBE, RTRIM(SOP10100.CSTPONBR) AS PO,
                         (SOP10100.ReqShipDate) AS ReqShipDate, (SOP10100.ORDRDATE) AS ORDRDATE, RTRIM(SOP10100.CITY) AS CITY, RTRIM(SOP10100.STATE)
                         AS STATE, RTRIM(SOP10100.CUSTNMBR) AS CUSTNMBR, RTRIM(SOP10100.DOCID) AS DOCID, (SOP10100.OREMSUBT) AS OREMSUBT,
                         COUNT(SOP10200.ITEMNMBR) AS NumLines
FROM            SOP10100 INNER JOIN
                         SOP10200 ON SOP10100.SOPNUMBE = SOP10200.SOPNUMBE AND SOP10100.SOPTYPE = SOP10200.SOPTYPE
WHERE        (SOP10100.CUSTNMBR NOT LIKE 'WALCANA') AND (SOP10100.CUSTNMBR NOT LIKE 'WALMART') AND (SOP10100.SOPTYPE = 2) AND VOIDSTTS = 0
GROUP BY RTRIM(SOP10100.CUSTNAME), RTRIM(SOP10100.SOPNUMBE), RTRIM(SOP10100.CSTPONBR), (SOP10100.ReqShipDate), (SOP10100.ORDRDATE),
                         RTRIM(SOP10100.CITY), RTRIM(SOP10100.STATE), RTRIM(SOP10100.CUSTNMBR), RTRIM(SOP10100.DOCID), (SOP10100.OREMSUBT)
ORDER BY RTRIM(SOP10100.CUSTNAME)"></asp:SqlDataSource>
    <asp:SqlDataSource ID="DetailsDataSource" runat="server"
        ConnectionString="<%$ ConnectionStrings:OrdersConString %>"
        SelectCommand="SELECT RTRIM(SOP10100.SOPNUMBE) AS SOPNUMBE, RTRIM(IV00101.ITMSHNAM) AS ITMSHNAM, RTRIM(SOP10200.ITEMDESC) AS ITEMDESC, RTRIM(IV00101.USCATVLS_5) AS STATUS, ROUND(SOP10200.QTYREMAI,0) AS Qty, ROUND(SOP10200.ATYALLOC,0) AS ATYALLOC, ROUND(SOP10200.QTYFULFI,0) AS QTYFULFI, RTRIM(SOP10200.LOCNCODE) AS LOCNCODE FROM SOP10200 INNER JOIN IV00101 ON SOP10200.ITEMNMBR = IV00101.ITEMNMBR INNER JOIN SOP10100 ON SOP10200.SOPNUMBE = SOP10100.SOPNUMBE AND SOP10200.SOPTYPE = SOP10100.SOPTYPE WHERE (SOP10100.CUSTNMBR NOT LIKE 'WALCANA') AND (SOP10100.CUSTNMBR NOT LIKE 'WALMART') AND (SOP10200.SOPTYPE = 2) AND (SOP10100.VOIDSTTS = 0) AND (SOP10100.SOPNUMBE = @SOPNUMBE) ORDER BY SOPNUMBE DESC">
        <SelectParameters>
            <asp:Parameter Name="SOPNUMBE" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="ColorsDataSource" runat="server"
    ConnectionString="<%$ ConnectionStrings:IntranetConnectionString %>"
    SelectCommand="SELECT * FROM [OrdersTableRowColor]"></asp:SqlDataSource>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Black">
        <Windows>
            <telerik:RadWindow ID="NotesWindow" runat="server" Animation="Fade"
                AutoSize="True" EnableShadow="True" KeepInScreenBounds="True" Skin="Telerik"
                style="display:none;" VisibleStatusbar="False" DestroyOnClose="True"
                Overlay="True" Title="Update Note" Behavior="Close" Behaviors="Close"
                Modal="True">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    </asp:Content>


Code Behind:
Imports Telerik.Web.UI
Imports System.Data
Imports System.Data.SqlClient
 
Partial Class Management_Dashboard_AllOrders
    Inherits System.Web.UI.Page
 
    Dim conString As String = "Data Source=PDC-SQL1;Initial Catalog=Intranet;Integrated Security=True"
    Dim conn As SqlConnection = New SqlConnection(conString)
    Dim notesURL As String = "images/Note.png"
    Dim noNotesURL As String = "images/noNote.png"
    Protected Sub RadButton1_Click(sender As Object, e As System.EventArgs) Handles btnExportToExcel.Click
        OrdersGrid.MasterTableView.ExportToExcel()
    End Sub
    Protected Function GetNotes() As String
        Dim getTheNotes As SqlCommand = New SqlCommand("SELECT Notes FROM OrdersTableEX WHERE SOPNUMBE = @sopnumbe", conn)
        Dim notes As String = ""
        Dim s As String = ""
        Try
            s = Eval("SOPNUMBE")
        Catch
            Try
                s = Session("SOP")
            Catch
 
            End Try
        End Try
        Try
            getTheNotes.Connection.Open()
            getTheNotes.Parameters.AddWithValue("@sopnumbe", s)
 
            notes = If(TypeOf getTheNotes.ExecuteScalar() Is DBNull, "", getTheNotes.ExecuteScalar())
        Catch
            MsgBox("ERROR: Please contact IT", MsgBoxStyle.Critical, "ERROR")
        Finally
            getTheNotes.Connection.Close()
        End Try
        If notes <> Nothing Then
            Return notes
        Else
            Return ""
        End If
    End Function
    Protected Function GetColor() As String
 
        Dim getTheColor As SqlCommand = New SqlCommand("SELECT color FROM OrdersTableEX WHERE SOPNUMBE = @sopnumbe", conn)
 
        Dim col As String = ""
        Try
            getTheColor.Connection.Open()
            getTheColor.Parameters.AddWithValue("@sopnumbe", Eval("SOPNUMBE").ToString)
            col = getTheColor.ExecuteScalar()
        Catch
            MsgBox("ERROR: Please contact IT", MsgBoxStyle.Critical, "ERROR")
        Finally
            getTheColor.Connection.Close()
        End Try
        If col <> Nothing Then
            Return col
        Else
            Return "None"
        End If
    End Function
    Protected Sub ColorRow(ByVal r As GridDataItem, col As String)
        Select Case col
            Case "None"
                r.BackColor = Drawing.Color.Empty
            Case "Red"
                r.BackColor = Drawing.Color.Red
            Case "Orange"
                r.BackColor = Drawing.Color.Orange
            Case "Yellow"
                r.BackColor = Drawing.Color.Yellow
            Case "Green"
                r.BackColor = Drawing.Color.Lime
            Case "Blue"
                r.BackColor = Drawing.Color.Cyan
            Case "Pink"
                r.BackColor = Drawing.Color.Fuchsia
            Case Else
                r.BackColor = Drawing.Color.Empty
        End Select
    End Sub
    Protected Sub cboColorChanger0_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)
        Dim color As String = CType(sender, RadComboBox).SelectedValue
        Dim r As GridDataItem = CType(sender.parent.parent, GridDataItem)
        Dim sop As String = r("SOPNUMBE").Text
        Dim colorPresent As SqlCommand = New SqlCommand("SELECT * FROM OrdersTableEX WHERE SOPNUMBE = @sopnumbe", conn)
        Dim getColor As SqlCommand = New SqlCommand("SELECT color FROM OrdersTableEX WHERE SOPNUMBE = @sopnumbe", conn)
        Dim insertColor As SqlCommand = New SqlCommand("INSERT INTO [OrdersTableEX] ([SOPNUMBE],[color]) VALUES (@sopnumbe,@col)", conn)
        Dim updateColor As SqlCommand = New SqlCommand("UPDATE [OrdersTableEX] SET [color] = @col WHERE SOPNUMBE = @sopnumbe", conn)
        colorPresent.Parameters.AddWithValue("@sopnumbe", sop)
        Dim present As String = ""
        Try
            colorPresent.Connection.Open()
            present = colorPresent.ExecuteScalar()
        Catch
            MsgBox("ERROR: Please contact IT", MsgBoxStyle.Critical, "ERROR")
        Finally
            colorPresent.Connection.Close()
        End Try
        If present <> sop Then
            Try
                insertColor.Connection.Open()
                insertColor.Parameters.AddWithValue("@sopnumbe", sop)
                insertColor.Parameters.AddWithValue("@col", color)
                insertColor.ExecuteNonQuery()
            Catch
                MsgBox("ERROR: Please contact IT", MsgBoxStyle.Critical, "ERROR")
            Finally
                insertColor.Connection.Close()
            End Try
        Else
            Try
                updateColor.Connection.Open()
                updateColor.Parameters.AddWithValue("@col", color)
                updateColor.Parameters.AddWithValue("@sopnumbe", sop)
                updateColor.ExecuteNonQuery()
            Catch
                MsgBox("ERROR: Please contact IT", MsgBoxStyle.Critical, "ERROR")
            Finally
                updateColor.Connection.Close()
            End Try
        End If
        Dim col As String = ""
        Try
            getColor.Connection.Open()
            getColor.Parameters.AddWithValue("@sopnumbe", sop)
            col = getColor.ExecuteScalar()
        Catch
            MsgBox("ERROR: Please contact IT", MsgBoxStyle.Critical, "ERROR")
        Finally
            getColor.Connection.Close()
        End Try
        ColorRow(r, col)
 
    End Sub
    Protected Sub OrdersGrid_DataBound(sender As Object, e As System.EventArgs) Handles OrdersGrid.DataBound
        For Each r As GridDataItem In OrdersGrid.Items
            ColorRow(r, CType(r("Color").FindControl("cboColorChanger"), RadComboBox).SelectedValue)
        Next
    End Sub
    Protected Sub btnUpdateNotes_Click(sender As Object, e As System.EventArgs)
 
        Dim notes As String = CType(CType(sender.parent.parent, GridTableCell).FindControl("txtNotes"), RadTextBox).Text
        Dim r As GridDataItem = CType(sender.parent.parent.parent, GridDataItem)
        Dim sop As String = r("SOPNUMBE").Text
        Dim colorPresent As SqlCommand = New SqlCommand("SELECT * FROM OrdersTableEX WHERE SOPNUMBE = @sopnumbe", conn)
        Dim getNotes As SqlCommand = New SqlCommand("SELECT Notes FROM OrdersTableEX WHERE SOPNUMBE = @sopnumbe", conn)
        Dim insertNotes As SqlCommand = New SqlCommand("INSERT INTO [OrdersTableEX] ([SOPNUMBE],[Notes]) VALUES (@sopnumbe,@col)", conn)
        Dim updateNotes As SqlCommand = New SqlCommand("UPDATE [OrdersTableEX] SET [Notes] = @col WHERE SOPNUMBE = @sopnumbe", conn)
        colorPresent.Parameters.AddWithValue("@sopnumbe", sop)
        Dim present As String = ""
        Try
            colorPresent.Connection.Open()
            present = colorPresent.ExecuteScalar()
        Catch
            MsgBox("ERROR: Please contact IT", MsgBoxStyle.Critical, "ERROR")
        Finally
            colorPresent.Connection.Close()
        End Try
        If present <> sop Then
            Try
                insertNotes.Connection.Open()
                insertNotes.Parameters.AddWithValue("@sopnumbe", sop)
                insertNotes.Parameters.AddWithValue("@col", notes)
                insertNotes.ExecuteNonQuery()
            Catch
                MsgBox("ERROR: Please contact IT", MsgBoxStyle.Critical, "ERROR")
            Finally
                insertNotes.Connection.Close()
            End Try
        Else
            Try
                updateNotes.Connection.Open()
                updateNotes.Parameters.AddWithValue("@col", notes)
                updateNotes.Parameters.AddWithValue("@sopnumbe", sop)
                updateNotes.ExecuteNonQuery()
            Catch
                MsgBox("ERROR: Please contact IT", MsgBoxStyle.Critical, "ERROR")
            Finally
                updateNotes.Connection.Close()
            End Try
        End If
        CType(CType(sender.parent.parent, GridTableCell).FindControl("NotesPanel"), Panel).Visible = True
        CType(CType(sender.parent.parent, GridTableCell).FindControl("EditNotesPanel"), Panel).Visible = False
        Session("SOP") = sop
        CType(CType(sender.parent.parent, GridTableCell).FindControl("imgNote"), ImageButton).DataBind()
    End Sub
    Protected Function NoteImage() As String
        Dim getTheNotes As SqlCommand = New SqlCommand("SELECT Notes FROM OrdersTableEX WHERE SOPNUMBE = @sopnumbe", conn)
        Dim notes As String = ""
        Dim s As String = ""
        Try
            s = Eval("SOPNUMBE")
        Catch
            Try
                s = Session("SOP")
            Catch
 
            End Try
        End Try
        Try
            getTheNotes.Connection.Open()
            getTheNotes.Parameters.AddWithValue("@sopnumbe", s)
 
            notes = If(TypeOf getTheNotes.ExecuteScalar() Is DBNull, "", getTheNotes.ExecuteScalar())
        Catch
            MsgBox("ERROR: Please contact IT", MsgBoxStyle.Critical, "ERROR")
        Finally
            getTheNotes.Connection.Close()
        End Try
        If notes <> Nothing Then
            Return notesURL
        Else
            Return noNotesURL
        End If
    End Function
 
    Protected Sub ImageButton1_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)
        Dim r As GridDataItem = CType(sender.parent.parent.parent, GridDataItem)
        Dim c As GridTableCell = CType(sender.parent.parent, GridTableCell)
        CType(c.FindControl("NotesPanel"), Panel).Visible = False
        CType(c.FindControl("EditNotesPanel"), Panel).Visible = True
        'RadWindowManager1.Windows(0).NavigateUrl = "notesEditor.aspx?SOP=" + r("SOPNUMBE").Text
        'RadWindowManager1.Windows(0).VisibleOnPageLoad = True
 
    End Sub
 
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        If IsPostBack Then
            RadWindowManager1.Windows(0).VisibleOnPageLoad = False
        End If
    End Sub
End Class
Pavlina
Telerik team
 answered on 26 May 2011
1 answer
31 views
Hi

I wanted to write some piece of server code inside the ImageManger.ascx file.For example i wanted to call some server side method by adding some simple <script runat="server">.and adding code withing <%%> But none of this seems to be working?

I also wanted to know why can not i access Session object within these user control?

i tried using codeblock etc but nothing worked Plz help?
Rumen
Telerik team
 answered on 26 May 2011
1 answer
107 views
I have two schedulers embedded in one page.  It is very slow when I try to load the page in IE7. However, the loading speed inside Google Chrome was very fast. My customer doesn't satisfy with the loading speed in IE. Can you help with this?

Thanks.
Veronica
Telerik team
 answered on 26 May 2011
2 answers
108 views
Hello, I have a wide RadGrid (> 16 cols) that I am trying to export to PDF.  When I export to PDF, the grid overflows out of the PDF width.  Is there a way to make it use more than 1 page for the width of the table (e.g. 3 pages wide by N pages long)?  I want to get something similar to what I get with the RadReport (in another page I am using the RadReport control and it renders the report 3p wide by N pages long).  Included is the body of the RadGrid and the code-behind in which I format it.  The RadGrid is ajaxified.  Thanks for any help you can provide.

    Private Sub PDFButton_Click(sender As Object, e As System.EventArgs) Handles PDFButton.Click
        _isExport = True
        For Each column As Telerik.Web.UI.GridColumn In ReportGrid.MasterTableView.Columns
            If column.UniqueName = "SelectCheckbox" Or column.UniqueName = "ViewButton" Then
                column.Visible = False
                EndIf
        Next
        ReportGrid.Width = New Unit(22)
        ReportGrid.MasterTableView.ExportToPdf()
    End Sub
  
  
Private Sub ReportGrid_ItemCreated(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles ReportGrid.ItemCreated
        If _isExport Then
            If TypeOf (e.Item) Is GridHeaderItem Then
                Dim headerItem As GridHeaderItem = e.Item
                headerItem.Style("font-size") = "8pt"
                headerItem.Style("color") = "white"
                headerItem.Style("background-color") = "gray"
                headerItem.Style("vertical-align") = "bottom"
                For Each cell As TableCell In headerItem.Cells
                    cell.Style("text-align") = "left"
                    cell.Style("font-weight") = "bold"
                    cell.Style("border-color") = "red"
                Next
            ElseIf TypeOf (e.Item) Is GridDataItem Then
                Dim bodyItem As GridDataItem = e.Item
                bodyItem.Style("font-size") = "8pt"
                bodyItem.Style("vertical-align") = "bottom"
                For Each cell As TableCell In bodyItem.Cells
                    cell.Style("text-align") = "left"
                Next
            End If
        End If
    End Sub


<telerik:RadGrid ID="ReportGrid" runat="server" Height="99%" AllowPaging="True" GridLines="None" PageSize="50" AllowSorting="True" AllowFilteringByColumn="false" AllowMultiRowSelection="true" AutoGenerateColumns="false">
    <ClientSettings AllowColumnsReorder="true">
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        <Selecting AllowRowSelect="true" />
        <Resizing AllowColumnResize="true" AllowResizeToFit="false" ClipCellContentOnResize="true" ResizeGridOnColumnResize="true" EnableRealTimeResize="false" />
        <ClientEvents OnRowDeselected="ReportGrid_OnRowDeselected" OnRowSelected="ReportGrid_OnRowSelected" />
    </ClientSettings>
    <MasterTableView>
        <Columns>
            <telerik:GridClientSelectColumn UniqueName="SelectCheckbox" HeaderStyle-Width="30" />
            <telerik:GridButtonColumn DataTextField="FullFileName" CommandName="View" ButtonType="ImageButton" UniqueName="ViewButton" ImageUrl="/Images/preview.png" HeaderStyle-Width="30" />
            <telerik:GridBoundColumn DataField="DocArchiveSysKey" DataType="System.String" HeaderText="DocArchiveSysKey" SortExpression="DocArchiveSysKey" UniqueName="DocArchiveSysKey" />
            <telerik:GridBoundColumn DataField="Division" DataType="System.String" HeaderText="Division" SortExpression="Division" UniqueName="Division" />
            <telerik:GridBoundColumn DataField="Route" DataType="System.String" HeaderText="Route" SortExpression="Route" UniqueName="Route" />
            <telerik:GridBoundColumn DataField="Outlet" DataType="System.String" HeaderText="Outlet" SortExpression="Outlet" UniqueName="Outlet" />
            <telerik:GridBoundColumn DataField="OutletName" DataType="System.String" HeaderText="OutletName" SortExpression="OutletName" UniqueName="OutletName" />
            <telerik:GridBoundColumn DataField="DocType" DataType="System.String" HeaderText="DocType" SortExpression="DocType" UniqueName="DocType" />
            <telerik:GridBoundColumn DataField="DisplayDocType" DataType="System.String" HeaderText="DisplayDocType" SortExpression="DisplayDocType" UniqueName="DisplayDocType" />
            <telerik:GridBoundColumn DataField="DocID" DataType="System.String" HeaderText="DocID" SortExpression="DocID" UniqueName="DocID" />
            <telerik:GridBoundColumn DataField="DisplayDocDate" DataType="System.String" HeaderText="DisplayDocDate Date" SortExpression="DisplayDocDate" UniqueName="DisplayDocDate" />
            <telerik:GridBoundColumn DataField="FileName" DataType="System.String" HeaderText="FileName" SortExpression="FileName" UniqueName="FileName" />
            <telerik:GridBoundColumn DataField="FullFileName" DataType="System.String" HeaderText="FullFileName" SortExpression="FullFileName" UniqueName="FullFileName" />
            <telerik:GridBoundColumn DataField="DisplaySettlementDate" DataType="System.DateTime" HeaderText="DisplaySettlementDate" SortExpression="DisplaySettlementDate" UniqueName="DisplaySettlementDate" />
            <telerik:GridBoundColumn DataField="RC2Code" DataType="System.String" HeaderText="RC2Code" SortExpression="RC2Code" UniqueName="RC2Code" />
            <telerik:GridBoundColumn DataField="RC3Code" DataType="System.String" HeaderText="RC3Code" SortExpression="RC3Code" UniqueName="RC3Code" />
            <telerik:GridBoundColumn DataField="RC4Code" DataType="System.String" HeaderText="RC4Code" SortExpression="RC4Code" UniqueName="RC4Code" />
            <telerik:GridBoundColumn DataField="RC5Code" DataType="System.String" HeaderText="RC5Code" SortExpression="RC5Code" UniqueName="RC5Code" />
            <telerik:GridBoundColumn DataField="EA1Code" DataType="System.String" HeaderText="EA1Code" SortExpression="EA1Code" UniqueName="EA1Code" />
            <telerik:GridBoundColumn DataField="EA2Code" DataType="System.String" HeaderText="EA2Code" SortExpression="EA2Code" UniqueName="EA2Code" />
            <telerik:GridBoundColumn DataField="EA3Code" DataType="System.String" HeaderText="EA3Code" SortExpression="EA3Code" UniqueName="EA3Code" />
            <telerik:GridBoundColumn DataField="EA4Code" DataType="System.String" HeaderText="EA4Code" SortExpression="EA4Code" UniqueName="EA4Code" />
            <telerik:GridBoundColumn DataField="EA5Code" DataType="System.String" HeaderText="EA5Code" SortExpression="EA5Code" UniqueName="EA5Code" />
            <telerik:GridBoundColumn DataField="EA6Code" DataType="System.String" HeaderText="EA6Code" SortExpression="EA6Code" UniqueName="EA6Code" />
            <telerik:GridBoundColumn DataField="EA7Code" DataType="System.String" HeaderText="EA7Code" SortExpression="EA7Code" UniqueName="EA7Code" />
            <telerik:GridBoundColumn DataField="EA8Code" DataType="System.String" HeaderText="EA8Code" SortExpression="EA8Code" UniqueName="EA8Code" />
            <telerik:GridBoundColumn DataField="EA9Code" DataType="System.String" HeaderText="EA9Code" SortExpression="EA9Code" UniqueName="EA9Code" />
            <telerik:GridBoundColumn DataField="EA10Code" DataType="System.String" HeaderText="EA10Code" SortExpression="EA10Code" UniqueName="EA10Code" />
        </Columns>
    </MasterTableView>
    <ExportSettings HideStructureColumns="true" ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
        <Pdf PageWidth="11in" PageHeight="8.5in" PageLeftMargin=".5in" PageRightMargin=".5in" PageTopMargin=".5in" PageBottomMargin=".5in" AllowCopy="true" AllowModify="true" AllowPrinting="true" />
    </ExportSettings>
</telerik:RadGrid>
Javier
Top achievements
Rank 1
 answered on 26 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?