Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
103 views

Hello,

I recently started to work on an old ASP.Net project and one of the first action I was asked to perform was to update Telerik version (from Q3 2012 to the last one).

The migration went almost well, but I have a problem in some specific situations : on every RadGrid with nested DetailTables, enable both HeaderContextMenu and HeaderContextFilterMenu causes a stack overflow exception during page loading.

 

Here is an example :

<telerik:RadGrid ID="RGPhase" runat="server" OnNeedDataSource="RGPhase_NeedDataSource" OnDetailTableDataBind="RGPhase_DetailTableDataBind" GridLines="None" PageSize="500" AutoGenerateColumns="false" Culture="fr-FR"
                    EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="false" AllowFilteringByColumn="true" AllowAutomaticInserts="True" AllowAutomaticUpdates="False" AllowAutomaticDeletes="False"
                    AllowPaging="True" AllowSorting="True" ShowFooter="True" OnEditCommand="RGPhase_EditCommand" OnCancelCommand="RGPhase_CancelCommand" OnUpdateCommand="RGPhase_UpdateCommand" OnDeleteCommand="RGPhase_DeleteCommand">
                    <MasterTableView DataKeyNames="IdPhaseInAffaire" IsFilterItemExpanded="false" CommandItemSettings-ShowRefreshButton="false" ShowGroupFooter="true" CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false">
                        <NoRecordsTemplate>
                            Aucune phase
                        </NoRecordsTemplate>
                        <DetailTables>
                            <telerik:GridTableView GridLines="None" PageSize="500" AutoGenerateColumns="false" EnableHeaderContextMenu="false" EnableHeaderContextFilterMenu="false"
                                AllowFilteringByColumn="true" DataKeyNames="IdPhaseInAffaire" AllowAutomaticInserts="false" AllowAutomaticUpdates="True" AllowAutomaticDeletes="false"
                                AllowPaging="True" AllowSorting="True" ShowFooter="true" CommandItemStyle-CssClass="DontShow" CommandItemSettings-ShowRefreshButton="false" IsFilterItemExpanded="false"
                                ShowGroupFooter="true" CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false">
                                <DetailTables>
                                    <telerik:GridTableView GridLines="None" PageSize="500" AutoGenerateColumns="false" EnableHeaderContextMenu="false" EnableHeaderContextFilterMenu="false"
                                        AllowFilteringByColumn="true" DataKeyNames="IdPhaseInAffaire" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" AllowPaging="True" AllowSorting="True"
                                        ShowFooter="true" CommandItemSettings-ShowRefreshButton="false" CommandItemStyle-CssClass="DontShow" IsFilterItemExpanded="false" ShowGroupFooter="true" CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false">

 

And the code behind associated : 

protected void RGPhase_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            DataLoadOptions dlo = new DataLoadOptions();
            dlo.LoadWith<PhaseInAffaire>(p => p.Phase);
 
            RGPhase.DataSource = BLLPhase.GetAffairePhaseOnly(MyCompleteAffaire.IdAffaire, dlo);
        }
 
protected void RGPhase_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
        {
 
            var idPhaseInAffaire = (int)e.DetailTableView.ParentItem.GetDataKeyValue("IdPhaseInAffaire");
 
            var pia = MyCompleteAffaire.PhaseInAffaire.Where(c => c.IdParent == idPhaseInAffaire).ToList();
 
            e.DetailTableView.DataSource = pia;
 
        }

 

When I set either "EnableHeaderContextMenu" or "EnableHeaderContextFilterMenu" to false, I have no problem loading the page.

 

Apparently the server is stuck in a recursive call of this method : Telerik.Web.UI.GridHeaderContextMenu.GridContextFilterTemplate.CheckForSpecialColumns(Telerik.Web.UI.GridTableView currentTableView).

 

Any help would be appreciated,

Thanks

Konstantin Dikov
Telerik team
 answered on 24 May 2016
3 answers
292 views

