Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
370 views
Hi,

I recently changed one of my Telerik web applications over to the "silk" theme, as it seems very well done indeed.

However, I have a minor problem. In my RadToolbar instances, it's very difficult to read the text of RadToolbarButtons when they are disabled. The disabled text color is simply too light.

I'm attaching a screenshot of my application toolbar so you can see what I mean. The "restore" and "edit" buttons are both disabled, and their captions are very difficult to read.

How can I change the text color for these disabled buttons?
Magdalena
Telerik team
 answered on 01 Aug 2014
1 answer
121 views
Hello, Telerik Team.
We ran into a weird problem. The scrolling function does not work properly in IE 11 (I think IT restricts the policy to IE 8 or under in the domain since I did not find any issue in my home laptop IE 11).

Here is the page code.
<telerik:RadGrid ID="RotateGrid" Width="950px" runat="server" GridLines="None"
                    AllowPaging="false" AllowSorting="false" PageSize="10" Visible="true"
                    Skin="Vista" HeaderStyle-Font-Bold="true" OnItemDataBound="RotateGrid_ItemDataBound">
                    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst"
                        Dir="LTR" Frame="Border" TableLayout="Fixed" HeaderStyle-Font-Bold="true">
                        <Columns>
                            <telerik:GridBoundColumn DataField="AcademicYear" HeaderText="Academic Year" Visible="True" HeaderStyle-Width="85px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Period" HeaderText="Period" Visible="True" HeaderStyle-Width="40px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="StartDate" HeaderText="Start" Visible="True" HeaderStyle-Width="70px" DataFormatString="{0:M/d/yyyy}">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EndDate" HeaderText="End" Visible="True" HeaderStyle-Width="70px" DataFormatString="{0:M/d/yyyy}">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Preceptor" HeaderText="Preceptor" UniqueName="Preceptor" Visible="True" HeaderStyle-Width="188px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Preceptor" HeaderText="PreceptorHid" UniqueName="PreceptorHid" Display="false" HeaderStyle-Width="0px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Rotation" HeaderText="Rotation" UniqueName="Rotation" Visible="True" HeaderStyle-Width="188px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Rotation" HeaderText="RotationHid" UniqueName="RotationHid" Display="false" HeaderStyle-Width="0px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Team" HeaderText="Team" Visible="True" HeaderStyle-Width="35px" Display="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="HoStatus" HeaderText="HO" Visible="True" HeaderStyle-Width="32px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="AttStatus" HeaderText="Att" Visible="True" HeaderStyle-Width="32px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="RotStatus" HeaderText="Rot" Visible="True" HeaderStyle-Width="32px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="StudentYear" HeaderText="StudentYear" Display="false" HeaderStyle-Width="0px">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <ClientSettings>
                        <Scrolling AllowScroll="true" UseStaticHeaders="True" ScrollHeight="370px"></Scrolling>
                    </ClientSettings>
                </telerik:RadGrid>

