Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
125 views
Can we have two controls in the same column of Radgrid batch edit (please see the attachment). If it is possible, it would be great, if you could provide me a working sample as soon as possible. Looking forward for your response. 
Viktor Tachev
Telerik team
 answered on 18 Jan 2017
6 answers
327 views

So this is a strange one.  I just updated to the latest 2016 Q2 and since then I cannot put a space into a textbox.  I've tried both a radTextBox and a standard asp:textbox and neither works.  I rolled back to the previous build and it started working immediately.  Put Q2 back and it fails.  Curious if anyone else is seeing the same.

Richard

 

Veselin Tsvetanov
Telerik team
 answered on 18 Jan 2017
0 answers
103 views

Hi All,

How can I change value 1 to Pending/2 to Submit/etc. in my Multicolumn Header Grid that is Created Dynamically.

before I'm just using this code to my template in aspx:

<asp:Label ID="lblStatus" Runat="server" Font-Size="Medium" Text='<%# FormatStatus(DataBinder.Eval(Container.DataItem, "Status"))%>'

Now how to apply this in codebehind with my grid which is created dynamically

My grid looks like this

----------------------------------------------------------------------------------------------

                                          Task1                             Task2

Project Name             Status         Date             Status         Date 

-----------------------------------------------------------------------------------------------

Project 1                       2            1/1/2017              1

------------------------------------------------------------------------------------------------

 

Thanks in advance,

RJ

 

RJ
Top achievements
Rank 1
 asked on 18 Jan 2017
9 answers
759 views
Hi,

I'm using the multicolumn headers feature of the RadGrid control, and generate the multicolumn headers dynamically. Unfortunately the top header disappears after a postback. When I refresh the page, the top header is back again.

My aspx:
<table>
    <tr><td>Start date*</td>
        <td><telerik:RadDatePicker ID="RadDatePicker1" runat="server" EnableScreenBoundaryDetection="false">
                <DateInput DisplayDateFormat="d-M-yyyy"></DateInput>
                <DatePopupButton ToolTip="Open de kalender"></DatePopupButton>
            </telerik:RadDatePicker></td>
        <td>End date*</td>
        <td><telerik:RadDatePicker ID="RadDatePicker2" runat="server" EnableScreenBoundaryDetection="false">
                <DateInput DisplayDateFormat="d-M-yyyy"></DateInput>
                <DatePopupButton ToolTip="Open de kalender"></DatePopupButton>
            </telerik:RadDatePicker></td>
        <td><telerik:RadButton ID="DatumButton" runat="server" Text="Ok"
                onclick="DatumButton_Click">
            </telerik:RadButton>
        </td>
    </tr>
</table>
 
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" OnSelectedCellChanged="RadGrid1_SelectedCellChanged">
    <MasterTableView DataKeyNames="myDataKeyName">
    </MasterTableView>
    <ClientSettings EnablePostBackOnRowClick="true" >
        <Selecting CellSelectionMode="SingleCell" />
    </ClientSettings>
</telerik:RadGrid>

My Code behind:
protected void Page_Load(object sender, EventArgs e)
        {
            if (RadDatePicker1.SelectedDate == null)
            {
                RadDatePicker1.SelectedDate = DateTime.Today;
            }
 
            if (RadDatePicker2.SelectedDate == null)
            {
                RadDatePicker2.SelectedDate = DateTime.Today.AddDays(6);
            }
             
            if (!Page.IsPostBack)
            {
                GetGrid();
            }
        }
 
        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = GetMyDataList();
        }
 
        protected void RadGrid1_SelectedCellChanged(object sender, EventArgs e)
        {
            GridTableCell d = RadGrid1.SelectedCells[0];
 
            if (d.Text == "1")
            {
                d.Text = " ";
            }
            else
            {
                d.Text = "1";
            }
 
            d.Selected = false;
        }
 
        private void GetGrid()
        {
            DateTime startDate = Convert.ToDateTime(RadDatePicker1.SelectedDate);
            DateTime endDate = Convert.ToDateTime(RadDatePicker2.SelectedDate);
 
            GridBoundColumn cCode = new GridBoundColumn();
            RadGrid1.MasterTableView.Columns.Add(cCode);
            cCode.HeaderText = "Code";
            cCode.DataField = "Code";
            cCode.UniqueName = "Code";
            cCode.ReadOnly = true;
            cCode.ItemStyle.Width = 50;
 
            GridBoundColumn cDescription = new GridBoundColumn();
            RadGrid1.MasterTableView.Columns.Add(cDescription);
            cDescription.HeaderText = "Description";
            cDescription.DataField = "Description";
            cDescription.UniqueName = "Description";
            cDescription.ReadOnly = true;
            cDescription.ItemStyle.Width = 250;
 
            while (startDate <= endDate)
            {
                string day = startDate.ToString("dddd").Substring(0, 2);
                string date = startDate.ToString("dd-MM");
 
                GridColumnGroup columnGroup = new GridColumnGroup();
 
                columnGroup.HeaderText = string.Format("{0} {1}", day, date);
                columnGroup.Name = startDate.ToString("yyyyMMdd");
 
                RadGrid1.MasterTableView.ColumnGroups.Add(columnGroup);
                List<MyList> listMyList = GetMyList();
                for (int i = 0; i < listMyList.Count; i++)
                {
                    GridBoundColumn column = new GridBoundColumn();
                    RadGrid1.MasterTableView.Columns.Add(column);
                    column.HeaderText = listMyList.ElementAt(i).myElement;
                    column.UniqueName = listMyList.ElementAt(i).myElement + "_" + startDate.ToString("yyyyMMdd");
                    column.ColumnGroupName = startDate.ToString("yyyyMMdd");
                    column.DataField = " ";
                    column.ItemStyle.Width = 50;
                }
                startDate = startDate.AddDays(1);
            }
        }

When I took the GetGrid function out of the if(!Page.IsPostback), the behavior of the grid did not change. The top header still disappears after a postback, but not after a refresh.

Can you please help me solve this? Thanks!
RJ
Top achievements
Rank 1
 answered on 18 Jan 2017
3 answers
185 views

Can I run a standard ASP.NET compare validator on the autocompletebox? I want to test if the initial value was changed. If not trigger it. I running this in dropdownlist mode.

 

Thanks!

Nencho
Telerik team
 answered on 18 Jan 2017
0 answers
96 views

Hi,

I am trying to evaluate and build around radgrid, in my current situation i have 15 grids (each in its own individual user control) to display in a single page "so i have 15 user control, with 1 grid in each user control". To accomplish this i am trying to perform lazy load which will initiate loading each grid once page loaded (we don't want customer starring at white screen while system fetching data from database, it could take as long as 60-200seconds to load entire page).

Now issue starts when each grid finish loading. Once each grid finish loading, vertical scrollbar goes back to last position or to top of page based on last location of scrollbar. It would be very annoying, lets say customer looking at 5th grid "while other grids are still loading" and page scroll back to different position as any other grid finish loading.

In my current page i am using XMLHttpRequest to post request to get different grids (using this method i can call as many grids as i want without effecting scroll bar).

I am wasting to much time to see if it can work, here i am attaching Page with user control, in case if anyone can help.

Seems it is not allowed to upload rar file, so here is rar file with 4 files inside https://www.datafilehost.com/d/3c8fa347

While page loading grids, you can scroll down and you will notice it goes back right to top when any grid finish loading at bottom of page.

Regards,

Waqar

Waqar
Top achievements
Rank 1
 asked on 18 Jan 2017
3 answers
320 views

Hi I have a radgrid that I am pumping over 4k rows into. We have enabled virtualization, but we are getting some strange behavior. When the grid is loaded all looks fine, but when the user scrolls down and the virtualization starts to kick in there are columns not updating/refreshing and rows appear to only be going to 500. I have included a video as well to demonstrate. So when a user opens page, the radgrid displays data, but when scrolling down it appears to stop for certain columns. However, when exporting to excel, all rows are correctly displayed and matching among the rows.

 

 

1) GridTemplateColumn with asp:image tag is only displaying first image when sorting.

2) It appears that rows are only going to 500 as I believe this is set with ItemsPerView="500"

 

 