I am currently using a RadGrid to display a list of events and documents.  One of the columns in the grid is called "Action" with a few links in it (a link to the document, a link to a 3rd party annotation tool, etc).  The user wants the ability to rename the document (using the grid's edit functionality) but wants the "Rename" link to be in the Action column instead of it's own column.  How do I add a GridEditCommandColumn-like action to another column or add other columns to the GridEditCommandColumn.

 

<telerik:GridTemplateColumn HeaderText="Actions" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
    <ItemTemplate>
        <asp:HyperLink runat="server" Target="_blank" ID="ViewLink" Text="View" NavigateUrl="/ViewCaseDoc.aspx?" />
        <asp:LinkButton runat="server" ID="AnnotationOpenLink" Text="Annotate" />
        <%-- 
            I want this action here
            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"  EditText="Rename"></telerik:GridEditCommandColumn>
        --%>
    </ItemTemplate>
</telerik:GridTemplateColumn>
Eyup
Telerik team
 answered on 24 May 2016
1 answer
130 views

Hi,

I am using the Maskedtextbox for user input of a mac address, I am using the following code which works fine.  It displays "00-00-00-00-00-00" on initial load and only accepts characters 0-9 and A-F

<telerik:RadMaskedTextBox RenderMode="Lightweight" ID="RadMaskedTextBox3" runat="server" Mask="<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>"></telerik:RadMaskedTextBox>

 

The issue arises when I press the backspace to delete, all that happens is the cursor moves back but does not reset the character back to the initial mask value which is what I would expect to happen.

How can I achieve this.

 

Chris

1.<telerik:RadMaskedTextBox RenderMode="Lightweight" ID="RadMaskedTextBox3" runat="server" Mask="<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>"></telerik:RadMaskedTextBox>
Maria Ilieva
Telerik team
 answered on 24 May 2016
1 answer
124 views

Hi,

I am using the Maskedtextbox for user input of a mac address, I am using the following code which works fine.  It displays "00-00-00-00-00-00" on initial load and only accepts characters 0-9 and A-F

<telerik:RadMaskedTextBox RenderMode="Lightweight" ID="RadMaskedTextBox3" runat="server" Mask="<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>"></telerik:RadMaskedTextBox>

 

The issue arises when I press the backspace to delete, all that happens is the cursor moves back but does not reset the character back to the initial mask value which is what I would expect to happen.

How can I achieve this.

 

Chris

1.<telerik:RadMaskedTextBox RenderMode="Lightweight" ID="RadMaskedTextBox3" runat="server" Mask="<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>"></telerik:RadMaskedTextBox>
Maria Ilieva
Telerik team
 answered on 24 May 2016
1 answer
126 views

Is there a way I could add a value with the legends labels?

Client or Server side

 

Dimitar
Telerik team
 answered on 24 May 2016
2 answers
174 views

Hello, 

I am trying to capture the order of columns headers after a user changes (re-orders) a column in the Grid. But so far I only seem to capture the original order.

I plan to store the order in the database, and when the grid is loaded re-order the columns for each user.

 

Here's a code snip that gets called after a user changes a column: (always gets original order) 

string sVal = "";
GridColumnCollection cols = grid.MasterTableView.Columns;
GridColumn c;
string[] sOrder = new string[grid.Items[0].Cells.Count];
 for (int i = 0; i < grid.Items[0].Cells.Count; i++)
            {
                sVal = grid.Items[0].Cells[i].ID.ToString();
                c = cols.FindByUniqueNameSafe(sVal);
                sOrder[i] = sVal + ":" + i.ToString();
            }

How do I get the actual order of columns after they are changed by the user? 

Konstantin Dikov
Telerik team
 answered on 24 May 2016
1 answer
204 views

I have a grid with the following declaration. The grid is bound client-side. For some reason, I can't get the HyperlinkColumn to display its text centered. (see attached image). Any idea why?

 

<telerik:RadGrid id="rgCEE"
                                        runat="server"
                                        AutoGenerateColumns="False"
                                        Height="100%"
                                        Width="100%"
                                        AllowPaging="False"
                                        AllowSorting="False"
                                        EnableLinqExpressions="false"
                                        ShowStatusBar="False"
                                        style="border:0px;"
     
                                >
                                    <MasterTableView 
                                                DataKeyNames="EmployeeId"
                                                ClientDataKeyNames="EmployeeId"
                                                Width="100%"
                                                TableLayout="Fixed"
                                                HierarchyLoadMode="Client"
                                                CommandItemDisplay="None"
                                        >
                                        <Columns>
                                            <telerik:GridHyperlinkColumn UniqueName="SelectColumn" Text="Select" DataNavigateUrlFields="EmployeeId" DataNavigateUrlFormatString="javascript:SelectExistingEmployee_CO({0});"  >
                                                <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                                <ItemStyle HorizontalAlign="Center" />
                                            </telerik:GridHyperlinkColumn>
                                            
                                            <telerik:GridDateTimeColumn HeaderText="Born" DataField="BirthDate" DataType="System.DateTime" DataFormatString="{0:MM/dd/yy}">
                                                <HeaderStyle width="80px" HorizontalAlign="Left" ></HeaderStyle>
                                                <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                            </telerik:GridDateTimeColumn>
                                            
                                            <telerik:GridTemplateColumn UniqueName="spacerCol"></telerik:GridTemplateColumn>
                                        </Columns>
                                        <CommandItemTemplate>
     
                                        </CommandItemTemplate>
                 
                                    </MasterTableView>
                                     
                                    <ClientSettings AllowExpandCollapse="True" >
                                        <Selecting AllowRowSelect="False" EnableDragToSelectRows="False"  />
                                        <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100%" />
                                        <Resizing AllowColumnResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="True"/>
                                        <ClientEvents OnGridCreated="rgCEECreatedHandler_CO"/>
                                    </ClientSettings>
                                     
                                </telerik:RadGrid>

Konstantin Dikov
Telerik team
 answered on 24 May 2016
0 answers
66 views

Dear ALL

 

Please advise me.

 

My company use telerik tool. I have problem about Radchart.(ASP.NET)

 

1.How to set color of ChartSeriesItem. Now I can set little different but I need show very different.

2.How to set format value.Ex. 2,506,714.00 to 2,506,714

3.How to stretch YAxis.

 

Thank you verymuch.

Loki
Top achievements
Rank 1
 asked on 24 May 2016
1 answer
171 views

Hi dear Telerik

i want to change default theme (overall shape) and appearance for wizard . is any way or online sample ?

Magdalena
Telerik team
 answered on 24 May 2016
10 answers
638 views
   
 Hi,

I am using RadHTMLChart(Telerik dll version : 2013.2.717.35) in my application.Please provide me the solution for the following queries:

1.RadHtmlChart has the inbuilt functionality to enable or disable Series in the Legend.How to enable or disable Series in the Legend programatically?Is it possible to control the legend Items programatically for toggling the series?Please refer the screenshot legend click.png

2.How to display Series Name for Pie Chart.I know that only one series can be plotted in pie chart for now.Is there anyway to display series name in chart area so that the user will identify ,which series have been plotted for pie chart?

3.I have found that ClientTemplate property should be used to display one or more values in Label/ToolTip of BarSeries in one of the telerik link.Is there anyway to apply custom formats like ##,##.## or $### or MM/dd/YYYY or $##,##,##.#0 to the Label/ToolTip of BarSeries.I have tried with kendo.format method to apply custom formats.It did not work.Please provide me the solution to achieve it.

4.I am using datetime value(sorted in ascending order) as a input data for XAxis .In bar chart,I am able to see all the input datetime values in XAxis.But in ScatterSeries ,some of the input datetime data gets disppear in the XAxis ,but I can view those disapeared XAxis data in  Label/Tooltip of ScatterSeries.How to display all the input datetime data in XAxis of ScatterSeries chart? Please refer the screenshot barseries_datetime.jpg & scatterseries_datetime.jpg

Thanks in advance.Please reply me as soon as possible.
prateek
Top achievements
Rank 1
 answered on 24 May 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?