Back-End C#:
protected void Page_Load(object sender, EventArgs e)
    {
        IsValidUser();
 
        using (var context = new CourseInformationDataContext())
        {
            var studentId = (string)Session["StudentID"];
            var classMemberList = from cm in context.Class_Members
                                  join sm in context.CO_StudentMappings on cm.ID equals sm.WesternU_Id
                                  where cm.ID == studentId
                                  select new
                                  {
                                      // use  ?? "null coalescing" operator to handle nulls
                                      Last = cm.Last ?? "",
                                      First = cm.First ?? "",
                                      Nickname = cm.Nickname ?? "",
                                      PhotoURL = cm.PhotoURL ?? "",
                                      StudentID = cm.ID ?? "",
                                      Class = cm.Class ?? "",
                                      MediTrekId = sm.MediTrek_Id ?? "",
                                  };
 
            foreach (var member in classMemberList)
            {
                Class.Text = member.Class;
                StudentId.Text = "WU ID: " + member.StudentID;
                MediTrekId.Text = "MediTrek ID: " + member.MediTrekId;
                MediTrekIdHid.Value = member.MediTrekId;
                LastNameLbl.Text = member.Last.ToString();
 
                // concatenate the names if nickname is present
                if (!string.IsNullOrEmpty(member.Nickname.ToString()))
                {
                    FirstNameLbl.Text = member.First.ToString() + "  (" + member.Nickname.ToString() + ")";
                }
                else
                {
                    FirstNameLbl.Text = member.First.ToString();
                }
 
                StudentImage.ImageUrl = AppSolution.ImageVal(Server, "~/Pics/" + member.PhotoURL.ToString());
 
                if (Session["Demonstration"] == "true")
                {
                    StudentImage.CssClass = "blurImage";
                    LastNameLbl.Text = DemoWordsWithGUID(LastNameLbl.Text.Length);
                    FirstNameLbl.Text = DemoWordsWithGUID(FirstNameLbl.Text.Length);
                    StudentId.Text = "WU ID: @123456789";
                    MediTrekId.Text = "MediTrek ID: 123456";
                    DemoModeCreator dmc = new DemoModeCreator();
                    StudentImage.ImageUrl = "~/Pics/" + dmc.DemoImage(member.PhotoURL.ToString());
                }
            }
 
            //Rotation Schedule Grid
            var rotateList = from mts in context.CO_MediTrekEvalStatus
                             join sm in context.CO_StudentMappings on mts.StudentMediTrekId equals sm.MediTrek_Id
                             where sm.WesternU_Id.Equals(studentId)
                             orderby mts.StartDate
                             select mts;
 
            RotateGrid.DataSource = rotateList;
            RotateGrid.DataBind();
        }
    }
 
    protected void RadComboBox1_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
    {
        CO_MediTrekEvalDetail item = e.Item.DataItem as CO_MediTrekEvalDetail;
        e.Item.Text = item.FromDate.GetValueOrDefault().ToString("MM/dd/yyyy") + " - " + item.Preceptor + "@" + item.Rotation;
        e.Item.Value = item.CompositeKey;
    }
 
    protected void RotateGrid_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            DateTime now = DateTime.Now;
            DateTime from = Convert.ToDateTime(item["StartDate"].Text);
            DateTime to = Convert.ToDateTime(item["EndDate"].Text);
            if (from == null || to == null)
                return;
 
            to = to.AddDays(1);
 
            if (now.Ticks >= from.Ticks && now.Ticks <= to.Ticks)
            {
                item.BackColor = System.Drawing.Color.LightGreen;
            }
 
            int len = 29;
            string tx1 = item["Preceptor"].Text;
            if (tx1.Length > len)
                item["Preceptor"].Text = "<div onmouseover=\"ShowLongString(this);\" onmouseout=\"ShowShortString(this);\"><span class=\"short\">" + tx1.Substring(0, len) + "...</span><span class=\"long\" style=\"display:none;\">" + tx1 + "</span></div>";
            string tx2 = item["Rotation"].Text;
            if (tx2.Length > len)
                item["Rotation"].Text = "<div onmouseover=\"ShowLongString(this);\" onmouseout=\"ShowShortString(this);\"><span class=\"short\">" + tx2.Substring(0, len) + "...</span><span class=\"long\" style=\"display:none;\">" + tx2 + "</span></div>";
 
            //DIV block for status
            AttachStatusDiv(ref item, "HoStatus");
            AttachStatusDiv(ref item, "AttStatus");
            AttachStatusDiv(ref item, "RotStatus");
        }
    }
 
    private void AttachStatusDiv(ref GridDataItem item, string columnName)
    {
        //string greenDiv = "<div class=\"rot-done\" title=\"done\"></div>";
        string pinkDiv = "<div class=\"rot-due\" title=\"due\"></div>";
        string hoStatus = item[columnName].Text.ToLower().Trim();
 
        string compositeKey = "";
        switch (columnName)
        {
            case "HoStatus":
                {
                    int sy = 0;
                    try
                    {
                        sy = int.Parse(item["StudentYear"].Text);
                    }
                    catch (Exception) { }
                    // For 4th year evalution, it has mid-term and final two evaluations.
                    if (sy == 4)
                        compositeKey = string.Join("@", MediTrekIdHid.Value, item["PreceptorHid"].Text, "@Mid-Term" + item["StartDate"].Text, item["Period"].Text, AppEnumeration.CO_MT_EVAL_TYPE["pes"]) + "|pes";
                    else
                        compositeKey = string.Join("@", MediTrekIdHid.Value, item["PreceptorHid"].Text, item["StartDate"].Text, item["Period"].Text, AppEnumeration.CO_MT_EVAL_TYPE["pes"]) + "|pes";
                    break;
                }
            case "AttStatus":
                {
                    compositeKey = string.Join("@", MediTrekIdHid.Value, item["PreceptorHid"].Text, item["StartDate"].Text, item["Period"].Text, AppEnumeration.CO_MT_EVAL_TYPE["sep"] + "|sep");
                    break;
                }
            case "RotStatus":
                {
                    compositeKey = string.Join("@", MediTrekIdHid.Value, item["RotationHid"].Text, item["StartDate"].Text, item["Period"].Text, AppEnumeration.CO_MT_EVAL_TYPE["ses"] + "|ses");
                    break;
                }
            default:
                {
                    break;
                }
        }
        switch (hoStatus)
        {
            case "done":
                item[columnName].Controls.Add(GetDoneButton(compositeKey));
                //item[columnName].Text = greenDiv;
                break;
            case "due":
                item[columnName].Text = pinkDiv;
                break;
            default:
                break;
        }
    }
 
    private RadButton GetDoneButton(string compositeKey)
    {
        RadButton btn = new RadButton
                        {
                            Skin = "",
                            Width = new System.Web.UI.WebControls.Unit(12),
                            Height = new System.Web.UI.WebControls.Unit(16),
                            BackColor = System.Drawing.Color.LightGreen,
                            BorderWidth = new System.Web.UI.WebControls.Unit(1),
                            BorderColor = System.Drawing.Color.Black,
                            BorderStyle = System.Web.UI.WebControls.BorderStyle.Solid,
                            ToolTip = "Click to view the detail.",
                            CommandArgument = compositeKey,
                        };
        btn.Click += GetDetail;
 
        return btn;
    }
 
    protected void GetDetail(object sender, System.EventArgs e)
    {
        RadButton btn = sender as RadButton;
        string[] paras = btn.CommandArgument.Split('|');
        string compositeKey = paras[0];
        if (!string.IsNullOrEmpty(compositeKey))
        {
            RotationGridPanel.Visible = false;
            CompositeKeyHid.Value = compositeKey;
            using (var context = new CourseInformationDataContext())
            {
                var evaluationList = (from ev in context.CO_MediTrekEvalDetails
                                      where ev.CompositeKey.Equals(compositeKey)
                                      select ev).FirstOrDefault();
 
                if (evaluationList != null)
                {
                    List<EvaluationModel> list = new List<EvaluationModel>();
                    string title = "";
                    switch (paras[1])
                    {
                        case "pes":
                            {
                                int qc = 7;
                                string[] local = precptEvalsOfStuQuestions6;
                                if (int.Parse(evaluationList.StudentYear) > 2)
                                {
                                    qc = 10;
                                    local = precptEvalsOfStuQuestions9;
                                }
 
                                for (int i = 1; i < qc; i++)
                                {
                                    EvaluationModel model = new EvaluationModel
                                    {
                                        Item = local[i - 1],
                                        Result = evaluationList.GetType().GetProperty("Q" + i).GetValue(evaluationList) as string,
                                    };
                                    list.Add(model);
                                }
 
                                title = "Preceptor Evaluation of Student";
                                DescriptionLit.Text = "";
                                DescriptionLit.Visible = false;
                                if (int.Parse(evaluationList.StudentYear) == 4)
                                {
                                    FouthYearSwitch.Items[0].Selected = true;
                                    FouthYearSwitch.Visible = true;
                                }
                                else
                                    FouthYearSwitch.Visible = false;
 
                                break;
                            }
                        case "sep":
                            {
                                int qc = 12;
                                string[] local = stuEvalsOfPrecptQuestion11;
                                if (int.Parse(evaluationList.StudentYear) > 2)
                                {
                                    qc = 15;
                                    local = stuEvalsOfPrecptQuestion14;
                                }
                                for (int i = 1; i < qc; i++)
                                {
                                    EvaluationModel model = new EvaluationModel
                                    {
                                        Item = local[i - 1],
                                        Result = evaluationList.GetType().GetProperty("Q" + i).GetValue(evaluationList) as string,
                                    };
                                    list.Add(model);
                                }
 
                                title = "Student Evaluation of Preceptor";
                                DescriptionLit.Text = "<div style=\"padding-bottom:5px;\"><i>NA = Unable to Assess; 1 = Strongly Disagree; 2 = Disagree; 3 = Agree; 4 = Strongly Agree</i></div>";
                                DescriptionLit.Visible = true;
                                FouthYearSwitch.Visible = false;
 
                                break;
                            }
                        case "ses":
                            {
                                int qc = 14;
                                for (int i = 1; i < qc; i++)
                                {
                                    EvaluationModel model = new EvaluationModel
                                    {
                                        Item = stuEvalsOfSiteQuestions[i - 1],
                                        Result = evaluationList.GetType().GetProperty("Q" + i).GetValue(evaluationList) as string,
                                    };
                                    list.Add(model);
                                }
 
                                title = "Student Evaluation of Site";
                                DescriptionLit.Text = "<div style=\"padding-bottom:5px;\"><i>NA = Unable to Assess; 1 = Strongly Disagree; 2 = Disagree; 3 = Agree; 4 = Strongly Agree</i></div>";
                                DescriptionLit.Visible = true;
                                FouthYearSwitch.Visible = false;
 
                                break;
                            }
                        default: break;
                    }
                    // Mandatory and General Comments
                    EvaluationModel mc = new EvaluationModel
                    {
                        Item = this.mc,
                        Result = evaluationList.MandatoryComments,
                    };
                    list.Add(mc);
 
                    EvaluationModel gc = new EvaluationModel
                    {
                        Item = this.gc,
                        Result = evaluationList.GeneralComments,
                    };
                    list.Add(gc);
 
                    RotDetailGrid.Visible = true;
                    RotDetailGrid.DataSource = list;
                    RotDetailGrid.DataBind();
                    GridTitle.Text = "<b>Type</b>: " + title;
                    DateLit.Text = "<b>Time</b>: " + evaluationList.FromDate.GetValueOrDefault().ToString("MM/dd/yyyy") + " - " + evaluationList.ToDate.GetValueOrDefault().ToString("MM/dd/yyyy");
                    EvaluatorLit.Text = "<b>Preceptor</b>: " + evaluationList.Preceptor;
                    RotationLit.Text = "<b>Rotation</b>: " + evaluationList.Rotation;
                    ErrorLit.Visible = false;
                }
                else
                {
                    GridTitle.Text = "";
                    DateLit.Text = "";
                    EvaluatorLit.Text = "";
                    RotationLit.Text = "";
                    RotDetailGrid.Visible = false;
                    ErrorLit.Text = "<div style=\"padding-top:10px;font-size:12px;\"><img src=\"" + Page.ResolveUrl("~/Styles/Images/error.gif") + "\" alt=\"error\" style=\"vertical-align:middle;\"/> We cannot find the evaluation data for you. You may contact <a href=\"mailto:app@westernu.edu?subject=CO MediTrek Data Issue\">app@westernu.edu</a> to check the detail for you.</div>";
                    ErrorLit.Visible = true;
                    if (compositeKey.IndexOf("Mid-Term") != -1)
                    {
                        FouthYearSwitch.ClearSelection();
                        FouthYearSwitch.Visible = true;
                    }
                    else
                        FouthYearSwitch.Visible = false;
                }
            }
 
            RotDetailPanel.Visible = true;
        }
    }