Below is the aspx code:

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPages/main.Master" CodeBehind="Manager.aspx.vb" Inherits="ContentValidationSystem.Manager" %>
<%@ Register TagPrefix="UserControl" TagName="ManagerEmail" Src="~/Controls/Manager_Email_Settings.ascx" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="styles" runat="server">
    <style type="text/css">
        #divFloatingHeader{left:250px; right:0; top:200px; height:80px; overflow:hidden; position:fixed;padding-right:5px;background-color:black;}
 
    .RadGrid_Simple .rgRow > td, .RadGrid_Simple .rgAltRow > td, .RadGrid_Simple .rgEditRow > td, .RadGrid_Simple .rgFooter > td
     {
 
        border-bottom:1px solid lightgrey !important;
    }
 
 
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="codeblock" runat="server">
    <telerik:RadCodeBlock runat="server">
        <script type="text/javascript">
            /* this will allow control to be parsed.*/
            function TelerikControls() {
                this.__defineGetter__("radsearch_UserName", function () {
                    return $find("<%= radsearch_UserName.ClientID%>");
                });
                this.__defineGetter__("radgrid_dashboard", function () {
                    return $find("<%= radgrid_Dashboard.ClientID%>")
                });
                this.__defineGetter__("radimagebutton_mgr_MultipleProjects", function () {
                    return $find("<%= radimagebutton_mgr_MultipleProjects.ClientID%>")
                });
            }
 
            var _telerikControls = new TelerikControls();
 
            function rowDblClick(sender, eventArgs) {
                var objGrid = sender;
                var objMasterTable = objGrid.get_masterTableView();
                var row = objMasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
                //alert(row.getDataKeyValue('CVS_DID'));
                if (row.getDataKeyValue('DocumentID')) {
                    window.open('../Detail_DID.aspx?did=' + row.getDataKeyValue('DocumentID'), '_self');
                }
            }
 
            function Resize() {
                setTimeout(function () {
                    var rdg = $find("<%= radgrid_Dashboard.ClientID%>").GridDataDiv;
                    if (rdg) {
                        var blnStaticHeader = $find("<%= radgrid_Dashboard.ClientID%>").ClientSettings.Scrolling.UseStaticHeaders
                         
                        var parent = $get("divWestSide");
                        //var srchbox = _telerikControls.radsearch_UserName;
                        var headerHeight = 0;
                        var btnHeight = 0;
 
                        if (blnStaticHeader) {
                            var rdgHeader = $find("<%= radgrid_Dashboard.ClientID%>").GridHeaderDiv;
                            headerHeight = rdgHeader.clientHeight;
                        }
                        //var srchbox = _telerikControls.radsearch_UserName;
                        //if (srchbox) { btnHeight = srchbox._element.clientHeight }
 
                        var topdiv = $get("divSearchItems");
                        if (topdiv) {
                            btnHeight = topdiv.clientHeight;
                        }
                         
                        rdg.style.height = ((parent.clientHeight - btnHeight - 30) - headerHeight) + "px";
                    }
 
                }, 200);
            }
 
            window.onresize = window.onload = Resize;
 
            function HandleScrolling(e) {
                var grid = $find("<%=radgrid_Dashboard.ClientID%>");
                var scrollArea = document.getElementById("<%= radgrid_Dashboard.ClientID%>" + "_GridData");
                if (IsScrolledToBottom(scrollArea)) {
                    var currentlyDisplayedRecords = grid.get_masterTableView().get_pageSize() * (grid.get_masterTableView().get_currentPageIndex() + 1);
                    //if the visible items are less than the entire record count      
                    //trigger an ajax request to increase them   
                    if (currentlyDisplayedRecords < 100)
                    { $find("<%= RadAjaxManager_001.ClientID%>").ajaxRequest("LoadMoreRecords"); }
                }
            }
            //calculate when the scroll bar is at the bottom   
            function IsScrolledToBottom(scrollArea) {
                var currentPosition = scrollArea.scrollTop + scrollArea.clientHeight;
                return currentPosition == scrollArea.scrollHeight;
            }
        </script>
    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="radajaxmanagerSection" runat="server">
        <telerik:RadWindowManager   ID="RadWindowManager1" runat="server" EnableShadow="true">
        </telerik:RadWindowManager>
        <script type="text/javascript">
            (function (global, undefined) {
                var demo = {};
                function alertCallBackFn(arg) {
                    //radalert("<strong>radalert</strong> returned the following result: <h3 style='color: #ff0000;'>" + arg + "</h3>", 350, 250, "Result");
                }
 
                function confirmCallBackFn(arg) {
                    //radalert("<strong>radconfirm</strong> returned the following result: <h3 style='color: #ff0000;'>" + arg + "</h3>", 350, 250, "Result");
 
                }
 
                function promptCallBackFn(arg) {
                    //radalert("After 7.5 million years, <strong>Deep Thought</strong> answers:<h3 style='color: #ff0000;'>" + arg + "</h3>", 350, 250, "Deep Thought");                  
                }
                global.alertCallBackFn = alertCallBackFn;
                global.confirmCallBackFn = confirmCallBackFn;
                global.promptCallBackFn = promptCallBackFn;
                global.$dialogsDemo = demo;
 
            })(window);
        </script>
 
    <telerik:RadAjaxManager ID="RadAjaxManager_001" runat="server" OnAjaxRequest="RadAjaxManager_001_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="radsearch_UserName">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID ="radgrid_Dashboard" LoadingPanelID="radajaxloadingpanel_GridPanel" />
                    <telerik:AjaxUpdatedControl ControlID="rptStatusInfo" LoadingPanelID="radajaxloadingpanel_GridPanel" />
                    <telerik:AjaxUpdatedControl ControlID="rptUpcomingItems" LoadingPanelID="radajaxloadingpanel_GridPanel" />
                    <telerik:AjaxUpdatedControl ControlID="RadHtmlChart_FrequencyMix" LoadingPanelID="radajaxloadingpanel_GridPanel" />
                    <%--<telerik:AjaxUpdatedControl ControlID="pnlEmailPreferences" LoadingPanelID="radajaxloadingpanel_GridPanel" />--%>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="radgrid_Dashboard">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radgrid_Dashboard" LoadingPanelID="radajaxloadingpanel_GridPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <telerik:RadCodeBlock runat="server">
        <script type="text/javascript">
            $telerik.$(document).ready(function () {
 
            });
 
 
            function GridCreated(sender, args) {
                sender.get_masterTableView().hideFilterItem();//hide filter menu
                var scrollArea = sender.GridDataDiv;
                if (scrollArea) {
                    var blnStaticHeader = sender.ClientSettings.Scrolling.UseStaticHeaders;
                    var parent = $get("divWestSide");
 
                    var headerHeight = 0; var headerWidth = 0;
                    var btnHeight = 0;
 
                    if (blnStaticHeader) {
                        var gridHeader = sender.GridHeaderDiv;
                        headerHeight = gridHeader.clientHeight;
                        headerWidth = gridHeader.clientWidth;
                        //alert(headerWidth);
                    }
                    var topdiv = $get("divSearchItems");
                    if (topdiv) {
                        btnHeight = topdiv.clientHeight;
                    }
                     
                    scrollArea.style.height = ((parent.clientHeight - btnHeight - 30) - headerHeight) + "px";
                    sender.add_rowCreated(RowCreated);
                }
            }
 
            function RowCreated() {
 
            }
 
            function CheckAll(id) {
                var masterTable = $find("<%= radgrid_Dashboard.ClientID%>").get_masterTableView();
                var row = masterTable.get_dataItems();
                if (id.checked == true) {
                    for (var i = 0; i < row.length; i++) {
                        masterTable.get_dataItems()[i].findElement("cboxSelect").checked = true; // for checking the checkboxes
                        //masterTable.get_dataItems()[i].findElement("chkbx_Select_OnOff").checked = true; // for checking the checkboxes               
                    }
                }
                else {
                    for (var i = 0; i < row.length; i++) {
                        masterTable.get_dataItems()[i].findElement("cboxSelect").checked = false; // for unchecking the checkboxes
                        //masterTable.get_dataItems()[i].findElement("chkbx_Select_OnOff").checked = false; // for checking the checkboxes               
                    }
                }
            }
 
            function unCheckHeader(id) {
 
                var masterTable = $find("<%= radgrid_Dashboard.ClientID%>").get_masterTableView();
                var row = masterTable.get_dataItems();
                if (id.checked == false) {
                    var chkBox = $telerik.$('input[id$=checkAll]');
                    chkBox[0].checked = false;
                }
 
            }
 
            function OpenRadWindowMultipleDocuments(sender, args) {
 
                var uiPersonNumber = sender.get_commandArgument();
                var urlTracker = $get('<%=hdnField_TrackerUrl.ClientID%>').value;
                var DIDs = ',';
                //********************************************************************************************
                var masterTable = $find("<%= radgrid_Dashboard.ClientID%>").get_masterTableView();
                var rows = masterTable.get_dataItems();
                for (var i = 0; i < rows.length; i++) {
                    var chkBox = masterTable.get_dataItems()[i].findElement("cboxSelect");
                    var row = rows[i];
                    var tDID = row.get_cell("DocumentID").innerHTML + ',';
                    if (chkBox.checked) { DIDs += tDID }
                }
                //********************************************************************************************               
                var sURLParm = urlTracker + '/new/0/0?cvs=http://' + document.location.host + '/Service/ReportDashboardData.svc/Open_Tracker/' + DIDs + '/' + uiPersonNumber;
                //var sURLParm = 'http://procmgmt-contentvalidation-dev.bankofamerica.com/Service/ReportDashboardData.svc/Open_Tracker/' + DIDs + '/' + uiPersonNumber;
 
                window.open(sURLParm, "WindowPopup", "width=800px, height=600px, resizable,scrollbars=1");//test window open;
 
            }
 
 
            function OpenTrackerProject(did, uiPersonNumber) {
                var urlTracker = $get('<%=hdnField_TrackerUrl.ClientID%>').value;
                var sURLParm = urlTracker + '/new/0/0?cvs=http://' + document.location.host + '/Service/ReportDashboardData.svc/Open_Tracker/' + did + '/' + uiPersonNumber;
                //window.status = sURLParm;
                window.open(sURLParm, "_blank")//"width=800px, height=600px, resizable,scrollbars=1");//test window open;
                //window.open('http://sharepoint3.bankofamerica.com/sites/ServicingBusinessSupport/PM/pm.html#/home', "WindowPopup", "width=800px, height=600px, resizable");
 
                <%--var oWnd = $find("<%= radwindow_TrackerInfo.ClientID%>");
                oWnd.SetUrl(sURLParm);
                oWnd.setSize(800, 600);
                oWnd.show();--%>
 
            }
 
            function OpenRadWin(did) {
 
                var urlTracker = $get('<%=hdnField_TrackerUrl.ClientID%>').value;
                //var oWnd = $find("<%= radwindow_TrackerInfo.ClientID%>");
                /*
                *
                * This is to stay hard coded until tracker is remediated to TI Production Platform.
                * use of -dev url is due to Tracker being hosted on Sharepoint Site.
                *
                *  when remove the following:
                *    var sURL = "http://procmgmt-contentvalidation-dev.bankofamerica.com/TrackerInfo.aspx?did=" + did
                *
                 
                var sURL = '';
                sURL = 'http://' + document.location.host + '/TrackerInfo.aspx?did=' + did;
                */
 
                //window.status = sURL;
                //oWnd.SetUrl(sURL);
                //oWnd.setUrl();
                //oWnd.setSize(600, 400);
                //oWnd.show();
                var sURLParm = urlTracker + '/search?did=' + did + ','
                window.open(sURLParm, "WindowPopup", "width=800px, height=600px, resizable,scrollbars=1");//test window open;
 
            }
 
 
        </script>
    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="mainContent" runat="server">
 <div style="float:left;"><asp:Label ID="lblMsg" runat="server"></asp:Label></div>
 
