Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
111 views
   Static Header property is not working as expected. Please refer to attached screenshot.
Princy
Top achievements
Rank 2
 answered on 02 Jul 2013
5 answers
337 views
Hi There,

i am using Radgrid for displaying records in groups. i have set group by filed in code behind - under Initialize method in my Code(Below).i am hiding some of the columns (that i do not intend to display) in ItemDataBound method.
Now the problem is it brings an extra column in the view that i am not able to remove.i have attached the screenshot of the Radgrid for reference.

please help.
Thanks in advance.
- Neeraj

 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="QuestionResponseTableView.ascx.cs"
    Inherits="CEB.CLC.Reporting.GenView.UserControls.QuestionResponseTableView" %>
<%@ Register Src="~/UserControls/ExportData.ascx" TagName="ExportData" TagPrefix="ucl" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<div id="expDiv" runat="server" class="text-right z-index-0">
    <ucl:ExportData EnableViewState="true" ID="edQuestionResponse" runat="server" />
</div>
<div class="clear">
</div>
<div id="dvOuter" runat="server">
    <div id="dvContent" runat="server">
        <asp:Panel ID="pnlContent" runat="server" CssClass="graphviewposition">
            <div class="tablelink" id="dvGrid" runat="server">
                <telerik:RadGrid AlternatingItemStyle-CssClass="even" ID="radGridQuestion" OnItemCreated="radGridQuestion_ItemCreated"
                    OnColumnCreated="radGridQuestion_ColumnCreated" OnItemDataBound="radGridQuestion_ItemDataBound"
                    runat="server" AutoGenerateColumns="true" GridLines="none">
                    <MasterTableView GroupsDefaultExpanded="true">
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <SelectFields>
                                </SelectFields>
                                <GroupByFields>
                                </GroupByFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                    </MasterTableView>
                    <ClientSettings>
                        <Resizing ResizeGridOnColumnResize="false" AllowColumnResize="true" />
                    </ClientSettings>
                </telerik:RadGrid>
            </div>
        </asp:Panel>
        <div class="clear">
        </div>
    </div>
</div>

public void Initialize(IReportDataView inputData, ReportDTO report, PageInfo pageInfo)
        {
            if (!base.DisplayExportHeader)
            {
                edQuestionResponse.Visible = false;
            }
  
            //setting GroupBy field name from Resource file 
            string groupByFieldName = base.GetResxString("Col_ItemText", ComparisonViewRESX.Col_ItemText).Replace(" ", "");
  
            if (this.radGridQuestion.MasterTableView.GroupByExpressions[0].SelectFields.Count == 0)
            {
                this.radGridQuestion.MasterTableView.GroupByExpressions[0].SelectFields.Add(new GridGroupByField() { FieldName = groupByFieldName });
                this.radGridQuestion.MasterTableView.GroupByExpressions[0].GroupByFields.Add(new GridGroupByField() { FieldName = groupByFieldName, SortOrder = GridSortOrder.Ascending });
            }
  
            DataTable dtFrequencyData = inputData.GetView();
            radGridQuestion.DataSource = dtFrequencyData.DefaultView;
            radGridQuestion.DataBind();
  
            if (EnableHyperLink && report.ReportParameters.QuestionResponseViewType != CEB.CLC.Reporting.Core.Enum.ViewType.DoNotShow)
            {
                dvContent.Attributes.Add("onmouseover", "this.style.cursor='pointer'");
                dvContent.Attributes.Add("onClick", "javascript:TransferTablePath(" + DataViewId + " )");
            }
  
            edQuestionResponse.TableView = dtFrequencyData;
            edQuestionResponse.ExportDataViewStyle = DataViewStyleEnum.QuestionResponse;
  
            ViewState["FrequencyData"] = dtFrequencyData;
        }
  
