Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
77 views
Hellow

I am not adding an imageurl to radmenu items. But there is some space dedicated for rendering the menu icons. How can I trim these spaces?

Thanks
Anly
Princy
Top achievements
Rank 2
 answered on 16 Jul 2013
3 answers
134 views
Hi!

I use Treelist (AllowLoadOnDemand = "True") if I know where there are no nested elements, how do I specify that they do not need to draw?
Robin
Top achievements
Rank 1
 answered on 16 Jul 2013
2 answers
49 views
Hello.

When I expand the icon for a set of standards, leave the results expanded, and then do a second standard search for a different standard the results are already partially expanded which are supposed to be not expanded as noted in attached pictures.

in code-hind

        /// <summary>
        /// Handler for the Search Button
        /// </summary>
        protected void SearchHandler(object sender, CriteriaController criteriaController)
        {
            if (radTreeResults.Visible)
            {
                if (DtGrid == null) DoSearch();

//DataView dv = new DataView(DtGrid, "ParentID is null", "", DataViewRowState.CurrentRows);                
                //radTreeResults.DataSource = dv;
                radTreeResults.DataSource = DtGrid;
                radTreeResults.DataBind();
            } 
            else
                radTreeResults.Visible = true;
        }
        
        protected void TreeListDataSourceNeeded(object sender, EventArgs e)
        {
            if (DtGrid == null) DoSearch(); 
            radTreeResults.DataSource = DtGrid;
        }
        protected void radTreeResults_ItemDataBound(object sender, TreeListItemDataBoundEventArgs e)
        {
            if (e.Item is TreeListDataItem)
            {
                TreeListDataItem item = e.Item as TreeListDataItem;
                item.FindControl("lnkExpandAll").Visible = item.CanExpand;
                item.FindControl("lnkCollapseAll").Visible = item.CanExpand;
                if (item.Expanded)
                {
                    item.FindControl("lnkCollapseAll").Visible = item.Expanded;
                    item.FindControl("lnkExpandAll").Visible = false;
                }
            }
        }     

        protected void radTreeResults_ItemCommand(object sender, TreeListCommandEventArgs e)
        {
            if (e.CommandName == RadTreeList.ExpandCollapseCommandName)
            {
                if ((e.Item as TreeListDataItem).HierarchyIndex.NestedLevel == 0 && e.CommandArgument.ToString() == "ExpandAll")
                {
                    e.Canceled = true;
                    if (!(e.Item as TreeListDataItem).Expanded)
                    {
                        radTreeResults.ExpandItemToLevel((e.Item as TreeListDataItem), 10);
                    }
                    else
                    {
                        radTreeResults.CollapseAllItems();
                    }
                }
            }
        }

in .aspx

 <telerik:RadTreeList ID="radTreeResults" runat="server" ParentDataKeyNames="ParentID" Visible="False"
            DataKeyNames="StandardID" Skin="Office2010Silver"  Width="100%" Height="100%"
            AutoGenerateColumns="False" OnNeedDataSource="TreeListDataSourceNeeded" 
            OnItemCommand="radTreeResults_ItemCommand" OnItemDataBound="radTreeResults_ItemDataBound" ShowTreeLines="false">
            <ClientSettings Scrolling-AllowScroll="true" Scrolling-UseStaticHeaders="true">
                <Resizing ResizeMode="AllowScroll" AllowColumnResize="true" EnableRealTimeResize="true" />
                <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="560px" />
                <ClientEvents OnTreeListCreated="TreeListCreated" />
            </ClientSettings>
            <Columns>
                <telerik:TreeListSelectColumn HeaderStyle-Width="40px" UniqueName="SelectColumn">
                </telerik:TreeListSelectColumn>
                <telerik:TreeListTemplateColumn HeaderStyle-Width="120px" DataField="NameDisplayText"
                    UniqueName="NameDisplayText" HeaderText="Name" >
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkExpandAll" runat="server" CommandName="ExpandCollapse"
                            CommandArgument="ExpandAll" Text="+" Visible="true"></asp:LinkButton>
                        <asp:LinkButton ID="lnkCollapseAll" runat="server" CommandName="ExpandCollapse"
                            CommandArgument="CollapseAll" Text="-" Visible="false"></asp:LinkButton>
                        <asp:HyperLink ID="lnkStandardName" runat="server" Target="_blank" NavigateUrl='<%#"~/Record/StandardsPage.aspx?xID=" + Eval("EncryptedID") %>'
                            Visible="True" Style="color: Blue;" StandardID='<%# Eval("EncryptedID") %>' StandardName='<%# Eval("StandardName") %>' ><%# Eval("NameDisplayText")%></asp:HyperLink>                        
                    </ItemTemplate>
                </telerik:TreeListTemplateColumn>
                <telerik:TreeListBoundColumn HeaderStyle-Width="300px" DataField="StandardText" UniqueName="StandardText"
                    HeaderText="Text" />
                <telerik:TreeListBoundColumn HeaderStyle-Width="45px" DataField="Grade" UniqueName="Grade"
                    HeaderText="Grade" />
                <telerik:TreeListBoundColumn HeaderStyle-Width="100px" DataField="Subject" UniqueName="Subject"
                    HeaderText="Subject" />
                <telerik:TreeListBoundColumn HeaderStyle-Width="100px" DataField="Course" UniqueName="Course"
                    HeaderText="Course" />
                <telerik:TreeListBoundColumn HeaderStyle-Width="100px" DataField="Level" UniqueName="Level"
                    HeaderText="Level" />
                <telerik:TreeListBoundColumn HeaderStyle-Width="50px" DataField="ItemCount" UniqueName="ItemCount"
                    HeaderText="Items" />
                <telerik:TreeListBoundColumn HeaderStyle-Width="75px" DataField="ResourceCount" UniqueName="ResourceCount"
                    HeaderText="Resources" />
            </Columns>
        </telerik:RadTreeList>