<table>
    <tr>
        <td>
            <div id="divEastSide">
        <table style="width:100%;">
            <tr>
                <td class="cellInfo">
                    <!-- Status Info -->
                     
                    <asp:Repeater ID="rptStatusInfo" runat="server">
                        <HeaderTemplate>
                            <table class="tblStats">
                                <tr>
                                    <th colspan="3">
                                        Status
                                    </th>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td ><%# ProperCase(DataBinder.Eval(Container.DataItem, "Status").ToString().Trim)%></td>
                                <td><%# String.Format("{0:G}", DataBinder.Eval(Container.DataItem, "StatusCount"))%></td>
                                <td><%# String.Format("{0:P0}", DataBinder.Eval(Container.DataItem, "StatusPercentage"))%></td>
                            </tr>
                        </ItemTemplate>
                        <AlternatingItemTemplate>
                            <tr>
                                <td ><%# ProperCase(DataBinder.Eval(Container.DataItem, "Status").ToString().Trim)%></td>
                                <td><%# String.Format("{0:G}", DataBinder.Eval(Container.DataItem, "StatusCount"))%></td>
                                <td><%# String.Format("{0:P0}", DataBinder.Eval(Container.DataItem, "StatusPercentage"))%></td>
                            </tr>
                        </AlternatingItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                     
                </td>
            </tr>
            <tr>
                <td>
                    <!-- Upcoming Due Items -->
                    <div style="padding-top:10px;padding-bottom:10px;">
                    <asp:Repeater ID="rptUpcomingItems" runat="server">
                        <HeaderTemplate>
                            <table class="tblStats">
                                <tr>
                                    <th colspan="2">
                                        Documents Coming Due
                                    </th>
                                </tr>
                                <tr>
                                    <td><strong>Review Month</strong></td>
                                    <td><strong>Total</strong></td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td><%#DataBinder.Eval(Container.DataItem, "Review Month")%></td>
                                <td><%# String.Format("{0:G}", DataBinder.Eval(Container.DataItem, "Total"))%></td>
                            </tr>
                        </ItemTemplate>
                        <AlternatingItemTemplate>
                            <tr>
                                <td><%#DataBinder.Eval(Container.DataItem, "Review Month")%></td>
                                <td><%# String.Format("{0:G}", DataBinder.Eval(Container.DataItem, "Total"))%></td>
                            </tr>
                        </AlternatingItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    </div>
                </td>
            </tr>
            <tr>
                <td >
                    <!-- Frequency PieChart -->
                    <table class="tblStats" >
                        <tr>
                            <th colspan="2">
                                Frequency Mix
                            </th>
                        </tr>
                        <tr>
                            <td colspan="2">
                            <telerik:RadHtmlChart id="RadHtmlChart_FrequencyMix" Transitions="true" runat="server" Width="195px" Height="200px">
                                <ChartTitle Text="Frequency Mix">
                                    <Appearance Visible="false"></Appearance>
                                </ChartTitle>
                                <Legend>
                                    <Appearance Visible="false"></Appearance>
                                </Legend>
                                <Appearance>
                                    <FillStyle BackgroundColor="White" />
                                </Appearance>
                                <PlotArea>
                                    <Series>
                                        <telerik:PieSeries StartAngle="90" DataFieldY="FreqPercentage" NameField="Frequency" ExplodeField="Exploded" ColorField="SeriesColor">
                                            <LabelsAppearance DataField="Frequency" Position="InsideEnd" DataFormatString="{0}">
                                                <TextStyle FontFamily="Connections" FontSize="7pt" Color="Black" Padding="2px" />
                                            </LabelsAppearance>
                                            <TooltipsAppearance Color="White" DataFormatString="{0:p2}"></TooltipsAppearance>
                                            <Appearance Overlay-Gradient="RoundedBevel"></Appearance>
                                        </telerik:PieSeries>
                                    </Series>
                                </PlotArea>
                            </telerik:RadHtmlChart>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <%--Email Preferences Here--%>                   
                    <UserControl:ManagerEmail ID="manageremail_MgrEmailPreferences" runat="server" EnableViewState="true" />
                     
                </td>
            </tr>
        </table>
            </div>
        </td>
        <td>
 
            <div id="divWestSide">
                <div class="floatleftdiv">
                    <telerik:RadImageButton ID="radimagebutton_mgr_MultipleProjects" Text="Open Project(s)" CssClass="radgrid_lightblue_gradient display_inline_block" runat="server"
                        Width="125px" Height="50px" Font-Size="X-Small" ForeColor="White" OnClientClicked="OpenRadWindowMultipleDocuments" AutoPostBack="false" >
                    </telerik:RadImageButton><asp:HiddenField ID="hdnField_TrackerUrl" runat="server" />
                </div>
                <div id="divSearchItems" class="floatrightdiv">
                    <table>
                         <tr>
                            <td >
                            <div class="floatleftdiv"><span>Dashboard</span>
                                </div>
                            <div class="floatrightdiv">
                               <asp:Button ID="btnPopulate_radsearch_Dashboard" runat="server" text="Me" CssClass="AspButtonAsHyperLink" OnClick="hyperButton_Click" CommandArgument="radsearch_UserName" CommandName="updateSearchBox_andPopulate" />
                            </div>
                            </td>
                             <td />
                        </tr>
                       <tr>
                            <td>
                    <telerik:RadSearchBox ID="radsearch_UserName" runat="server" 
                        width="460px"
                        DataSourceID="SqlDataSource1"
                        DropDownSettings-Height="300"
                        DataTextField ="FullName"
                        DataValueField="userid"
                        DataKeyNames="userid"
                        EmptyMessage="Lastname, Firstname"
                        Filter="Contains"
                        MaxResultCount="20"
                        OnDataSourceSelect="radsearch_UserName_DataSourceSelect"
                        OnSearch="radsearch_UserName_Search"
                        DropDownSettings-CssClass="cellInfo"
                        >
                    </telerik:RadSearchBox>
                    </td><td>
                    <asp:ImageButton ID="imgbtn_ExcelExport" runat="server" ImageUrl="~/Includes/images/Excel_XLSX.png" OnClick="ImageButton_Click" AlternateText="ExcelML" Height="25px" />               
 
                            </td>
                        </tr>
                    </table>
                </div
                <telerik:RadAjaxLoadingPanel ID="radajaxloadingpanel_GridPanel" runat="server"></telerik:RadAjaxLoadingPanel>
                <telerik:RadGrid
                    RenderMode="Classic"
                    CssClass="leftbound"
                    ID="radgrid_Dashboard"
                    AllowFilteringByColumn="true"
                    runat="server"
                    
                    AllowPaging="false"
                     
                    AllowSorting="true"
                    GroupingEnabled="False"
                    width="100%"
                    AutoGenerateColumns="false"
                    OnItemCreated="radgrid_Dashboard_ItemCreated"
                    OnItemDataBound="radgrid_Dashboard_ItemDataBound"
                    ClientSettings-Resizing-AllowResizeToFit="true"
                    OnSortCommand="radgrid_Dashboard_SortCommand"
                    OnExcelMLWorkBookCreated="radgrid_Dashboard_ExcelMLWorkBookCreated"   
                    OnExcelMLExportRowCreated="radgrid_Dashboard_ExcelMLExportRowCreated"
                    OnInfrastructureExporting="radgrid_Dashboard_InfrastructureExporting"  
                    Skin="Simple"
                    >
                    <ExportSettings>
                        <Excel Format="BIFF" AutoFitImages="true" DefaultCellAlignment="Left" />
                    </ExportSettings>
                     
                    <MasterTableView
                        DataKeyNames="ID,DocumentId"
                        CommandItemDisplay="None"
                        HorizontalAlign="NotSet"
                        AutoGenerateColumns="false"
                        ClientDataKeyNames="DocumentID,Title"
                        TableLayout="Fixed"
                        Width="100%"
                    EnableHeaderContextMenu="true"
                    EnableHeaderContextFilterMenu="true"
                        >
                        <NoRecordsTemplate>
                            <span class="NoRecords">
                                User is not a Primary Manager, Delegate, or Majority Owner for any documents.
                            </span>
                        </NoRecordsTemplate>
                    <Columns>
                            <%-- id column not visible --%>
                            <telerik:GridBoundColumn HeaderText="ID" DataField="ID" UniqueName="ID" Visible="false" ReadOnly="true">
                                <HeaderStyle Width="50px" />
                            </telerik:GridBoundColumn>                                     
                        <%--checkbox column--%>
                        <telerik:GridTemplateColumn UniqueName="SelectItem" EnableHeaderContextMenu="false">
                            <HeaderStyle Width="50px"/>
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderTemplate>
                                <asp:CheckBox ID="checkAll" runat="server" onclick="CheckAll(this)" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="cboxSelect" runat="server" onclick="unCheckHeader(this)" />