protected void radGridQuestion_ItemDataBound(object sender, GridItemEventArgs e)
        {
            foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)
            {
  
                if (column.UniqueName == "ItemId")
                {
                    column.Visible = false;
                }
  
            }
            if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = e.Item as GridDataItem;
                dataItem[base.GetResxString("Col_ItemText", ComparisonViewRESX.Col_ItemText)].Text = String.Empty;
            }
            else if (e.Item is GridHeaderItem)
            {
                RadGrid objGridView = sender as RadGrid;
                DataView objDataView = objGridView.DataSource as DataView;
                DataTable objDataTable = objDataView.Table;
                foreach (DataColumn col in objDataTable.Columns)
                {
                    int index = objDataTable.Columns.IndexOf(col);
                    if (e.Item.Cells[index + 3].HasControls())
                    {
                        LiteralControl columnName = (LiteralControl)e.Item.Cells[index + 3].Controls[0];
                        columnName.Text = col.Caption;
                    }
                }
            }
            else if (e.Item is GridGroupHeaderItem)
            {
                GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;
                DataRowView groupDataRow = (DataRowView)e.Item.DataItem;
                item.DataCell.Text = groupDataRow[base.GetResxString("Col_ItemText", ComparisonViewRESX.Col_ItemText)].ToString();
  
            }
  
        }
  
        protected void radGridQuestion_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
        {
            if (e.Column is GridGroupSplitterColumn)
            {
                e.Column.HeaderStyle.Width = Unit.Pixel(1);
                e.Column.ItemStyle.Width = Unit.Pixel(1);
                e.Column.Resizable = false;
            }
        }
  
        protected void radGridQuestion_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridGroupHeaderItem)
            {
                (e.Item as GridGroupHeaderItem).Cells[0].Controls.Clear();
            }
        }
Laurie
Top achievements
Rank 2
 answered on 02 Jul 2013
2 answers
104 views
Hello Telerik Team,
to use RadToolTipManager. It display tooltip works fine. but not show small arrow pointing. I set  ShowCallout="true" in below code:
<telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Skin="Default" ShowCallout="true"
          Position="BottomRight" OffsetX="16" OffsetY="16" EnableShadow="false" Width="195" Height="135" /> 
  
It also not show UpdateProgress imag as Demo showing as attached image. We use telerik 2012.3... version dll. I use the same styles file as demo used
what should I do it can display as demo shows that small arrow pointer and updateProgree image(see attached screen)
  
Thanks.
Lili
Top achievements
Rank 1
 answered on 02 Jul 2013
2 answers
473 views
Howdy all.

I've been poking Google, trying to figure out how to get rid of the border around the RadWindow, and have come across these three threads:

Window without border
Remove the window border
Radwindow border problem

And I have my borders gone.  However, I still have a white border (of doom) along the right and bottom edges.  I'd guesstimate it's about as wide as all the missing borders for both sides.

I don't use any Embedded Skins, and I do want all windows in my project to be borderless, so perhaps that's where I've gone awry?  Any assistance would be appreciated!

