Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
94 views
I have a RADGRID running but it will not do paging. I believe I have the settings.  The ASPX setting are below.
<section id="Grid" class="Grid-container">
    <telerik:RadGrid ID="RadGridInvestigations"
        runat="server"
        AllowPaging="True"
        PageSize="10"
        AllowSorting="True"
        AllowAutomaticInserts="True"
        OnNeedDataSource="RadGridInvestigation_NeedDataSource"
        OnItemCreated="RadGridInvestigation_ItemCreated"
        OnUpdateCommand="RadGridInvestigation_UpdateCommand"
        OnInsertCommand="RadGridInvestigation_InsertCommand"
        Font-Size="Large"
        GroupPanelPosition="Top"
        Width="1051px">
        <HeaderStyle CssClass="Myheader" />
        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
        <MasterTableView
            EditMode="PopUp"
            AutoGenerateColumns="False"
            DataKeyNames="CaseID,CaseName"
            GridLines="Horizontal"
            CommandItemDisplay="Top"
            NoMasterRecordsText="No Records have been entered in the application."
            ShowFooter="False">
            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton"></telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="CaseID"
                    HeaderText="Case ID"
                    ReadOnly="true"
                    ForceExtractValue="Always"
                    ConvertEmptyStringToNull="true"
                    Display="false"
                    UniqueName="CaseID" />
                <%--<telerik:GridBoundColumn DataField="CaseNumber" HeaderText="CaseNumber" UniqueName="CaseNumber" ReadOnly="false" Display="false" />--%>
                <telerik:GridHyperLinkColumn FilterControlAltText="Filter CaseNumber column"
                    UniqueName="CaseNumber" DataNavigateUrlFormatString="~/Forms/InvWithTips2.aspx?CaseNumber={0}&CaseName={1}"
                    DataTextField="CaseNumber" HeaderText="Case Number"
                    DataNavigateUrlFields="CaseNumber,CaseName"
                    SortExpression="CaseNumber" HeaderStyle-Wrap="false">
                    <HeaderStyle Wrap="False"></HeaderStyle>
                </telerik:GridHyperLinkColumn>
                <telerik:GridBoundColumn DataField="CaseName" HeaderText="Name" SortExpression="CaseName"
                    UniqueName="CaseName" Display="True">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="InvestigativeUnit" HeaderText="Unit Assigned" SortExpression="InvestigativeUnit"
                    UniqueName="InvestigativeUnit" HeaderStyle-Wrap="True">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PrimaryContact" HeaderText="PrimaryContact" SortExpression="PrimaryContact"
                    UniqueName="PrimaryContact">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PrimaryContactEmail" HeaderText="PrimaryContactEmail" SortExpression="PrimaryContactEmail"
                    UniqueName="PrimaryContactEmail">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PrimaryContactPhone" HeaderText="Primary Phone" SortExpression="PrimaryContactPhone"
                    UniqueName="PrimaryContactPhone">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DateOpened" HeaderText="DateOpened" SortExpression="DateOpened"
                    UniqueName="DateOpened" DataFormatString="{0:dd/MM/yyyy}">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"
                    UniqueName="Status">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DateClosed" HeaderText="DateClosed" SortExpression="DateClosed"
                    UniqueName="DateClosed" DataFormatString="{0:dd/MM/yyyy}">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings UserControlName="InvestigationDetailsControl.ascx" EditFormType="WebUserControl">
                <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
                <PopUpSettings Width="500px" />
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>
</section>
<telerik:RadInputManager runat="server" ID="RadInputManager1" Enabled="true">
    <telerik:TextBoxSetting BehaviorID="TextBoxSetting1">
    </telerik:TextBoxSetting>
</telerik:RadInputManager>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
correct can someone take a look and let me know if you see the proble.
Perry
Top achievements
Rank 1
 asked on 25 Aug 2017
3 answers
532 views
Hi

I am using Rad editor Version Q1 2011.
I am using editor print functionality to print. Is there any way to add custom header and footer on each page.

Or i can manage if you can provide me any way to add custom header and footer in PDF export.

Please help me.

Regards
Atul Kumar Srivastav
Rumen
Telerik team
 answered on 25 Aug 2017
0 answers
144 views

Hello,