<%--                                            <div class="onoffswitch" style="float:left;">
                                    <asp:CheckBox ID="chkbx_Select_OnOff" runat="server" onclick="unCheckHeader(this)" />
                                    <label id="lbl_Select_OnOff" runat="server">
                                        <span class="onoffswitch-inner"></span>
                                        <span class="onoffswitch-switch"></span>
                                    </label>
                                </div>--%>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <%-- 2nd Flag Column --%>
                            <telerik:GridTemplateColumn UniqueName="GapFlag2" DataField ="GapFlag" AllowFiltering="true" SortExpression="Gap" >
                                <HeaderStyle Width="50px" />
                                <HeaderTemplate>
                                    <asp:Label ID="lbl_dummyGap" CssClass="gridHeaderItem" runat="server" Text="Gap"></asp:Label>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Image ID="img_GapFlag" runat="server"  Width="15px" Height="15px" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
<%--                            <telerik:GridBoundColumn HeaderText="Gap" DataField="Gap" UniqueName="Gap">
                                <HeaderStyle Width="50px" />
                                <ItemStyle HorizontalAlign="left" Wrap="true" />
                            </telerik:GridBoundColumn>--%>
                            <%-- flag column --%>
<%--                            <telerik:GridImageColumn
                                DataType="System.String"
                                DataImageUrlFields="GapFlag"
                                DataImageUrlFormatString="{0}"
                                ImageAlign="AbsMiddle"
                                ImageHeight="15px"
                                ImageWidth="15px"
                                HeaderText="Gap"
                                UniqueName="GapFlag"
                                EnableHeaderContextMenu="false"
                                >
                        <HeaderStyle Width="50px" />
                            </telerik:GridImageColumn>--%>
                        <%--System of Record Column--%>
                            <telerik:GridBoundColumn HeaderText="Sys_Of_Record" DataField="Sys_Of_Record" UniqueName="Sys_Of_Record"
                                AllowFiltering="true" Visible="false">
                                <HeaderStyle Width="150px" />
                                <ItemStyle HorizontalAlign="left" Wrap="true" />
                            </telerik:GridBoundColumn>
                        <%--DocumentID Column--%>
                            <telerik:GridBoundColumn HeaderText="DocumentID" DataField="DocumentID" UniqueName="DocumentID"
                                AllowFiltering="true"  CurrentFilterFunction="StartsWith">
                                <HeaderStyle Width="250px" />
                                <ItemStyle HorizontalAlign="left" Wrap="true" />
                            </telerik:GridBoundColumn>
                        <%--Hyperlink Column for Title--%>
                            <telerik:GridTemplateColumn UniqueName="TitleLink" AllowSorting="true" DataField="Title"
                                AllowFiltering="true" CurrentFilterFunction="StartsWith">
                            <HeaderStyle Width="350px" />
                            <ItemStyle HorizontalAlign="left" Width="100%" />
                            <HeaderTemplate>
                                <asp:Label ID="lbl_dummytitle" CssClass="gridHeaderItem" runat="server" Text="Title"></asp:Label>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <a href="<%# DataBinder.Eval(Container.DataItem, "Link")%>" target="•_blank" ><%# DataBinder.Eval(Container.DataItem, "Title")%></a>
                            </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        <%--Title Column - used in exports--%>
                            <telerik:GridBoundColumn HeaderText="Title" DataField="Title" UniqueName="TitleExport" Visible="true" Display="false">
                                <HeaderStyle Width="100px" />
                            </telerik:GridBoundColumn>
                            <%--Chapter Column--%>
                            <telerik:GridBoundColumn HeaderText ="Chapter" DataField="Chapter" UniqueName="Chapter"
                                AllowFiltering="true" CurrentFilterFunction="StartsWith">
                                <HeaderStyle Width="350px" />
                                <ItemStyle HorizontalAlign="left" Wrap="false" />
                            </telerik:GridBoundColumn>
                        <%--Category Column--%>
                            <telerik:GridBoundColumn HeaderText="Category" DataField="Category" UniqueName="Category">
                                <HeaderStyle Width="200px" />
                                <ItemStyle HorizontalAlign="left" Wrap="false" />
                            </telerik:GridBoundColumn>
                        <%-- Topic/Grouping Column --%>
                            <telerik:GridBoundColumn HeaderText="Topic/Group" DataField="Topic_Grouping" UniqueName="Topic_Grouping">
                                <HeaderStyle Width="300px" />
                                <ItemStyle HorizontalAlign="left" Wrap="false" />
                            </telerik:GridBoundColumn>
                        <%--Frequency Column--%>
                            <telerik:GridBoundColumn HeaderText="Frequency" DataField="Frequency" UniqueName="Frequency">
                                <HeaderStyle Width="100px" />
                                <ItemStyle HorizontalAlign="Center" Wrap="false" />
                            </telerik:GridBoundColumn>
                        <%--Document Status Color Not visible--%>
                            <telerik:GridBoundColumn HeaderText="Document_Status_Color" DataField="Document_Status_Color" UniqueName="Document_Status_Color" Visible="true" Display="false">
                                <HeaderStyle Width="50px" />
                            </telerik:GridBoundColumn>
                        <%--Next Review Date Column--%>
                            <telerik:GridDateTimeColumn HeaderText="Next<br/>Review" DataField="Next_Review_DtTM" UniqueName="Next_Review_DtTM" DataFormatString="{0:M/d/yyyy}"
                                AllowFiltering="true" CurrentFilterFunction="StartsWith">
                                <HeaderStyle Width="100px" />
                            </telerik:GridDateTimeColumn>
                            <telerik:GridDateTimeColumn HeaderText="Next<br/>Review<br/>NoColor" DataField="Next_Review_DtTM" UniqueName="Next_Review_DtTM_NoColor" DataFormatString="{0:M/d/yyyy}"
                                AllowFiltering="true" CurrentFilterFunction="StartsWith">
                                <HeaderStyle Width="100px" />
                            </telerik:GridDateTimeColumn>
                        <%-- Area --%>
                        <telerik:GridBoundColumn HeaderText="Area" DataField="Area" UniqueName="Area" Visible="true" Display="false">
                            <HeaderStyle Width="50px" />
                            <ItemStyle Wrap="false"  />
                            </telerik:GridBoundColumn>
                        <%--Status column--%>
                        <telerik:GridBoundColumn HeaderText="Status" DataField="Status" UniqueName="Status">
                            <HeaderStyle Width="125px" />
                            <ItemStyle Wrap="false"  />
                            </telerik:GridBoundColumn>
                        <%--Primary Manager Column--%>
                        <telerik:GridBoundColumn HeaderText="Primary Manager" DataField="Primary_Manager" UniqueName="Primary_Manager">
                            <HeaderStyle Width="350px" />
                            </telerik:GridBoundColumn>
                        <%--Majority Owner / Manager Column--%>
                        <telerik:GridBoundColumn HeaderText="Manager" DataField="Manager" UniqueName="Manager">
                            <HeaderStyle Width="350px" />
                            </telerik:GridBoundColumn>
                        <%--Team Name Column--%>
                        <telerik:GridBoundColumn HeaderText="Team Name" DataField="Team" UniqueName="Team_Name">
                            <HeaderStyle Width="350px" />
                            </telerik:GridBoundColumn>
                        <%--Content Owner Column--%>
                        <telerik:GridBoundColumn HeaderText="Content Owners" DataField="ContentOwners" UniqueName="ContentOwners">
                            <HeaderStyle Width="350px" />
                            </telerik:GridBoundColumn>
                        <%-- StakeHolder Column --%>
                        <telerik:GridBoundColumn HeaderText="Stakeholders" DataField="Stakeholders" UniqueName="Stakeholders"  >
                            <HeaderStyle Width="350px" />
                            </telerik:GridBoundColumn>
                        <%-- Number Of Hits Column --%>
                        <telerik:GridBoundColumn HeaderText="Hits" DataField="Last_Months_Hits" UniqueName="Last_Months_Hits">
                            <HeaderStyle Width="350px" />
                            </telerik:GridBoundColumn>
                        <%-- Comments Column --%>
                        <telerik:GridBoundColumn HeaderText="Comments" DataField="Comments" UniqueName="Comments" >
                            <HeaderStyle Width="400px" />
                            </telerik:GridBoundColumn>
                        <%-- Open Tracker project --%>
                        <telerik:GridButtonColumn HeaderText="Actions" UniqueName="TrackerSingleProject" Text="Open Project" ButtonType="ImageButton" CommandName="OpenSingleTrackerProjectWindow" EnableHeaderContextMenu="false">
                            <HeaderStyle Width="200px" />
                            <ItemStyle CssClass="radgrid_lightblue_gradient" VerticalAlign="Middle" HorizontalAlign="Center" />
                        </telerik:GridButtonColumn>
                        <%-- Search Tracker for DID --%>
                        <telerik:GridButtonColumn HeaderText="Tracker" UniqueName="ViewTrackerInfo" Text="DID Search" ButtonType="ImageButton" CommandName="OpenFromCodeBehind" EnableHeaderContextMenu="false">
                            <HeaderStyle Width="200px" />
                            <ItemStyle CssClass="radgrid_lightblue_gradient" VerticalAlign="Middle" HorizontalAlign="Center" />
                        </telerik:GridButtonColumn>
                        </Columns>
                         
                    <HeaderStyle VerticalAlign="Bottom" HorizontalAlign="Center" Wrap="false"  Font-Bold="true" Font-Size="12pt" Font-Names="Connections" />
                    <ItemStyle Font-Size="10pt" Font-Names="Connections" />
                    <AlternatingItemStyle Font-Size="10pt" Font-Names="Connections" BackColor="WhiteSmoke" />
                    </MasterTableView>
                 
                <ClientSettings>
                    <Resizing
                        AllowColumnResize="True" AllowRowResize="false" ResizeGridOnColumnResize="false"
                        ClipCellContentOnResize="true" EnableRealTimeResize="false" AllowResizeToFit="true" />
                    <ClientEvents OnRowDblClick="rowDblClick" OnGridCreated="GridCreated" OnScroll="HandleScrolling" />
                    <%--<Scrolling AllowScroll="true" ScrollHeight="300px" UseStaticHeaders="true" SaveScrollPosition="true" FrozenColumnsCount="3" />--%>
                    <Scrolling AllowScroll="true"
                        ScrollHeight="300px"
                        UseStaticHeaders="true"
                        FrozenColumnsCount="3"
                        />
                    <Virtualization EnableVirtualization="true" LoadingPanelID="radajaxloadingpanel_GridPanel"
                        InitiallyCachedItemsCount="500"
                        ItemsPerView="500"
                        MaxCacheSize="2000"
                        RetrievedItemsPerRequest="500"  
                        />
                </ClientSettings>
                </telerik:RadGrid>
            </div>
        </td>
    </tr>