Robin
Top achievements
Rank 1
 answered on 16 Jul 2013
2 answers
208 views
I'm trying to bind date column to RadGrid with auto generated columns. binding works fine but the filter options (contains, equal,..) does not showing up when i click on the filter icon, it just cause a post back. How ever if i bind the date column as a string then it's starts working. whats the issue here?

 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

        <script type="text/javascript">
        

            function doFilter(sender, eventArgs) {
                if (eventArgs.keyCode == 13) {
                    eventArgs.cancelBubble = true;
                    eventArgs.returnValue = false;
                    if (eventArgs.stopPropagation) {
                        eventArgs.stopPropagation();
                        eventArgs.preventDefault();
                    }
                    var masterTableView = $find("<%= gridSearchL3.ClientID %>").get_masterTableView();
                    var index = sender.parentNode.cellIndex; //index of the current column 
                    var columns = masterTableView.get_columns();
                    var uniqueName = columns[index].get_uniqueName();
                    masterTableView.filter(uniqueName, sender.value, Telerik.Web.UI.GridFilterFunction.Contains);
                }
            }

            
        var columnUniquName = ""; 

            function removeCssClass(className, element) {
                element.className = element.className.replace(className, "").replace(/^\s+/, '').replace(/\s+$/, '');
            }

            function addCssClass(className, element) {
                if (element.className.indexOf(className) < 0) {
                    element.className = element.className + " " + className;
                }
            }
            function onRowClick(sender, eventArgs) {
                var radGrid = sender;
                var index = eventArgs.get_itemIndexHierarchical();
                var dataItem = radGrid.get_masterTableView().get_dataItems()[index];
                var row = dataItem.get_element();
                var checkBox = row.children[0].children[0];
                if (!checkBox.checked) {
                    checkBox.checked = true;
                    addCssClass("rgSelectedRow", row);
                }
                else {
                    checkBox.checked = false;
                    removeCssClass("rgSelectedRow", row);
                }

                CheckHeaderCheckBoxIfNeeded(radGrid);
            }

            function changeAllowPaging() {
                var grid = $find("<%= gridSearchL3.ClientID %>");
                var pagerRow = grid.get_masterTableView().get_element().tFoot;
                pagerRow.style.display = "none";
                grid.MasterTableView.set_pageSize(grid.MasterTableView.PageSize * grid.MasterTableView.PageCount)
                return false;

            } 

            function CheckHeaderCheckBoxIfNeeded(radGrid) {
               
                var checkHeaderCheckBox = true;
                var dataItems = radGrid.get_masterTableView().get_dataItems();
              
                for (var i = 0; i < dataItems.length; i++) {
                    var dataItem = dataItems[i];
                    var row = dataItem.get_element();
                    var ckeckBox = row.children[0].children[0];
                    if (!ckeckBox.checked) {
                        checkHeaderCheckBox = false;
                    }
                }

                SelectCheckBox(checkHeaderCheckBox);
            }

            function setSelectedAfterPostback(rowIDs, rowCount) {
                var arrRowIDs = rowIDs.split(",");
                for (var i = 0; i < arrRowIDs.length - 1; i++) {
                    var row = document.getElementById(arrRowIDs[i]);
                    var checkBox = row.children[0].children[0];
                    checkBox.checked = true;
                    addCssClass("rgSelectedRow", row);
                }
                if (rowCount == arrRowIDs.length - 1) {
                    SelectCheckBox(true);
                }
            }

            function CheckBoxCheckedOnClient(rowID, chechBoxId) {
                var row = document.getElementById(rowID);
                var ckeckBox = document.getElementById(chechBoxId);
                if (ckeckBox.checked) {
                    addCssClass("rgSelectedRow", row);
                }
                else {
                    removeCssClass("rgSelectedRow", row);
                }
                var radGrid = $find("<%= gridSearchL3.ClientID %>");
                CheckHeaderCheckBoxIfNeeded(radGrid);
            }

            function SelectCheckBox(isChecked) {
                var checkBoxID = document.getElementById("<%= HiddenField.ClientID %>").value;
                var checkBox = document.getElementById(checkBoxID);
                checkBox.checked = isChecked;
            }

            function CheckUnCheckAll(id) {
                var sender = document.getElementById(id);
                var grid = $find("<%=gridSearchL3.ClientID %>");
                var dataItems = grid.get_masterTableView().get_dataItems();
                for (var i = 0; i < dataItems.length; i++) {
                    var dataItem = dataItems[i];
                    var row = dataItem.get_element();
                    var checkBox = row.children[0].children[0];
                    if (sender.checked) {
                        checkBox.checked = true;
                        addCssClass("rgSelectedRow", row);
                    }
                    else {
                        checkBox.checked = false;
                        removeCssClass("rgSelectedRow", row);
                    }
                }
            }

               function getColumnCliecked(cu) {  
                columnUniquName = cu;  
                
    }  

            function getPDF(docNum, rev,dochTID) {

                WebService.getFilePath(docNum, rev,dochTID, OnPDFSucceed, OnPDFFailed);
            }

            function OnPDFSucceed(result) {
                //alert(result);
                openPDF(result);
            }

            function OnPDFFailed(err) {
                alert(err);
            }

            function openPDF(file) {
                window.open("OpenPDF.aspx?File=" + file);
            }

            
        </script>

    </telerik:RadCodeBlock>