im wondering if it is possible to add a line with 'sep=;' to a csv export. Our code currently exports csv files with the semicolon delimiter however excel does not always recognize this as the delimiter and takes the comma instead. This produces some unwanted effects.

Is it possible to edit the generated excel after it is generated to add this information?

 

Thanks

Johan
Top achievements
Rank 1
 asked on 25 Aug 2017
0 answers
216 views

I Have a radgrid using batch edit mode, with insert & edit item templates.

Grid is populated using OnNeedDataSource.

I also have RadAjaxManager.

There are RequiredFieldValidators in place to prevent fields being left empty. This shows an asterix next to each field that fails validation.

ValidationSettings have been configured to set ValidationGroup.

However, I am unable to get validation summary to display the 'ErrorMessage' to the user if a field is left empty and 'save' button clicked.

I am using Telerik® UI for ASP.NET AJAX, v4.0.30319.

Below is a very simple example to demonstrate the issue.

Is there some configuration I have missed either in the grid or in RadAjaxManager?

Thanks

Jason

 

aspx

001.<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
002. 
003.<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
004. 
005.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
006. 
007.<html xmlns="http://www.w3.org/1999/xhtml">
008.<head runat="server">
009.    <title></title>
010.    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
011.</head>
012.<body>
013.    <form id="form1" runat="server">
014.    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
015.        <Scripts>
016.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
017.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
018.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
019.        </Scripts>
020.    </telerik:RadScriptManager>
021. 
022.    <script type="text/javascript">
023.    </script>
024.     
025.        <p>
026.            Click on a cell/row to place it in edit mode.
027.        </p>
028.        <p>
029.            Edit TextData, leave blank > Save: Validation summary should appear?
030.        </p>
031. 
032.    <telerik:RadGrid ID="radGrid" runat="server" Width="100%" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" PageSize="12"
033.                        OnNeedDataSource="radGrid_NeedDataSource"
034.                        OnItemDataBound="radGrid_ItemDataBound"
035.                        OnPreRender="radGrid_PreRender"
036.                        OnBatchEditCommand="radGrid_BatchEditCommand"
037.                        OnItemCreated="radGrid_ItemCreated"
038.                        AllowAutomaticUpdates="True"
039.                        AllowAutomaticInserts="True"
040.                        ValidationSettings-EnableValidation="true">
041.        <MasterTableView DataKeyNames="Id" CommandItemDisplay="Top" EditMode="Batch" AutoGenerateColumns="False">
042.            <BatchEditingSettings EditType="Row"/>
043.            <SortExpressions>
044.                <telerik:GridSortExpression FieldName="Id" SortOrder="Ascending"/>
045.            </SortExpressions>
046.            <Columns>
047.                <telerik:GridTemplateColumn UniqueName="Id" SortExpression="Id" HeaderText="ID">
048.                    <ItemTemplate>
049.                        <telerik:RadLabel runat="server" ID="Id" Text='<%# Eval("Id") %>'/>
050.                    </ItemTemplate>
051.                    <InsertItemTemplate>
052.                        <telerik:RadTextBox runat="server" ID="Id" Text='<%# Eval("Id") %>'/>
053.                        <asp:RequiredFieldValidator runat="server" ID="ValidateId" ControlToValidate="Id" EnableClientScript="True" ForeColor="Red" ErrorMessage="ID is required" Text="*" Display="Static"/>
054.                    </InsertItemTemplate>
055.                    <EditItemTemplate>
056.                        <telerik:RadLabel runat="server" ID="Id" Text='<%# Eval("Id") %>'/>
057.                    </EditItemTemplate>
058.                </telerik:GridTemplateColumn>
059. 
060.                <telerik:GridTemplateColumn UniqueName="TextData" SortExpression="TextData" HeaderText="Description">
061.                    <ItemTemplate>
062.                        <telerik:RadLabel runat="server" ID="TextData" Text='<%# Eval("TextData") %>'/>
063.                    </ItemTemplate>
064.                    <InsertItemTemplate>
065.                        <telerik:RadTextBox runat="server" ID="TextData" Text='<%# Eval("TextData") %>'/>
066.                        <asp:RequiredFieldValidator runat="server" ControlToValidate="TextData" EnableClientScript="True" ForeColor="Red" ErrorMessage="Text data is required" Text="*" Display="Static" ValidationGroup="RadGridValidation"/>
067.                    </InsertItemTemplate>
068.                    <EditItemTemplate>
069.                        <telerik:RadTextBox runat="server" ID="TextData" Text='<%# Eval("TextData") %>'/>
070.                        <asp:RequiredFieldValidator runat="server" ControlToValidate="TextData" EnableClientScript="True" ForeColor="Red" ErrorMessage="Text data is required" Text="*" Display="Static" ValidationGroup="RadGridValidation"/>
071.                    </EditItemTemplate>
072.                </telerik:GridTemplateColumn>
073. 
074.                <telerik:GridTemplateColumn UniqueName="NumericData" SortExpression="NumericData" HeaderText="Selling Rate">
075.                    <ItemTemplate>
076.                        <telerik:RadLabel runat="server" ID="NumericData" Text='<%# Eval("NumericData") %>'/>
077.                    </ItemTemplate>
078.                    <InsertItemTemplate>
079.                        <telerik:RadNumericTextBox runat="server" ID="NumericData" Type="Number" Value='<%# Eval("NumericData") %>' MinValue="0" > 
080.                            <NumberFormat AllowRounding="false" KeepNotRoundedValue="false" DecimalDigits="5"/>
081.                        </telerik:RadNumericTextBox>
082.                        <asp:RequiredFieldValidator runat="server" ControlToValidate="NumericData" EnableClientScript="True" ForeColor="Red" ErrorMessage="Numeric data is required" Text="*" Display="Static" ValidationGroup="RadGridValidation"/>
083.                    </InsertItemTemplate>
084.                    <EditItemTemplate>
085.                        <telerik:RadNumericTextBox runat="server" ID="NumericData" Type="Number" Value='<%# Eval("NumericData") %>' MinValue="0" > 
086.                            <NumberFormat AllowRounding="false" KeepNotRoundedValue="false" DecimalDigits="5"/>
087.                        </telerik:RadNumericTextBox>
088.                        <asp:RequiredFieldValidator runat="server" ControlToValidate="NumericData" EnableClientScript="True" ForeColor="Red" ErrorMessage="Numeric Data is required" Text="*" Display="Static" ValidationGroup="RadGridValidation"/>
089.                    </EditItemTemplate>
090.                </telerik:GridTemplateColumn>
091.            </Columns>
092.        </MasterTableView>
093.        <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
094. 
095.        <ValidationSettings EnableValidation="true" CommandsToValidate="PerformInsert,Update" ValidationGroup="RadGridValidation"></ValidationSettings>
096.        <ClientSettings AllowKeyboardNavigation="true"></ClientSettings>
097.    </telerik:RadGrid>
098. 
099.    <%-- Validation Summary --%>
100.    <asp:ValidationSummary id="ValidationSummary" runat="server" ShowMessageBox="False" ShowSummary="True" DisplayMode="BulletList" HeaderText="Unable to commit changes:" ValidationGroup="RadGridValidation"/>
101. 
102.    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
103.        <AjaxSettings>
104.            <telerik:AjaxSetting AjaxControlID="radGrid">
105.                <UpdatedControls>
106.                    <telerik:AjaxUpdatedControl ControlID="radGrid" LoadingPanelID="RadAjaxLoadingPanel"/>
107.                </UpdatedControls>
108.            </telerik:AjaxSetting>
109. 
110.            <telerik:AjaxSetting AjaxControlID="ValidationSummary">
111.                <UpdatedControls>
112.                    <telerik:AjaxUpdatedControl ControlID="ValidationSummary" />
113.                </UpdatedControls>
114.            </telerik:AjaxSetting>
115. 
116.        </AjaxSettings>
117.    </telerik:RadAjaxManager>
118.    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Modal="True" InitialDelayTime="250"/>
119.    </form>
120.</body>
121.</html>

 