Pavlina
Telerik team
 answered on 01 Aug 2014
2 answers
7.3K+ views
Hi i need to display the count of rows of the grid in the top of my page. I used the follg code. but it shows the count of that page alone. i want all the rows irrespective of the pages. and i also need to display the pages co9unt. pls help me
  protected void gridViewPograms_ItemDataBound(object sender, GridItemEventArgs e)
        {
            int i = gridViewPograms.Items.Count;
            labelCount.Text = i.ToString();
        }

Thanks,
Jeevitha
Eyup
Telerik team
 answered on 01 Aug 2014
1 answer
274 views
Hi

Im having a problem aligning my submenu text.

Its not inheriting the same style as the menu.



 <telerik:RadMenu ID="Menu" class="menu" runat="server" Flow="Vertical" 
                                 width="270px" ExpandAnimation-Duration="300" EnableEmbeddedSkins="False" 
                                 ForeColor="Black" >

                                     <Items>
                                        <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px" Font-Size="16px" 
                                             Font-Bold="true" ImageUrl="images/Sphere.png" NavigateUrl="~/Some Text.aspx" >
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px" Font-Size="16px" 
                                             Font-Bold="true" ImageUrl="images/Sphere.png" NavigateUrl="~/Some Text.aspx" >
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px" Font-Size="16px" 
                                             Font-Bold="true" ImageUrl="images/Sphere.png" NavigateUrl="~/Some Text.aspx" >
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px" Font-Size="16px" 
                                         Font-Bold="true" ImageUrl="images/Sphere.png" NavigateUrl="~/Some Text.aspx">
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px" Font-Size="16px" 
                                             Font-Bold="true" ImageUrl="images/Sphere.png" NavigateUrl="~/Some Text.aspx">
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px" 
                                             Font-Size="16px" Font-Bold="true" ImageUrl="images/Sphere.png" >
                                            <Items>
                                                <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px"
                                                    Font-Size="16px" Font-Bold="true" ImageUrl="images/Sphere.png" 
                                                    NavigateUrl="~/Some Text.aspx" >
                                                </telerik:RadMenuItem>
                                                <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px" 
                                                    Font-Size="16px" Font-Bold="true" ImageUrl="images/Sphere.png" 
                                                    NavigateUrl="~/Some Text.aspx">
                                                </telerik:RadMenuItem>
                                                <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px"
                                                    Font-Size="16px" Font-Bold="true" ImageUrl="images/Sphere.png" 
                                                    NavigateUrl="~/Some Text.aspx"  >
                                                </telerik:RadMenuItem>
                                                <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px" 
                                                    Font-Size="16px" Font-Bold="true" ImageUrl="images/Sphere.png" 
                                                    NavigateUrl="~/Some Text.aspx" >
                                                </telerik:RadMenuItem>
                                                <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px" 
                                                    Font-Size="16px" Font-Bold="true" ImageUrl="images/Sphere.png" 
                                                    NavigateUrl="~/Some Text.aspx" >
                                                </telerik:RadMenuItem>
                                                <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px"
                                                    Font-Size="16px" Font-Bold="true" ImageUrl="images/Sphere.png" 
                                                    NavigateUrl="~/Some Text.aspx" >
                                                </telerik:RadMenuItem>
                                                 <telerik:RadMenuItem runat="server" Text="Some Text" Height="40px"
                                                    Font-Size="16px" Font-Bold="true" ImageUrl="images/Sphere.png" 
                                                    Target = "_blank" NavigateUrl="~/Some Text.aspx" > 
                                            
                                                </telerik:RadMenuItem>