</table>
 
<telerik:RadWindow runat="server" ID="radwindow_TrackerInfo" Width="650px" Height="400px"
    ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true">
</telerik:RadWindow>
 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:COOD %>"
        SelectCommand="CVS.Get_ManagerList"
        SelectCommandType ="StoredProcedure"
        >
    </asp:SqlDataSource>
</asp:Content>

 

Below is vb code

Imports Telerik.Web.UI
Imports System.Linq
Imports System.Data
Imports System.Collections.Generic
Imports xi = Telerik.Web.UI.ExportInfrastructure
Imports System.IO
Imports Telerik.Web.UI.GridExcelBuilder
Imports System.Drawing
 
Public Class Manager : Inherits clsWebForm
    Dim ui As New clsUser
    Dim isExport As Boolean = False
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ui = CType(Session("User_Info_Map"), clsUser)
        Dim lblTitle As Label = TryCast(Master.FindControl("lblApplicationName"), Label)
        lblTitle.Text = String.Format("{0} - {1} Dashboard", Application("Title").ToString(), Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath))
        radimagebutton_mgr_MultipleProjects.CommandArgument = ui.PersonNumber.ToString
        hdnField_TrackerUrl.value = ConfigurationManager.AppSettings("TrackerAddress").ToString()
        radgrid_Dashboard.SortingSettings.SortToolTip = "Right Click Menu for options"
 
        'load most current email settings.
        Try
            Dim dsManagerEmailSettings As DataSet = New DataSet
            Dim mgrEmailEnabled As Boolean = False
            Dim mgrEmailFreq As String = "Daily"
            Dim mgrDesktopSLA As Integer = 4
            Dim mgrStandardSLA As Integer = 4
            dsManagerEmailSettings = GetDataSet(String.Format("exec CVS.get_User_email_preferences {0}", ui.PersonNumber), False)
            If Not IsNothing(dsManagerEmailSettings) Then
 
                If Not IsDBNull(dsManagerEmailSettings.Tables(0).Rows(0)("Email_Enabled")) Then
                    mgrEmailEnabled = dsManagerEmailSettings.Tables(0).Rows(0)("Email_Enabled")
                End If
                If Not IsDBNull(dsManagerEmailSettings.Tables(0).Rows(0)("Email_Descr")) Then
                    mgrEmailFreq = dsManagerEmailSettings.Tables(0).Rows(0)("Email_Descr")
                End If
 
                If Not IsDBNull(dsManagerEmailSettings.Tables(0).Rows(0)("DesktopSLA")) Then
                    mgrDesktopSLA = dsManagerEmailSettings.Tables(0).Rows(0)("DesktopSLA")
                End If
 
                If Not IsDBNull(dsManagerEmailSettings.Tables(0).Rows(0)("StandardsSLA")) Then
                    mgrStandardSLA = dsManagerEmailSettings.Tables(0).Rows(0)("StandardsSLA")
                End If
 
                manageremail_MgrEmailPreferences.Manager_PersonNumber = ui.PersonNumber 'dsManagerEmailSettings.Tables(0).Rows(0)("Person_Num")
                manageremail_MgrEmailPreferences.Manager_EmailEnabled = mgrEmailEnabled
                manageremail_MgrEmailPreferences.Manager_EmailFrequency = mgrEmailFreq
                manageremail_MgrEmailPreferences.Manager_DesktopSLA = mgrDesktopSLA
                manageremail_MgrEmailPreferences.Manager_StandardsSLA = mgrStandardSLA
                'manageremail_MgrEmailPreferences.Visible = True
                If Not IsDBNull(dsManagerEmailSettings.Tables(0).Rows(0)("Visible")) Then
                    manageremail_MgrEmailPreferences.Manager_SLAVisible = dsManagerEmailSettings.Tables(0).Rows(0)("Visible")
                End If
            End If
 
 
        Catch ex As Exception
            lblMsg.Text = ex.Message
        End Try
 
        If Not Page.IsPostBack Then
            ui.UrlViews.Add(Request.RawUrl)
            load_sidemenu_and_radgrid(ui.PersonNumber)
            'manageremail_MgrEmailPreferences.ChangeCheckBoxValue(False)
        End If
 
    End Sub
 
 
    Protected Sub load_sidemenu_and_radgrid(ByVal iPersonNumber As Integer)
        Try
 
            'load all to one dataset (mulitple tables inside)
            '1-griddata
            '2-Summary data
            '3-Chart data
            'pnlEmailPreferences.Visible = False
            'pnlEmailPreferences.Enabled = False
            Dim qryCmd As String = String.Format("exec CVS.Get_Dashboard_Manager '{0}'", iPersonNumber)
 
            Dim dsMain As DataSet = GetDataSet(qryCmd, False)
 
 
 
            If Not IsNothing(dsMain) Then
 
                'radgrid_Dashboard.DataSource = GetDataSet(qryCmd, False)
                rptStatusInfo.DataSource = dsMain.Tables(1)
                rptStatusInfo.DataBind()
                '
                rptUpcomingItems.DataSource = dsMain.Tables(2)
                rptUpcomingItems.DataBind()
 
                RadHtmlChart_FrequencyMix.DataSource = dsMain.Tables(3)
                RadHtmlChart_FrequencyMix.DataBind()
 
                If (Not Session("GridDT") Is Nothing) Then
                    Session.Remove("GridDT")
                End If
                Session("GridDT") = dsMain.Tables(0)
 
                'radgrid_Dashboard.DataSource = dsMain.Tables(0)
                radgrid_Dashboard.DataSource = Session("GridDT")
                'radgrid_Dashboard.DataSource = TryCast(Session("GridDT"), DataTable).AsEnumerable().Where(Function(row, index) index > 0 AndAlso index < 200).CopyToDataTable()
                radgrid_Dashboard.DataBind()
                'radgrid_Dashboard.VirtualItemCount = TryCast(Session("GridDT"), DataTable).Rows.Count()
 
 
            End If
 
        Catch ex As Exception
            Response.Write(String.Format("Error in {0}<br/>Error Message:{1}", System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message))
        End Try
 
    End Sub
 
 
 
    Protected Sub hyperButton_Click(sender As Object, e As EventArgs)
        'RadWindowManager1.RadAlert("text", 350, 230, "title", "alertCallBackFn")
        Dim ui As clsUser = CType(Session("User_Info_Map"), clsUser)
        Dim ds As DataSet = GetDataSet(String.Format("select top 1 FullName,Person_Num, Manager_Person_Num ,GroupLeader_Person_Num from CVS.tbl_User_Detail where Standard_Id = '{0}' ", ui.UserId))
        Dim sUserFullName As String = ds.Tables(0).Rows(0)("FullName").ToString() '= ExecuteSqlCmdScalar(String.Format("select FullName from CVS.tbl_User_Detail where Standard_Id = '{0}' ", ui.UserId))
 
        Dim btn As Button = DirectCast(sender, Button)
 
 
        Select Case btn.CommandName
            Case "updateSearchBox_andPopulate"
                Dim radSrchBox As RadSearchBox = DirectCast(btn.Parent.FindControl(btn.CommandArgument), RadSearchBox)
                'radsearch_UserName.Text = sUserFullName
                radSrchBox.Text = sUserFullName
                load_sidemenu_and_radgrid(ui.PersonNumber)
        End Select
 
    End Sub
 