c#

using System;
using System.Data;
using Telerik.Web.UI;
using System.Collections;
 
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    protected void radGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable table = new System.Data.DataTable();
        table.Columns.Add("Id", typeof(int));
        table.Columns.Add("TextData", typeof(String));
        table.Columns.Add("NumericData", typeof(Double));
        table.Rows.Add(1, "A string", "10");
        table.Rows.Add(2, "A string", "20");
        table.Rows.Add(3, "A string", "30");
        table.Rows.Add(4, "A string", "40");
        table.Rows.Add(5, "A string", "50");
 
        radGrid.DataSource = table;
        radGrid.VirtualItemCount = table.Rows.Count;
    }
 
    protected void radGrid_PreRender(object sender, EventArgs e)
    {
 
    }
 
    protected void radGrid_ItemCreated(object sender, GridItemEventArgs e)
    {
 
    }
 
    protected void radGrid_ItemDataBound(object sender, GridItemEventArgs e)
    {
 
    }
 
    protected void radGrid_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
    {
        // update / insert commands from grid
        foreach (GridBatchEditingCommand command in e.Commands)
        {
            if ((command.Type == GridBatchEditingCommandType.Update))
            {
                Hashtable newValues = command.NewValues;
 
                String Id = newValues["Id"].ToString();
 
                // Update record
            }
 
            if ((command.Type == GridBatchEditingCommandType.Insert))
            {
                Hashtable newValues = command.NewValues;
 
                String Id = newValues["Id"].ToString();
 
                // Insert record
            }
        }
    }
}

 

 