When I hover iver the last tab, it displays a new tab but the text is not correctly aligned

Your help would be much appreciated.

Grant



 
Magdalena
Telerik team
 answered on 01 Aug 2014
1 answer
139 views
<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All"
        EnableRoundedCorners="false" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid" LoadingPanelID="RadAjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Office2010Blue">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadGrid ID="RadGrid" runat="server"
    AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False"
        AllowFilteringByColumn="True" CellSpacing="0" GridLines="None"
    HeaderStyle-Font-Bold="true" DataSourceID="SqlDataSource1"
        Skin="Web20" OnNeedDataSource="RadGridt_NeedDataSource" ShowGroupPanel="True"
        OnColumnCreated="RadGrid_ColumnCreated">
        <MasterTableView DataKeyNames="Clien" DataSourceID="SqlDataSource1">
            <Columns>
            <telerik:GridBoundColumn DataField="Employee" HeaderText="Employee "></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Client" HeaderText="Client "></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Month" HeaderText="Month " AllowFiltering="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Cost" HeaderText=" Cost" AllowFiltering="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Hours" HeaderText=" Hours" AllowFiltering="false"></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings AllowDragToGroup="True" />
 
<HeaderStyle Font-Bold="True"></HeaderStyle>
    </telerik:RadGrid>
 
 
                      <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ss%>"
                     SelectCommand="SelectSummary"     
  SelectCommandType="StoredProcedure"></asp:SqlDataSource>