<telerik:RadGrid ID="gridSearchL3" runat="server" AllowPagg="True"  
             GridLines="None" Skin="Office2007" Height="415px" 
             OnExcelMLExportRowCreated="gridSearchL3_ExcelMLExportRowCreated" OnExcelMLExportStylesCreated="gridSearchL3_ExcelMLExportStylesCreated"
            OnGridExporting="gridSearchL3_GridExporting"  oninit="gridSearchL3_Init" OnNeedDataSource="RadGrid1_NeedDataSource"
            Font-Names="Eras Medium ITC" Font-Size="Small" PageSize="50" 
             AllowFilteringByColumn="True" onitemcreated="gridSearchL3_ItemCreated" 
            OnPageIndexChanged="gridSearchL3_PageIndexChanged"
          OnPageSizeChanged="gridSearchL3_PageSizeChanged"
             onselectedindexchanged="gridSearchL3_SelectedIndexChanged" 

             AllowSorting="True" ShowStatusBar="True" AllowPaging="True" CellSpacing="0" oncolumncreated="gridSearchL3_ColumnCreated1" 
                >
               <FilterItemStyle Font-Names="Eras Medium ITC" Font-Size="XX-Small" />
               <GroupingSettings CaseSensitive="False" />
            <ExportSettings Excel-Format="ExcelML" ExportOnlyData="True" 
                FileName="PinC Group" IgnorePaging="True" OpenInNewWindow="True">
                <Excel Format="ExcelML" />
            </ExportSettings>
            <ClientSettings>
                <ClientEvents OnRowClick="onRowClick" OnRowSelected="RowSelected" />
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    
            </ClientSettings>
            <AlternatingItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            <GroupHeaderItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            <SortingSettings EnableSkinSortStyles="false" /> 
            <MasterTableView ClientDataKeyNames="Document #,Revision,hID,ID" Font-Names="Eras Medium ITC" 
                   Font-Size="X-Small">
           
                <CommandItemSettings  ExportToPdfText="Export to Pdf" />
                 
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="template">
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true" 
                                OnCheckedChanged="ToggleRowSelection" />
                        </ItemTemplate>
                        <HeaderTemplate>
                            <asp:CheckBox ID="CheckBoxHeader" runat="server" AutoPostBack="true" 
                                OnCheckedChanged="Header_checkedChange" />
                        </HeaderTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridButtonColumn CommandName="Select" Text="View" 
                        UniqueName="LinkColumn">
                    </telerik:GridButtonColumn>
                   </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
                <ItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                <FilterItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            </MasterTableView>
            <EditItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            <FooterStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            <HeaderStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            <FilterItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
               <CommandItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
               <ActiveItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
               <ItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
               <PagerStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" 
                   HorizontalAlign="Left" Mode="NextPrevNumericAndAdvanced" />
               <SelectedItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
               <FilterMenu Font-Names="Eras Medium ITC" Font-Size="X-Small" 
                Skin="Office2007" EnableRoundedCorners="True">
               </FilterMenu>
               <HeaderContextMenu Font-Names="Eras Medium ITC" Font-Size="X-Small" 
                   Skin="Simple">
               </HeaderContextMenu>
               </telerik:RadGrid>