Jason
Top achievements
Rank 1
 asked on 25 Aug 2017
0 answers
166 views


Note: We are using MM/dd/yyyy as Internal Date format to prevent issue while inserting or updating value.

Steps to reproduce:
When we use dd-MM-yyyy and yyyy-dd-MM Date DisplayFformat for RadDatePicker/RadDateTimePicker control as well as view mode in Radgrid Batch Edit mode it's render behaviour is inconsistent
1. When dd is less than or equal to 12 then while rendering in edit mode Month and Date is interchanged
2. When dd is greather than 12 then while rendering in edit mode Month and Date is rendered correctly.

 

Arvind
Top achievements
Rank 1
 asked on 25 Aug 2017
7 answers
497 views
I am wanting to change the background color of an appointment based on the value in the appointment description.  I have this working using the pallet from Drawing.Color.  The user would like much lighter colors than those in the pallet.  I tried passing in the hex value for the color, but then I get the default background color.  (see below).  My question is, is there a way to lighten the defined colors or pass in a different color than what is defined in Drawing.Color?  All of your examples that I have seen seem to require a color from System.Color

Color[] RadSchedulerColors = new Color[15];
RadSchedulerColors[0] = ColorTranslator.FromHtml("#80F4A460");
Peter Milchev
Telerik team
 answered on 25 Aug 2017
1 answer
400 views

I am working on a simple form to generate a report in Excel format. There are a few text boxes and date pickers and then a button. The event for the button runs a length SQL query and then creates an excel file with the results and presents the file using Response.OutputStream. The page in itself works fine but I'd like to add a RadAjaxLoadingPanel while the button event is working. I've tried at least a half dozen different methods and it seems all I can ever get is either the loading panel goes off but the file is never presented  or nothing happens at all. Can someone point me to a demo or something that does this? 

 

I've tried the AjaxLoadingPanel Demo and the AjaxLoadingPanel - Explicit Show/Hide

Marin Bratanov
Telerik team
 answered on 24 Aug 2017
1 answer
125 views
I have search box for size column in telerik grid row. Now when I try to edit particular cell in batch edit mode, default value doesn't not appear for search box. I've attached screenshot.

What could be the root cause. 
In other edit mode : inline, Embedded form and Popup its working.
Marin Bratanov
Telerik team
 answered on 24 Aug 2017
10 answers
198 views

I have a hierarchical grid with two levels.

The Parent grid rows contain a student's ID (student_reference) , Name, course id (Expr1) , class code (Group) and the total number of notes created for that student.

The Detail rows contain the note details ( Student ref ,Note Type,Subject, Note content, Date created and ID of the member of staff who created the note)

When a new note is created it is added to the detail grid and the notes database table.

I now need to know how to update the parent row with the total number of notes when a new note is added. I need to also update the associated dataset which is a property of the User control containing the grid..

Rows can only be added to the notes database table. They cannot be deleted or updated.

Below is the definition of the grid from the ascx file.