#Region "RadGrid"
 
    Protected Sub radgrid_Dashboard_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles radgrid_Dashboard.NeedDataSource
        'Dim iRadSearchBoxUserId As Integer = ExecuteSqlCmdScalar(String.Format("exec CVS.Get_SpecificUserDetail 'FullName', '{0}','Person_Num','int'", radsearch_UserName.Text))
        'Dim queryCmd As String = String.Format("exec CVS.Get_Dashboard_Manager '{0}'", IIf(iRadSearchBoxUserId = 0, ui.PersonNumber, iRadSearchBoxUserId))
        'TryCast(sender, RadGrid).DataSource = GetDataSet(queryCmd, False)
        Dim objGrid As RadGrid = TryCast(sender, RadGrid)
        objGrid.DataSource = Session("GridDT")
 
 
        'Dim objGrid As RadGrid = TryCast(sender, RadGrid)
        'objGrid.DataSource = TryCast(Session("GridDT"), DataTable).Select(String.Format("ID >={1} and ID<={0} ", objGrid.CurrentPageIndex * objGrid.PageSize, objGrid.CurrentPageIndex + 1), "ID")
 
        'Dim firstRowId As Integer = objGrid.CurrentPageIndex * objGrid.PageSize
        'Dim secondRowId As Integer = (objGrid.CurrentPageIndex + 1) * objGrid.PageSize
        'If isExport Then
        '    firstRowId = 0
        '    secondRowId = TryCast(Session("GridDT"), DataTable).Rows.Count()
        'End If
        'objGrid.DataSource = TryCast(Session("GridDT"), DataTable).Select(String.Format("ID >={0} and ID<={1} ", firstRowId, secondRowId), "ID")
 
 
    End Sub
 
    Protected Sub radgrid_Dashboard_ItemCreated(sender As Object, e As GridItemEventArgs)
        If ((e.Item.ItemType = GridItemType.FilteringItem) And (isExport)) Then
            e.Item.Visible = False
        End If
 
        If (e.Item.ItemType = GridItemType.Header) Then
            Dim hItem As GridHeaderItem = DirectCast(e.Item, GridHeaderItem)
            Dim chk1 As CheckBox = DirectCast(hItem.FindControl("checkAll"), CheckBox)
        End If
    End Sub
 
    Protected Sub radgrid_Dashboard_ItemDataBound(sender As Object, e As GridItemEventArgs)
        If (TypeOf (e.Item) Is GridDataItem) Then
 
            Dim objDataBoundItem As GridDataItem = DirectCast(e.Item, GridDataItem)
            Dim DBCELLCOLORNAME As String = IIf(IsDBNull(objDataBoundItem("Document_Status_Color").Text), "WHITE", objDataBoundItem("Document_Status_Color").Text)
 
            objDataBoundItem("Next_Review_DtTM").BackColor = Drawing.Color.FromName(DBCELLCOLORNAME)
            objDataBoundItem("Chapter").Text = objDataBoundItem("Chapter").Text.Replace("|", "<br/>")
            objDataBoundItem("Chapter").Text = objDataBoundItem("Chapter").Text.Replace("&", "&")
            objDataBoundItem("Topic_Grouping").Text = objDataBoundItem("Topic_Grouping").Text.Replace("|", "<br/>")
            objDataBoundItem("Primary_Manager").Text = objDataBoundItem("Primary_Manager").Text.Replace("|", "<br/>")
            objDataBoundItem("Manager").Text = objDataBoundItem("Manager").Text.Replace("|", "<br/>")
            objDataBoundItem("ContentOwners").Text = objDataBoundItem("ContentOwners").Text.Replace("|", "<br/>")
            objDataBoundItem("Team_Name").Text = objDataBoundItem("Team_Name").Text.Replace("|", "<br/>")
            objDataBoundItem("Stakeholders").Text = objDataBoundItem("Stakeholders").Text.Replace("|", "<br/>")
 
            Dim DID As String = objDataBoundItem.DataItem("DocumentId")
            Dim Title As String = objDataBoundItem.DataItem("Title")
            Dim Chapter As String = objDataBoundItem.DataItem("Chapter")
 
            'Dim lblTitle As Label = TryCast(Master.FindControl("lblApplicationName"), Label)
            Dim objCtrlImage As System.Web.UI.WebControls.Image = TryCast(objDataBoundItem.FindControl("img_GapFlag"), System.Web.UI.WebControls.Image)
            objCtrlImage.ImageUrl = IIf(IsDBNull(objDataBoundItem.DataItem("GapFlag")), "", objDataBoundItem.DataItem("GapFlag"))
            'objCtrlImage.ImageUrl = TryCast(objDataBoundItem("GapFlag").Controls(0), System.Web.UI.WebControls.Image).ImageUrl
 
 
        End If
    End Sub
 
 
    Protected Sub radgrid_Dashboard_SortCommand(sender As Object, e As GridSortCommandEventArgs)
        'To allow only sorting by Ascending
        'If Not e.Item.OwnerTableView.SortExpressions.ContainsExpression(e.SortExpression) Then
        '    Dim sortExpr As New GridSortExpression()
        '    sortExpr.FieldName = e.SortExpression
        '    sortExpr.SortOrder = GridSortOrder.Ascending
        '    e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr)
        'End If
 
    End Sub
 
    Protected Sub radgrid_Dashboard_ExcelMLWorkBookCreated(sender As Object, e As GridExcelBuilder.GridExcelMLWorkBookCreatedEventArgs)
        Dim objTable As TableElement = e.WorkBook.Worksheets(0).Table
        For Each objRow As RowElement In objTable.Rows
            'ApplyRowStyle(objRow, "CommonRow")
        Next
    End Sub
 
 
    Protected Sub radgrid_Dashboard_ExcelMLExportRowCreated(sender As Object, e As GridExportExcelMLRowCreatedArgs)
        Dim strTmp As String
        strtmp = ""
 
    End Sub
 
    Protected Sub radgrid_Dashboard_InfrastructureExporting(sender As Object, e As GridInfrastructureExportingEventArgs)
        Dim CharacterPixelLength As Double = 7.25
        e.ExportStructure.Tables(0).Rows(1).Style.BackColor = Color.Black
        e.ExportStructure.Tables(0).Rows(1).Style.ForeColor = Color.White
        e.ExportStructure.Tables(0).Rows(2).Height = 0.0 'hide filter row
        e.ExportStructure.ColumnWidthUnit = ExportInfrastructure.ExportUnitType.Pixel
 
        Dim lstOfColumnWidths As New List(Of Integer)
        For Each objcell As ExportInfrastructure.Cell In e.ExportStructure.Tables(0).Rows(1).Cells
            lstOfColumnWidths.Add(e.ExportStructure.Tables(0).Columns(objcell.ColIndex).Width)
        Next
 
        'data rows
        For i As Integer = 2 To e.ExportStructure.Tables(0).Rows.Count
            'e.ExportStructure.Tables(0).Rows(i).Style.BackColor = IIf(i Mod 2 = 0, Color.White, Color.LightGray)
            For Each objCell As ExportInfrastructure.Cell In e.ExportStructure.Tables(0).Rows(i).Cells
                objCell.Value = objCell.Text.Replace(Chr(10), ";")
                objCell.Value = objCell.Text.Replace("&", "&").Replace(""", """").Replace("<", "<").Replace(">", ">")
                If lstOfColumnWidths(objCell.ColIndex - 1) < (CharacterPixelLength * objCell.Text.Length) Then
                    lstOfColumnWidths(objCell.ColIndex - 1) = (CharacterPixelLength * objCell.Text.Length)
                End If
                objCell.Style.BackColor = IIf(objCell.Style.BackColor.Name = "", Color.White, objCell.Style.BackColor)
                objCell.Style.HorizontalAlign = HorizontalAlign.Left
                objCell.Style.BorderTopStyle = BorderStyle.Solid
                objCell.Style.BorderBottomStyle = BorderStyle.Solid
                objCell.Style.BorderLeftStyle = BorderStyle.Solid
                objCell.Style.BorderRightStyle = BorderStyle.Solid
 
                objCell.Style.BorderBottomColor = Color.Black
                objCell.Style.BorderTopColor = Color.Black
                objCell.Style.BorderLeftColor = Color.Black
                objCell.Style.BorderRightColor = Color.Black
            Next
        Next
 
        For Each objcell As ExportInfrastructure.Cell In e.ExportStructure.Tables(0).Rows(1).Cells
            e.ExportStructure.Tables(0).Columns(objcell.ColIndex).Width = lstOfColumnWidths(objcell.ColIndex - 1)
            'e.ExportStructure.Tables(0).Columns(objcell.ColIndex).Width = 360
        Next
 
        radgrid_Dashboard.ClientSettings.Virtualization.ItemsPerView = 500
 
        isExport = False
    End Sub
 
 
    Protected Sub radgrid_Dashboard_FilterCheckListItemsRequested(sender As Object, e As GridFilterCheckListItemsRequestedEventArgs)
        Dim objDataField As String = String.Empty
        Dim objRadGrid As RadGrid = TryCast(sender, RadGrid)
 
        If (TypeOf e.Column Is GridBoundColumn) Then
            objDataField = TryCast(e.Column, IGridDataColumn).GetActiveDataField()
        Else
            objDataField = TryCast(e.Column, GridTemplateColumn).HeaderText
 
            'Dim msgtxt As String = e.Column.ColumnType.ToString()
        End If
        e.ListBox.DataSource = GetFilterListDataSetByColumn(objDataField)
        e.ListBox.DataKeyField = objDataField
        e.ListBox.DataTextField = objDataField
        e.ListBox.DataValueField = objDataField
        e.ListBox.DataBind()
        'radgrid_Dashboard.Rebind()
 
    End Sub
 
    Protected Function GetFilterListDataSetByColumn(ByVal objColumnName As String) As DataSet
        Dim iRadSearchBoxUserId As Integer = ExecuteSqlCmdScalar(String.Format("exec CVS.Get_SpecificUserDetail 'FullName', '{0}','Person_Num','int'", radsearch_UserName.Text))
        Dim qryCmd As String = String.Format("exec CVS.Get_Document_ColumnByUserId '{0}','{1}'", objColumnName, IIf(iRadSearchBoxUserId = 0, ui.PersonNumber, iRadSearchBoxUserId))
        'qryCmd = String.Format("select '{0}'='1'", objColumnName)
        GetFilterListDataSetByColumn = GetDataSet(qryCmd, False)
 
    End Function
 
    Protected Sub radgrid_Dashboard_ItemCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs) Handles radgrid_Dashboard.ItemCommand
        Dim documentid As String = String.Empty
        Dim ictr As Integer = 0
        Try
            'RadWindowManager1.RadAlert(e.CommandName, 300, 300, "Check", "")
            If ((Not e.CommandName = "Sort") And (Not e.CommandName = "HeaderContextMenuFilter") And (Not e.CommandName = "ChangePageSize")) Then
 
                'documentid = radgrid_Dashboard.MasterTableView.DataKeyValues(e.CommandArgument)("DocumentId")
                documentid = radgrid_Dashboard.MasterTableView.DataKeyValues(e.Item.ItemIndex)("DocumentId")
                Dim script As String = String.Empty
 
                Select Case e.CommandName
                    Case "OpenSingleTrackerProjectWindow"
                        script = String.Format("function f(){0}OpenTrackerProject(',{2},','{3}'); Sys.Application.remove_load(f);{1}Sys.Application.add_load(f);", "{", "}", documentid, ui.PersonNumber)
                        'ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, True)
 
                    Case "OpenFromCodeBehind"
                        script = String.Format("function f(){0}OpenRadWin(',{2},'); Sys.Application.remove_load(f);{1}Sys.Application.add_load(f);", "{", "}", documentid)
                        ''RadWindowManager1.RadAlert("DID Search:" + documentid, 300, 300, "Check", "")
                    Case "nothing"
                        'radwindow_TrackerInfo.NavigateUrl = String.Format("http://procmgmt-contentvalidation-dev.bankofamerica.com/TrackerInfo.aspx?did={0}", documentid)
                        'radwindow_TrackerInfo.ReloadOnShow = True
                        'radwindow_TrackerInfo.ShowContentDuringLoad = False
 
                        'script = "function f(){$find(""" + radwindow_TrackerInfo.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
                    Case Else
 
                End Select
                If script.Length > 0 Then
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, True)
                End If
 
            End If
        Catch ex As Exception
            Response.Write(String.Format("Error in {0}", System.Reflection.MethodBase.GetCurrentMethod().Name))
        End Try
 
    End Sub
 
 