My SQL Query.

select distinct h.DocumentRevisionID 'ID',h.DocumentHeaderID 'hID', h.DocumentNumber 'Document #', h.DocumentTitle 'Document Title',h.Revision as 'Revision',CASE CONVERT(date,[RevisionDate],103)  WHEN '01/01/1991' Then '' else CONVERT(date,[RevisionDate],103) end as 'Rev Date'   from tblDocumentHeader h    
Chamara
Top achievements
Rank 1
 answered on 16 Jul 2013
3 answers
138 views
Hi, I am somewhat new to working with these controls, so I am probably missing something.

We have a project that has multiple RadMultiPage/RadPageView/RadGrid controls. I am trying to implement a context menu for some of the grids to create a cell edit menu item. I have some existing examples and looked at examples on this site. I am seeing a behavior in some grids that when we right-click on empty space of the cell, the menu item shows. But if we right-click on the cell text data, the menu doesn't show at all (only show the browser default conext menu). Strangely, in other grids the exact opposite behavior happens. If we right-click on empty space of a cell, the menu doesn't show. But if we right-click on the text data of the cell, the menu items appear.

I tried searching this forum and didn't find anything matching this issue yet. I have tried comparing the RadContextMenu definition and the grid's ClientSettings/ClientEvents and don't see any major difference. Is this where I should be looking?

Telerik.Web.UI 2012.3.1308.40

Browsers: IE 8, FF 22

Thanks,
kernelk
Top achievements
Rank 1
 answered on 16 Jul 2013
0 answers
160 views
Good Day

I have posted this , but i could not reply to that post, so that is why i am starting a new post . I am using RadAsyncUpload which that is ajaxified. in my Page i have Ajax-toolkit Controls. When i use Telerik Ajax-manager i get a problem. i have attached a link to a Small project that i created that has the problem.

Link to a Problem Project

Thanks
Vuyiswa
Top achievements
Rank 2
 asked on 15 Jul 2013
6 answers
485 views
Hello,

I have a radgrid to which I recently added a history grid button.

<telerik:GridButtonColumn UniqueName="HistoryColumn" HeaderStyle-Width="18px" ButtonType="ImageButton"
      CommandName="History" Text="Get History" ImageUrl="~\Images\history.png">
</telerik:GridButtonColumn>

And I have a server side method in which I want to capture the id of the respective row of the history button and open a report from a report server that shows the history of the item.

Protected Sub RadGrid1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
If e.CommandName = "History" Then
Dim categoryId As String = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)"UniqueID").ToString
Dim url As String = "link&UniqueID=" & categoryId
End If
End Sub


I have the full URL from another developer and simply want to fire the event to open the URL when the user clicks the history button.  How do I do that?
Craig
Top achievements
Rank 1
 answered on 15 Jul 2013
2 answers
271 views
I'm having some issues setting a rad textbox value. In a JS function, I'm copying the text from a data array and filling the textbox.
var radTbLine = $find('radTbLine' + lineNum);
radTbLine.set_textBoxValue(arrPrevLines[y]);

When I debug the code, I can see the textbox has the new value all the way to the very end of the function. But the next time a function is triggered, the value is gone. When actually triggering this copy, I can see the value flash in the textbox and then immediately disappears. I made a test page with 2 textboxes and had js copy the text from one to the other, and that worked fine. This leads me to think that there is something else resetting my textbox, but since I stepped thru the code, I have no clue what that could be.