<telerik:radgrid runat="server" id="RadGridClassOverview" showfooter="false" width="100%" enableajax="true" showstatusbar="true"
    allowaddingrecords="false" autogeneratecolumns="false" allowsorting="false" allowpagesizeselection="False"
    onitemdatabound="OnItemDataBoundHandler" ondetailtabledatabind="RadGridOverview_DetailTableDataBind"
    allowpaging="True" skin="Bootstrap" pagesize="30" onneeddatasource="RadGridClassOverview_NeedDataSource"
    OnItemCommand="RadGridClassOverview_ItemCommand" onprerender="RadGridClassOverview_PreRender" cssclass="table table-striped">
    <PagerStyle Mode="NextPrev" Position="Bottom" PageSizeControlType="RadComboBox"></PagerStyle>
    <MasterTableView AutoGenerateColumns="false" DataKeyNames="Student_reference, Expr1, Group" TableLayout="Auto" HierarchyLoadMode="ServerOnDemand" EnableHierarchyExpandAll="true" HierarchyDefaultExpanded="false" EditMode="EditForms" RetainExpandStateOnRebind="False">
                    <DetailTables>
            <telerik:GridTableView AutoGenerateColumns="false" DataKeyNames="note_ref" Width="100%"   EnableHierarchyExpandAll="true" CommandItemDisplay="Top" EditMode="EditForms" name="GridNotes">
                <CommandItemSettings AddNewRecordText="Create New Note" />
                     <NoRecordsTemplate>
      <div>
        There are no notes to display</div>
    </NoRecordsTemplate>
                 <Columns>
                    <telerik:GridButtonColumn CommandName="Edit" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" Text="View" UniqueName="View">
                    </telerik:GridButtonColumn>
                     <telerik:GridBoundColumn DataField="student_id"  HeaderText="note_ref" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="Student_ref" Display="false" runat="server" ReadOnly="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="note_ref" DataType="System.Int32" HeaderText="note_ref" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="note_ref" Display="false" runat="server" ReadOnly="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="course" HeaderText="code" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="course" Display="false" runat="server" ItemStyle-Width="10px" HeaderStyle-Width="10px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="course_name" HeaderText="Subject" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="qualname" HeaderStyle-Width="200px" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="noteType" HeaderText="Type" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="noteType" Display="false">
                    </telerik:GridBoundColumn>
                      <telerik:GridBoundColumn DataField="typeDesc" HeaderText="Note Type" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="typeDesc" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn DataField="created" HeaderText="Created" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="created" DataFormatString="{0:dd/MM/yyyy}">
                    </telerik:GridDateTimeColumn>
                    <telerik:GridBoundColumn DataField="created_by" HeaderText="Created" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="created_by" Display="false" ItemStyle-HorizontalAlign="Left">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="note_content" HeaderText="Created" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="note_content" Display="false" ItemStyle-HorizontalAlign="Center">
                    </telerik:GridBoundColumn>
                </Columns>
                  <EditFormSettings EditFormType="Template">
            <EditColumn UniqueName="View">
            </EditColumn>
                <FormTemplate>
                <table style="width: 85%" border="1" >
                     <asp:Panel ID="pnlAdd" runat="server" Visible="false">
                    <tr style="border:solid">
                                <td colspan="2"><b>Create New Note</b><br /></td>
                  </tr>
                              <tr>
                                <td colspan="2">
                                    <asp:Label ID="lblqualcode" runat="server"  Text='' ></asp:Label>
                                    <br />
                                    Select Note Type<br />
                                        <telerik:RadComboBox ID="RadComboBoxNoteType" runat="server" EmptyMessage="Select NoteType"  CausesValidation="False"
                                                   HighlightTemplatedItems="true" Height="100px" Width="450px" DropDownWidth="450px"  EnableAutomaticLoadOnDemand="False" AutoPostBack="true"
                                                  AppendDataBoundItems="true" Visible="true"   CssClass="ComboBox" OnSelectedIndexChanged="RadComboBoxNoteType_SelectedIndexChanged">
                   </telerik:RadComboBox>
                                </td>
                            </tr><tr><td colspan="2">Mindset habits<br />Please select the mindset habits to link to this note</td></tr>
                        <tr><td colspan="2">
                            <telerik:RadListBox ID="ListBoxhabits" runat="server" RenderMode="Lightweight" CheckBoxes="true">
                            <Items>
                           <telerik:RadListBoxItem Text=" Time" />
                          <telerik:RadListBoxItem Text=" Engagement" />
                          <telerik:RadListBoxItem Text=" Response" />
                          <telerik:RadListBoxItem Text=" Resources" />
                         <telerik:RadListBoxItem Text=" Organisation" />
                       </Items>
                     </telerik:RadListBox>
                            </td></tr>
                                
                                   <tr>
                                <td colspan="2">
                                    Enter Note content
                <br />
                                  <asp:TextBox ID="txtNoteContent" runat="server" Text=""  CssClass="notecontent"  TextMode="MultiLine" BorderStyle="Solid" style="width:450px">
                                 </asp:TextBox><br />
                                   <br />
                     <br /><br />
                                  <asp:Label ID="lblMessage" runat="server"  Text=''></asp:Label>
                                    </td>
                                   </tr>
                                 <tr>
                                <td  colspan="2">
                                         <asp:Button ID="btnSave" CausesValidation="False" Text="Save"
                                        runat="server"  AutoPostBack="True" CommandName="PerformInsert"></asp:Button>&nbsp;
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                        CommandName="Cancel"></asp:Button>
                                </td>
                            </tr>
                            </asp:Panel>
                      <asp:Panel ID="Paneldetail" runat="server" Visible="false">
                    <tr>
                                <td colspan="2">
                                    <b>Note Details</b><br />
                                </td>
                    </tr>
                     <tr>
                                <td colspan="2">
                               <asp:Label ID="LabelDetails" runat="server"  Text='<%# Bind("note_content") %>'></asp:Label>
                        </td>
                    </tr>
                       </asp:Panel>
                </table>
            </FormTemplate>
        </EditFormSettings>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
             <telerik:GridBoundColumn DataField="Student_reference" HeaderText="Student ID" UniqueName="Student_reference" runat="server" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true">
            </telerik:GridBoundColumn>
             <telerik:GridBoundColumn DataField="Expr1" HeaderText="class" UniqueName="Expr1" Display="false" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Group" HeaderText="class" UniqueName="Group" Display="false" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
            </telerik:GridBoundColumn>
            <telerik:GridCalculatedColumn DataFields="p_forenames,p_surname" Expression='{0}+"&nbsp;" +{1}' HeaderText="Name" UniqueName="student_name" Display="True" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250px">
            </telerik:GridCalculatedColumn>
            <telerik:GridBoundColumn DataField="p_surname" HeaderText="Name" UniqueName="p_surname" Display="false" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="p_forenames" HeaderText="Name" UniqueName="p_forenames" Display="False" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="attendance" HeaderText="Attendance" UniqueName="attendance" DataFormatString="{0:N0}%"  Display="True"  HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"  ItemStyle-Width="100px">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="spms_level" HeaderText="SPMS Level" UniqueName="spms_level" Display="True" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
            </telerik:GridBoundColumn>
            <telerik:GridButtonColumn DataTextField="total_notes" HeaderText="Total Notes" UniqueName="total_notes" runat="server" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" CommandName="ViewNotes" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"  ItemStyle-Width="100px"  HeaderStyle-Wrap="true">
            </telerik:GridButtonColumn>
        </Columns>
         <PagerStyle Mode="NextPrev" Position="Bottom" PageSizeControlType="RadComboBox"></PagerStyle>
           </MasterTableView>
          <ClientSettings EnablePostBackOnRowClick="true">
           <Selecting AllowRowSelect="true"></Selecting>
        </ClientSettings>
     <SelectedItemStyle BackColor="Gray" BorderColor="Blue" BorderStyle="Dashed" BorderWidth="1px" />