This is my code .
is their anything else that can increse sorting,drag drop ,paging performance.
Princy
Top achievements
Rank 2
 answered on 01 Aug 2014
12 answers
245 views
I am attempting to export from a RadGrid and instead of getting a nice exported graph, I get a graph that has the Command Item bar attached to it. IT has the 4 export buttons as well. It posts all the buttons and has mouseover text on the sortable columns saying, 'click to sort'. It also prints out the hyper links and attempts to display the images from the webpage. It then also prints the boxes for the filtering and the text that would be included were you to filter this graph beforehand.

The weird thing is that I have two RadGrids on this same page and one works perfectly while this one doesn't.

For reference, the image of the broken one can be seen on imgur here: http://i.imgur.com/KKtITTX.png

I have attempted the following things:

Protected Sub rgvSection_ItemCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs)
            If e.CommandName = RadGrid.ExportToWordCommandName Then
                For Each item As GridCommandItem In e.Item.OwnerTableView.GetItems(GridItemType.CommandItem)
                    item.Visible = False
                Next
            End If
End Sub

This had no change whatsoever.

Attempted:

<ExportSettings ExportOnlyData="true"></ExportSettings>

Also had no effect. I swear that I have done multiple graphs on the same page exporting just fine. Not really sure what I'm running into here. Any feedback is well appreciated!
Kostadin
Telerik team
 answered on 01 Aug 2014