I've attached an image (which I've blanked out, and highlighted the border in yellow), as well as my code/css for my window.
<style type="text/css">
    .rwCorner .rwTopLeft,
    .rwTitlebar,
    .rwCorner .rwTopRight,
    .rwIcon,
    .rwTopLeft,
    .rwTopRight,
    .rwFooterLeft,
    .rwFooterRight,
    .rwFooterCenter,
    .rwBodyLeft,
    .rwBodyRight,
    .rwTitlebar,
    .rwTopResize,
    .rwStatusbar,
    .rwStatusbar .rwLoading
    { 
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
</style>
 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableEmbeddedSkins="false"
     showcontentduringload="false" Modal="false" VisibleStatusbar="false" VisibleTitlebar="false" AutoSize="true">
    <Windows>
        <telerik:RadWindow id="winInfo" runat="server" OffsetElementID="menu" Left="0" Top="0">
            <ContentTemplate>
                <div style="width: 450px; background-color: #2F385B;">
                    <!-- Stuff here -->
                </div>
            </ContentTemplate>
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>




Amanda
Top achievements
Rank 1
Iron
 answered on 01 Jul 2013
7 answers
416 views
Hi

I have two list boxes on my Page.
When the page loads depending on the type of user, an item from the left listbox is transferred to the right listbox.
The user can then transfer anything else from left to right.

If an option is changed on the page, everything from the right needs to be transferred back to the left.

I copied the example and have listboxes on my page like this:
<telerik:RadListBox runat="server" ID="lstLeft" Height="200px" Width="200px" AllowTransfer="true" TransferToID="lstRight"/>
<telerik:RadListBox runat="server" ID="lstRight" Height="200px" Width="200px" />

Transferring initially from left to right woks fine using this:
lstLeft.Transfer(listItem , lstLeft, lstRight);

If I try it the other way round (to transfer back to the left) :
lstRight.Transfer(listItem, lstRight, lstLeft);

I get the following error:
Specified argument was out of the range of valid values.
Parameter name: sourceListBox 


If I add AllowTransfer="true" TransferToID="lstLeft" to the right hand textbox the transfer works, but I get the transfer buttons to the right of the right list box as well as in between.

What do I need to do to get this to work correctly?

Bex


Terry Hoiness
Top achievements
Rank 1
 answered on 01 Jul 2013
4 answers
127 views

Hi all,

I have a template column in my grid.  The text of this column is derived by feeding the auditor ID (which is part of the table which is the datasource of the grid) through a function in my code.  This gives me the name of the auditor.  The template column looks like this:

<trt:GridTemplateColumn HeaderText="AuditorId" FooterText ="Total Hours" >
<HeaderTemplate>
<asp:LinkButton ID="btnAuditorId" Text="AuditorId" ToolTip="Sort by Auditor ID"
CommandName='Sort' CommandArgument='AudrId'
runat="server">
</asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblAudDescr" runat="server" Text='<%# ctl.GetAuditorDescr( DataBinder.Eval(Container, "DataItem.AudrId"))%>' />
</ItemTemplate>
</trt:GridTemplateColumn>

This works beautifully to fill my grid, but now I want to use the EnableHeaderContextMenu functionality.  Works well for all the other columns (which are bound columns) but when I try to use it on this column I get an error stating "Expression cannot be null or empty".

I tried setting the groupByExpression in the <trt:GridTemplateColumn> to "ctl.GetAuditorDescr(AudrId)" but then I get an error stating "Invalid group by expression: 'Group By' clause missing".

How can I feed the AudrId, which is part of the datasource, through my GetAuditorDescr function and then group by those results?



Denise
Top achievements
Rank 1
 answered on 01 Jul 2013
1 answer
112 views
I've been pouring over your documentation to try to find a simple gauge to display horizontally. If I paste in the ones from your documentation they are  Vertical and changing the "Vertical="false"" property makes the gauge disappear completely?

If I put an appearance-backgroundColor="grey" I can see the area where the gauge should be but no gauge is in there?

Here's what I'm using:
<telerik:RadLinearGauge ID="rGaugeHorizontal" runat="server" Transitions="True" Width="450"
            Height="140" Appearance-BackgroundColor="#EDEDED">
            <Pointer Value="5" Shape="BarIndicator" Color="Black" Size="15">
            </Pointer>
            <Scale Min="0" Max="100" Vertical="false" Mirror="True" MajorTicks-Size="25" MinorTicks-Size="20">
                <Ranges>
                    <telerik:GaugeRange From="0" To="20" Color="red" />
                    <telerik:GaugeRange From="20" To="40" Color="blue" />
                    <telerik:GaugeRange From="40" To="60" Color="green" />
                </Ranges>
            </Scale>
        </telerik:RadLinearGauge>

I would have thought that changing from verticle to horizontal would be in the <Appearance> properties too?
Danail Vasilev
Telerik team
 answered on 01 Jul 2013
5 answers
186 views
Hi,

I'm using IE9 with document mode of IE7.

The same code works good with Pie chart, but when I change the series type to 'DonutSeries', it doesn't look the same.
It becomes a donut chart, but there is no 3d look, and there are no labels with the Y value around the chart.
Attached an image with two screenshots of the same code, one with Pie, and the other with Donut.

You can also go to your HtmlChart demos.
Open you Pie chart demo, and your Donut chart demo.
Open the dev tools of IE, and change the document mode to IE7.
You'll see the difference.

Thanks,
Guy Segev.
Danail Vasilev
Telerik team
 answered on 01 Jul 2013
1 answer
210 views
Hi, opening up an old project (web) I am trying to run the upgrade wizard which I have had success with.  Note VS just upgraded it recently.  I am getting "no project selected" and  "please go back and select at least one project in order to continue the upgrade".  I tried selecting at various levels.  Any ideas?
Dyanko
Telerik team
 answered on 01 Jul 2013
1 answer
120 views
Is it possible to create a custom event handler to run before the default handler for the rename command?  I would like to place some logic in front of the rename.
Dobromir
Telerik team
 answered on 01 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?