#End Region
 
 
#Region "Command Item Types"
 
 
    Protected Sub radsearch_UserName_Search(sender As Object, e As SearchBoxEventArgs)
        'radgrid_Dashboard.ClientSettings.Virtualization.ItemsPerView = 100
        'If isExport = True Then
        '    radgrid_Dashboard.ClientSettings.Virtualization.ItemsPerView = 60000
        'End If
        If (e.DataItem IsNot Nothing) Then
            Dim di = DirectCast(e.DataItem, Dictionary(Of String, Object))
            load_sidemenu_and_radgrid(di("userid"))
        End If
 
    End Sub
 
    Protected Sub radsearch_UserName_DataSourceSelect(sender As Object, e As Telerik.Web.UI.SearchBoxDataSourceSelectEventArgs)
        Dim src As SqlDataSource = DirectCast(e.DataSource, SqlDataSource)
        Dim searchBox As RadSearchBox = DirectCast(sender, RadSearchBox)
 
        Dim likeCondition As String = String.Format("'{0}' + @filterString + '%'", If(searchBox.Filter = SearchBoxFilter.Contains, "%", ""))
        Dim countCondition As String = If(e.ShowAllResults, " ", " TOP " + (searchBox.MaxResultCount).ToString())
 
        If e.SelectedContextItem IsNot Nothing Then
            likeCondition = String.Format("{0} and GL_FullName={1}", likeCondition, e.SelectedContextItem.Key)
        End If
 
        Dim sSqlCmd As String = "CVS.Get_ManagerList"
 
        src.SelectCommand = sSqlCmd
        src.SelectParameters.Add("whereClause", e.FilterString.Replace("%", "[%]").Replace("_", "[_]"))
 
 
    End Sub
 
 
    Protected Sub ImageButton_Click(sender As Object, e As ImageClickEventArgs)
        isExport = True
 
        'For Each col As Telerik.Web.UI.GridColumn In radgrid_Dashboard.MasterTableView.Columns
        '    radgrid_Dashboard.MasterTableView.GetColumn(col.UniqueName).HeaderStyle.BackColor = Color.Gray
        '    radgrid_Dashboard.MasterTableView.GetColumn(col.UniqueName).HeaderStyle.ForeColor = Color.White
        'Next
 
        'radgrid_Dashboard.MasterTableView.GetColumn("DocumentID").HeaderStyle.BackColor = Color.LightGray
        'radgrid_Dashboard.MasterTableView.GetColumn("Category").ItemStyle.BackColor = Color.LightGray
 
        'radgrid_Dashboard.MasterTableView.GetColumn("GapFlag").Visible = False
        'radgrid_Dashboard.MasterTableView.GetColumn("GapFlag2").Visible = False
        radgrid_Dashboard.MasterTableView.GetColumn("SelectItem").Visible = False
        radgrid_Dashboard.MasterTableView.GetColumn("TitleLink").Visible = False
        radgrid_Dashboard.MasterTableView.GetColumn("TitleExport").Display = True
 
        radgrid_Dashboard.ExportSettings.IgnorePaging = True
        'radgrid_Dashboard.ExportSettings.ExportOnlyData = True
        'clear filters
        'radgrid_Dashboard.MasterTableView.FilterExpression = ""
        'For Each objGridCol As GridColumn In radgrid_Dashboard.Columns
        '    objGridCol.CurrentFilterFunction = GridKnownFunction.NoFilter
        '    objGridCol.CurrentFilterValue = ""
        'Next
        Dim intRowsPerBatch As Integer = TryCast(Session("GridDT"), DataTable).Rows.Count()
        intRowsPerBatch = IIf(intRowsPerBatch < 50, 50, intRowsPerBatch)
        radgrid_Dashboard.ClientSettings.Virtualization.ItemsPerView = intRowsPerBatch
 
 
 
        radgrid_Dashboard.ExportSettings.FileName = String.Format("ManagerDashboard_{1}_{0:MM_dd_yyyy_hhmm}", Now, IIf(String.IsNullOrEmpty(radsearch_UserName.Text.ToString()), ui.UserName, radsearch_UserName.Text))
        radgrid_Dashboard.ExportSettings.OpenInNewWindow = True
        radgrid_Dashboard.MasterTableView.ExportToExcel()
 
    End Sub
 