6 answers
580 views
Hi,
I trying to build a custom handler, becouse I dont want to use temporary folder, and use multiple file upload with rad async upload but I dont understand how to do.
I read over net that isn't possible...some ideas?
Gianluca
Top achievements
Rank 1
 answered on 01 Aug 2014
1 answer
115 views
Please find the attachments

In IE tooltip is showing in correct place but when comes to chrome tooltip showing somewhere else
Danail Vasilev
Telerik team
 answered on 01 Aug 2014
4 answers
1.6K+ views
I have a page with 2 radgrid controls. On pages where I have only one RadGrid, I use RadAjaxManager on the grid control and it works good. But Here where I have 2 grids on same page, and using RadAjaxManager on each grid, I saw a couple of issues like sorting not working. So i read about the  RadAjaxManagerProxy. I gave it a try but failed.

On the main page I added the RadAjaxManager as follows:
    protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            RadAjaxManager manager = new RadAjaxManager();
            manager.ID = "RadAjaxManager1";
            manager.AjaxSettings.AddAjaxSetting(_BANCtrl, _UpdatePanel);
            manager.AjaxSettings.AddAjaxSetting(_DocumentCtrl, _UpdatePanel);
            this._FsMain.Controls.Add(manager);
           }
Both the _BANCtrl and _DocumentCtrl are added to an Update panel. Next in the _BANCtrl, I add the proxy as follows:
protected override void OnPreRender(EventArgs e)
 {      
     base.OnPreRender(e);
     radProxy.ID = "RadAjaxManagerProxy1";
     radProxy.AjaxSettings.AddAjaxSetting(this._AssignBanGrid, _Panel);
 }
I have a similar thing on _DocumentCtrl also. But it doesnt work. When I sort, i get an error as follows:
Uncaught TypeError: Cannot set property 'control' of undefined. I am sure I have not set the RadAjaxManagerProxy and RadAjaxManager correctly.
Konstantin Dikov
Telerik team
 answered on 01 Aug 2014
1 answer
121 views
Dear Telerik,

I'm trying to do an Year-On-Year comparison and I thought that creating a calculateditem will be the way of doing it (similar to this demo). However, I get the error of "Object reference not set to an instance of an object" I wonder what might be the potential cause?

