Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
157 views
Hi,


Please help me with some code samples to create a Line chart with multiple line series.  I am getting a List from stored procedure, and assigning that List to the Line Chart’s data source.

LineChart.DataSource = List;

The List looks like this:

Date                #Absentees              Week#       College Name
04/01/2016      5                                 19                           ABC
04/11/2016      10                               20                           XYZ
05/01/2016      15                               21                           PQR

I need to create multiple line series, each series per each College.
X-axis is Week#, and the Y-axis is Number of Absentees.

Please help me with some code samples to create a Line chart with multiple line series.  
Ravi
Top achievements
Rank 1
 asked on 24 May 2016
3 answers
101 views

Hi, just got view model displayed on calendar, now trying to add EventTemplate & display some fields from view model, but got undefined error, so i'm adding Resources. i kinda understand this Resources is the data for event, but what are the exact differences between DataSource and Resources?

Since DataSource takes view model and the fields i want to show are all in view model. is there an easy way to populate EventTemplate?

Veselin Tsvetanov
Telerik team
 answered on 24 May 2016
11 answers
258 views
Hi,
  I have around 5 radeditors in a page. I have set the Toolbar Mode to "ShowOnFocus" on all of them.As I had problems with printing html with IFrame, I changed the ContentAreaMode to Div. Now when I enter text  inside the radeditor and try to scroll down the page, the ouside wrapper of the radeditor moves but the text that I entered doesn't move.
 Also this happens with the toolbar too.I have attached an image of the form where its happeneing for your reference.Please help me solve this problem.

Thanks
Meena
balaji
Top achievements
Rank 1
 answered on 24 May 2016
2 answers
86 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
249 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
90 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
62 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
94 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
130 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
152 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?