Is there any reason why I shouldn't try doing getElementById('radTbLine1_text').value = 'test';?
Josh
Top achievements
Rank 1
 answered on 15 Jul 2013
1 answer
128 views
Hello
when I open a radcombobox and go down the list of data with the scrollbar when I get alal end of the list also moves the scrollbar of the web page. It 'possible that if the focus is on the radcombobox mouse only moves the scrollbar of combo moves that without the web page? The scrollbar of the web page you just have to move if the mouse focus is on the page
Magdalena
Telerik team
 answered on 15 Jul 2013
2 answers
529 views
Hi,
 I am using the Q2 2013 release (2013.2.611.45) version of your controls. On the page I have two databound combos and a grid. The datasource for the grid uses control parameters linked to the two dropdowns. If the grid is in any other EditMode other than Batch, everything works as expected. Both dropdowns have code in the databound event to either select a specific item or add a 'Choose' item.

The grid is empty on initial page load and then once a Form is chosens from the dropdown it then populates with a list of pupils.

If I put the grid into Batch EditMode then when I select a form from the dropdown I get the following error: 

Collection was modified; enumeration operation may not execute.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Collection was modified; enumeration operation may not execute.]
   System.Web.UI.ControlCollectionEnumerator.MoveNext() +12538578
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +779
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +755
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +755
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +755
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +755
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +755
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +755
   Telerik.Web.UI.RadFormDecorator.ControlPreRender() +761
   System.Web.UI.Control.PreRenderRecursiveInternal() +113
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18044              


I have tried deleting the grid and rebuilding using the configuration tools, same result. Here is my grid and code behind, also I am using a custom skin set at application level in the web.config and a formdecorator.