#End Region
 
    Protected Sub RadAjaxManager_001_AjaxRequest(sender As Object, e As AjaxRequestEventArgs)
        Dim tstStop As String = String.Empty
        'radgrid_Dashboard.ClientSettings.Virtualization.ItemsPerView =
        'radgrid_Dashboard.PageSize = TryCast(Session("GridDT"), DataTable).Rows.Count()
        'radgrid_Dashboard.Rebind()
    End Sub
End Class
steve
Top achievements
Rank 2
 answered on 17 Jan 2017
1 answer
96 views

I have a  with GridClientSelectColumn (checkbox) column.  It seems I cannot set the checkboxes from the data using a DataTable.  So I am forced to set the checkboxes in my in a second data pass.   The grid is being used to select rows, the checks are the data, the user has picked rows and is trying to update them in this application scenario.

protected void MemberGrid_PreRender(object sender, EventArgs e)
{
    // For Checking CheckBox Column for time first time on Pageload
    if (!IsPostBack && mode == Team.Modes.Edit) {
        foreach (GridDataItem item in MemberGrid.MasterTableView.Items) {
            string memberStr = item[TeamData.MEMBER_ID].Text;
            if (team.HasMember(int.Parse(memberStr))) {
                CheckBox cb = (CheckBox)item[TeamData.TEAM_SELECT].Controls[0];
                cb.Checked = true;
                item.Selected = true;
            }
        }
    }
}

 

This works, but the problem is I must select the row (statement: item.Selected = true;). Only setting the Checked to true will not check the checkbox - I consider this a bug.  Forcing the Selected state means that if you click on the grid, the selection is removed along with every check. I consider this an unacceptable interface for my users.  Losing all your checked boxes so simply is bad. Additionally, checking a box does not remove the select from the rows - in fact, I cannot figure out a way to unselect without removing all the checks.  All this has forced me to put this note on my web page above the grid.

Important tip, hold the Ctrl key down while selecting rows to avoid unselecting other rows.

I do not know how this will impact tablet users that do not have a Ctrl key.  I suspect editing your checked rows will not be possible. Changing a filter or sorting by column removes the selection along with all the checks (that is, it remove the user's data).

This forum post discusses checking boxes and stops at needing to select the row after the check only does not work. 

George

George
Top achievements
Rank 2
 answered on 17 Jan 2017
4 answers
104 views

When I am with two raddocks open and I click on one with items from a treeview, after a while clicking the treeview disappears and the dock goes blank, how can I resolve this? Follow the video link with the demonstration of the error.

Https://www.screencast.com/t/wzTL3upWl

Regards
Wiliam

Wiliam
Top achievements
Rank 1
 answered on 17 Jan 2017
8 answers
97 views

I have a question about the behavior of the RadEditor control.

We have a page in our website that contains a RadEditor control.   This page is on two different servers representing two different environments.  Test environment and Production Environment.   The page is the same page in both environments.

Here is the quandary, the RadEditor control is behaving differently on the two servers.

In the test Environment if I type the following into the control:

Test
Test
Test
Test

And then look at the HTML I see:

Test<br />
Test<br />
Test<br />
Test<br />

As I would expect.

However in the Production Environment if I type

Test
Test
Test
Test

Then look at the HTML I see:

< p>Test </p>
< p>Test </p>
< p>Test </p>
< p>Test </p>

I am at a loss as to why the behavior is so different.   Is there some configuration that could be different between the servers / environments?
Why would the control behave differently like this?

Thanks for your help.

Gary Graham

Vessy
Telerik team
 answered on 17 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?