Here's an extraction of the code I have and snapshot to show the grid structure.
<telerik:RadPivotGrid ID="RadPivotGrid_DataView" runat="server" Height="100%" AllowSorting="True" OnItemCommand="RadPivotGrid_DataView_ItemCommand" OnCellCreated="RadPivotGrid_DataView_CellCreated" DataSourceID="Sql_Contract_Details" EnableToolTips="True" EnableZoneContextMenu="True" EnableConfigurationPanel="True" OnFieldCreated="RadPivotGrid_DataView_FieldCreated" Skin="Office2010Blue" OnCellDataBound="RadPivotGrid_DataView_CellDataBound" Culture="en-GB" OnItemNeedCalculation="RadPivotGrid_DataView_ItemNeedCalculation" AllowPaging="True" PageSize="30" AggregatesLevel="1">
                                                <FieldsPopupSettings AggregateFieldsMinCount="1" />
                                                <PagerStyle ChangePageSizeButtonToolTip="Change Page Size" PageSizeControlType="RadComboBox" />
                                                <OlapSettings>
                                                    <XmlaConnectionSettings></XmlaConnectionSettings>
                                                </OlapSettings>
                                                <Fields>
                                                    <telerik:PivotGridReportFilterField Caption="Meeting Class" DataField="MeetingClass" UniqueName="MeetingClass" IsHidden="false">
                                                    </telerik:PivotGridReportFilterField>
                                                    <telerik:PivotGridReportFilterField Caption="Event Type" DataField="EventType" UniqueName="EventType" IsHidden="false">
                                                    </telerik:PivotGridReportFilterField>
                                                    <telerik:PivotGridReportFilterField Caption="M&E Cluster" DataField="M_and_E_Cluster" UniqueName="M_and_E_Cluster" IsHidden="false">
                                                    </telerik:PivotGridReportFilterField>
                                                    <telerik:PivotGridReportFilterField Caption="Source Group" DataField="LeadSource" UniqueName="LeadSource" IsHidden="false">
                                                    </telerik:PivotGridReportFilterField>
 
                                                    <telerik:PivotGridColumnField Caption="Creation Year" SortOrder="Descending" DataField="CreatedDate" GroupInterval="Year" UniqueName="CreationDateYear" IsHidden="false">
                                                        <%--THIS CAUSES "Object reference not set to an instance of an object" ERROR
                                                            <CalculatedItems>
                                                                <telerik:PivotGridCalculatedItem GroupName="Forecast for 1999"></telerik:PivotGridCalculatedItem>
                                                            </CalculatedItems>            
                                                        --%>                                       
                                                    </telerik:PivotGridColumnField>
                                                    <telerik:PivotGridRowField Caption="Creation Month" DataField="CreatedDate" GroupInterval="Month" UniqueName="CreationDateMonth" IsHidden="false">
                                                    </telerik:PivotGridRowField>
 
                                                    <telerik:PivotGridColumnField Caption="Arrival Year" SortOrder="Descending" DataField="EventStartDate" GroupInterval="Year" UniqueName="ArrivalYear" IsHidden="true">
                                                    </telerik:PivotGridColumnField>
                                                    <telerik:PivotGridRowField Caption="Arrival Month" DataField="EventStartDate" GroupInterval="Month" UniqueName="ArrivalMonth" IsHidden="true">
                                                    </telerik:PivotGridRowField>
 
                                                    <telerik:PivotGridRowField Caption="Status" DataField="StatusText" UniqueName="StatusText" IsHidden="false" SortOrder="None">
                                                        <CalculatedItems>
                                                            <telerik:PivotGridCalculatedItem GroupName="Total Exc TD"></telerik:PivotGridCalculatedItem>
                                                            <telerik:PivotGridCalculatedItem GroupName="Total"></telerik:PivotGridCalculatedItem>
                                                            <telerik:PivotGridCalculatedItem GroupName="Conversion % Exc TD"></telerik:PivotGridCalculatedItem>
                                                            <telerik:PivotGridCalculatedItem GroupName="Conversion %"></telerik:PivotGridCalculatedItem>
                                                        </CalculatedItems>
                                                    </telerik:PivotGridRowField>
 
                                                    <telerik:PivotGridAggregateField DataField="RecordCount" Aggregate="Count" Caption="Enquiries" IsHidden="false">
                                                    </telerik:PivotGridAggregateField>
                                                    <telerik:PivotGridAggregateField DataField="TotalFunctionRevenue" Aggregate="Sum" Caption="Revenue" IsHidden="false" DataFormatString="{0:C0}">
                                                    </telerik:PivotGridAggregateField>
                                                    <telerik:PivotGridAggregateField DataField="TotalFunctionRevenue" Aggregate="Average" Caption="Average Revenue" IsHidden="false" DataFormatString="{0:C0}">
                                                    </telerik:PivotGridAggregateField>
                                                    <telerik:PivotGridAggregateField DataField="RecordCount" Caption="YOY" IsHidden="false">
                                                        <TotalFormat Axis="Columns" TotalFunction="DifferenceFromPrevious" />
                                                    </telerik:PivotGridAggregateField>
                                                </Fields>
                                                <ClientSettings EnableFieldsDragDrop="True">
                                                    <Scrolling AllowVerticalScroll="True"></Scrolling>
                                                </ClientSettings>
                                                <TotalsSettings RowsSubTotalsPosition="None" RowGrandTotalsPosition="None" ColumnsSubTotalsPosition="None" ColumnGrandTotalsPosition="None"></TotalsSettings>
                                                <ConfigurationPanelSettings EnableOlapTreeViewLoadOnDemand="True" DefaultDeferedLayoutUpdate="True" LayoutType="OneByFour"></ConfigurationPanelSettings>
                                            </telerik:RadPivotGrid>


Many Thanks.

Angel Petrov
Telerik team
 answered on 01 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?