<%@ Page Title="Stars Pluses Minuses" Language="C#" MasterPageFile="~/Staff/Staff.master" AutoEventWireup="true"
         CodeFile="StarsPlusMinus.aspx.cs" Inherits="Staff.Reporting.AR.StarsPlusMinus" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head_staff" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main_staff" Runat="Server">
    <asp:Panel ID="SelectionPanel" runat="server" CssClass="SelectionPanel">
        <telerik:RadComboBox ID="FormComboBox" runat="server" Label="Form: " Width="150px" CssClass="PupilChooserCombo"
                             AutoPostBack="True" OnDataBound="FormComboBox_OnDataBound" DataSourceID="FormDataSource" DataTextField="DESCRIPTION" DataValueField="CODE">
        </telerik:RadComboBox>
        <telerik:RadComboBox ID="PeriodComboBox" runat="server" Label="Period: " Width="150px"
                             CssClass="PupilChooserCombo" AutoPostBack="True" DataSourceID="PeriodDataSource"
                             DataTextField="PERIOD_NAME" DataValueField="PERIOD_ID" OnDataBound="PeriodComboBox_DataBound">
        </telerik:RadComboBox>
    </asp:Panel>
    <telerik:RadGrid ID="PupilGrid" runat="server" AllowAutomaticUpdates="True" AutoGenerateColumns="False"
        CellSpacing="0" DataSourceID="GridDataSource" GridLines="None">
        <ExportSettings>
            <Pdf>
                <PageHeader>
                    <LeftCell Text=""></LeftCell>
 
                    <MiddleCell Text=""></MiddleCell>
 
                    <RightCell Text=""></RightCell>
                </PageHeader>
 
                <PageFooter>
                    <LeftCell Text=""></LeftCell>
 
                    <MiddleCell Text=""></MiddleCell>
 
                    <RightCell Text=""></RightCell>
                </PageFooter>
            </Pdf>
        </ExportSettings>
 
        <ValidationSettings EnableModelValidation="False" EnableValidation="False" />
 
        <MasterTableView ClientDataKeyNames="LINE_ID" CommandItemDisplay="TopAndBottom" DataKeyNames="LINE_ID" DataSourceID="GridDataSource"
                         EditMode="Batch"  ShowHeadersWhenNoRecords="True">
            <CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="False" ShowCancelChangesButton="True"
                ShowRefreshButton="False" ShowSaveChangesButton="True"></CommandItemSettings>
 
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
 
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column" Created="True">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
 
            <Columns>
                <telerik:GridBoundColumn DataField="INFORMAL_NAME" FilterControlAltText="Filter INFORMAL_NAME column" HeaderText="INFORMAL_NAME"
                    ReadOnly="True" SortExpression="INFORMAL_NAME" UniqueName="INFORMAL_NAME">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text="" />
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn ReadOnly="True" DataField="ACADEMIC_HOUSE_DESCRIPTION" FilterControlAltText="Filter ACADEMIC_HOUSE_DESCRIPTION column"
                    HeaderText="ACADEMIC_HOUSE_DESCRIPTION" SortExpression="ACADEMIC_HOUSE_DESCRIPTION" UniqueName="ACADEMIC_HOUSE_DESCRIPTION">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text="" />
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn ReadOnly="True"  DataField="FORM_DESC" FilterControlAltText="Filter FORM_DESC column"
                    HeaderText="FORM_DESC" SortExpression="FORM_DESC" UniqueName="FORM_DESC">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text="" />
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="STARS" DataType="System.Decimal" FilterControlAltText="Filter STARS column"
                    HeaderText="STARS"  SortExpression="STARS" UniqueName="STARS">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text="" />
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PLUSES" DataType="System.Decimal" FilterControlAltText="Filter PLUSES column"
                    HeaderText="PLUSES"  SortExpression="PLUSES" UniqueName="PLUSES">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text="" />
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MINUSES" DataType="System.Decimal" FilterControlAltText="Filter MINUSES column"
                    HeaderText="MINUSES" ReadOnly="True" SortExpression="MINUSES" UniqueName="MINUSES">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text="" />
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LINE_ID" DataType="System.Int32" FilterControlAltText="Filter LINE_ID column"
                    HeaderText="LINE_ID" ReadOnly="True" SortExpression="LINE_ID" UniqueName="LINE_ID">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text="" />
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="HEADER_ID" DataType="System.Int32" FilterControlAltText="Filter HEADER_ID column"
                    HeaderText="HEADER_ID" SortExpression="HEADER_ID" UniqueName="HEADER_ID">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text="" />
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
            </Columns>
 
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
            </EditFormSettings>
 
            <BatchEditingSettings EditType="Cell"></BatchEditingSettings>
 
            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
        </MasterTableView>
 
        <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
 
        <FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="FormDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:PassMainConnectionString %>"
        SelectCommand="usps_SA_GetForms" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ProfileParameter Name="ACADEMIC_YEAR" PropertyName="CurrentAcademicYear" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="PeriodDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:PassMainConnectionString %>"
                       SelectCommand="usps_SA_GetAssessmentPeriods" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ProfileParameter Name="ACADEMIC_YEAR" PropertyName="CurrentAcademicYear" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="GridDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:PassMainConnectionString %>"
                       SelectCommand="usps_SA_GetPupilsForSPMGrid" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter Name="SCHOOL"  Type="String" DefaultValue="SA"/>
            <asp:ControlParameter ControlID="PeriodComboBox" Name="PERIOD_ID" PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="FormComboBox" Name="FORM_CODE" PropertyName="SelectedValue" Type="String" />
            <asp:ProfileParameter  Name="ACADEMIC_YEAR" PropertyName="CurrentAcademicYear" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

using System;
using System.Linq;
using NLog;
using Telerik.Web.UI;
 
namespace Staff.Reporting.AR
{
    public partial class StarsPlusMinus : System.Web.UI.Page
    {
        private readonly Logger _logger = LogManager.GetCurrentClassLogger();
 
        protected void Page_Error(object sender, EventArgs e)
        {
            Exception ex = Server.GetLastError();
            _logger.Fatal(ex);
            Server.ClearError();
            //store exception to display some details to the user
            Session[Profile.DomainUsername + "LastError"] = ex;
            Response.Redirect("/Staff/StaffError.aspx", true);
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
        }
 
        protected void PeriodComboBox_DataBound(object sender, EventArgs e)
        {
            if (IsPostBack) return;
            //always select the current period on first visit
            var item = PeriodComboBox.Items.FirstOrDefault(i => i.Text.EndsWith("(*)"));
            if (item != null)
                item.Selected = true;
        }
 
        protected void FormComboBox_OnDataBound(object sender, EventArgs e)
        {
            if (IsPostBack) return;
            FormComboBox.Items.Insert(0, new RadComboBoxItem("Choose ...", "XX") { Selected = true });
        }
    }
}

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" ControlsToSkip="None" DecoratedControls="All" Skin="MyCustomSkin" />

Any ideas gratefully received.

Thanks

Chris 

Angel Petrov
Telerik team
 answered on 15 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?