</telerik:radgrid>

 

 

Pavlina
Telerik team
 answered on 24 Aug 2017
1 answer
230 views
I want to add Separator in RadToolBar as per attached screenshot

<telerik:RadToolBar ID="accoADEGridToolBar" runat="server"
                            OnClientButtonClicking="onToolBarClientButtonClicking"
                            AutoPostBack="true"
                            Width="99.50%" OnClientLoad="onToolBarClientLoad" OnLoad="accoADEGridToolBar_Load">
                            <Items>
                                <telerik:RadToolBarButton Text="Refresh" CommandName="RebindGrid" ImageUrl="Images/Refresh.gif">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarDropDown CssClass="drp_selectedMode" Text="Edit Mode:" >
                                    <Buttons>
                                        <telerik:RadToolBarButton CssClass="drp_BatchEditMode" Text="Batch" Value="Batch" CommandName="Batch"></telerik:RadToolBarButton>
                                        <telerik:RadToolBarButton CssClass="drp_EditFormsEditMode" Text="Embedded Form" Value="Embedded Form" CommandName="EditForms"></telerik:RadToolBarButton>
                                        <telerik:RadToolBarButton CssClass="drp_InPlaceEditMode" Text="Inline" Value="Inline" CommandName="InPlace"></telerik:RadToolBarButton>
                                        <telerik:RadToolBarButton CssClass="drp_PopUpEditMode" Text="Modal Dialog" Value="Modal Dialog" CommandName="PopUp"></telerik:RadToolBarButton>
                                    </Buttons>
                                </telerik:RadToolBarDropDown>
                                <telerik:RadToolBarButton Text="Edit selected" CommandName="EditSelected" ImageUrl="Images/Edit.gif" Visible='<%# accoADEGrid.EditIndexes.Count == 0 && accoADEGrid.MasterTableView.EditMode != GridEditMode.Batch %>'>
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton Text="Save changes" CommandName="UpdateEdited" ImageUrl="Images/Update.gif" Visible='<%# accoADEGrid.EditIndexes.Count > 0 %>'>
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton Text="Save pending changes" CommandName="SaveChanges" PostBack="false" ImageUrl="Images/Update.gif" Visible='<%# accoADEGrid.MasterTableView.EditMode == GridEditMode.Batch %>'>
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton Text="Insert new row" PostBack="<%# accoADEGrid.MasterTableView.EditMode != GridEditMode.Batch %>" CommandName="InitInsert" ImageUrl="Images/AddRecord.gif" Visible='<%# !accoADEGrid.MasterTableView.IsItemInserted %>'>
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton Text="Save new row" CommandName="PerformInsert" ImageUrl="Images/Insert.gif" Visible='<%# accoADEGrid.MasterTableView.IsItemInserted %>'>
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton Text="Cancel (all)" CommandName="CancelAll" ImageUrl="Images/Cancel.gif" Visible='<%# accoADEGrid.EditIndexes.Count > 0 || accoADEGrid.MasterTableView.IsItemInserted %>'>
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton Text="Cancel pending changes" CommandName="CancelChanges" ImageUrl="Images/Cancel.gif" Visible='<%# accoADEGrid.MasterTableView.EditMode == GridEditMode.Batch %>'>
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton Text="Delete selected" CommandName="DeleteSelected" ImageUrl="Images/Delete.gif" Visible="<%# accoADEGrid.MasterTableView.EditMode != GridEditMode.Batch %>">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton Text="Show child items" CommandName="ShowLinkedInstance" ImageUrl="Images/Edit.gif" Enabled="false" Visible='<%# liID.Value != "" && !this.Page.ClientQueryString.Contains("RelationID") %>'>
                                </telerik:RadToolBarButton>
                                
                                <telerik:RadToolBarButton PostBack="false" Text="Show Query" OuterCssClass="rightButton showHideQueries" CommandName="ShowQuery" ImageUrl="Images/Refresh.gif" Enabled="true" ClientIDMode="Static"></telerik:RadToolBarButton>
                                <telerik:RadToolBarButton Text="Excel Export" OuterCssClass="rightButton" CommandName="ExportToExcel" ImageUrl="Images/Edit.gif" Enabled="true" ClientIDMode="AutoID">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton Text="Fullscreen" OuterCssClass="rightButton OpenInFullscreen" CommandName="Fullscreen" ImageUrl="Images/Fullscreen.png" Enabled="true" ClientIDMode="AutoID" Visible='<%# ( Request.QueryString["DisplayMode"] != null && Request.QueryString["DisplayMode"] == "WebPart") %>'>
                                </telerik:RadToolBarButton>
                            </Items>
                        </telerik:RadToolBar>
Magdalena
Telerik team
 answered on 24 Aug 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?