Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
190 views

Hi, 

I would like to know if the gantt web control for ASP.NET, have a feature to export the content to Ms project

Rumen
Telerik team
 answered on 01 Nov 2016
3 answers
284 views

When my MVC razor Kendo Grid is in:

GridEditMode.InCell

and I click on "cancel changes"
or in:

GridEditMode.InLine

and click on "cancel" Changes,

The lines are dropped from the grid..

Apparently this has to do with the fact that I load my grid on the client ajax call (generated by a treeview). It seems as if the grid is treating the lines as new because they were loaded at a later time then when the grid was created.

What can I do to avoid this problematic behaivior? I have read many users have similar issues but no straightforward solution.

Here is my JavaScript:

01.function onSelect(e) {
02.                    var node = e.node;
03.                    var nodedata = $("#tvPH").data('kendoTreeView').dataItem(node);
04.                    //Fill the Proc Equip Grid
05.                    if (nodedata.nodeType == "pls") {
06.                        $.ajax({
07.                            //url: "/PlantHierArchy/GetProcEquip?plsID=" + nodedata.id,
08.                            url: "/PlantHierArchy/ForeignKeyColumn_Read?plsID=" + nodedata.id,
09.                            dataType: "json",
10.                            cache: false,
11.                            type: 'GET',
12.                            success:
13.                            function (result) {
14.                                $("#lblPSU").text('Proc. Equipment Managment for Plant Sub-Unit: ' + node.textContent);
15.                                var procGrid = $("#ProcEqGrid").data("kendoGrid");
16.                                procGrid.dataSource.data(result.Data);
17. 
18.                            },
19.                            error: function (jqXHR, textStatus) {
20.                                alert("Request failed: " + textStatus);
21.                            }
22.                        });
23.                    }
24.                }

and here is my Grid:

01.@(Html.Kendo().Grid<PMTWebReconcile.Models.ProcEquipViewModel>()
02.               .Name("ProcEqGrid")
03.                     //.HtmlAttributes(new { style = "height: 480px; margin-left: 260px" })
04.                        .Columns(columns =>
05.                        {
06.                            columns.Bound(P => P.peqID).Width(20);
07.                            columns.Bound(P => P.peqName).Width(120);
08.                            columns.Bound(P => P.peqTag).Width(120);
09.                            columns.Bound(P => P.peqDescription).Width(200);
10.                            //columns.Bound(P => P.eqtID).Width(30);
11.                            columns.ForeignKey(p => p.eqtID, (System.Collections.IEnumerable)ViewData["EqptTypes"], "TypeID", "Type").Title("Eqpt Type").Width(120);
12. 
13.                            columns.Bound(P => P.eqsID1).Width(30);
14.                            columns.Bound(P => P.eqsID2).Width(30);
15.                            columns.Bound(P => P.eqsID3).Width(30);
16.                            columns.Bound(P => P.peqActive).Width(30);
17.                            //columns.Command(commands =>
18.                            //{
19.                            //    commands.Edit();
20.                            //    //commands.Delete().ButtonType(GridButtonType.Image);
21. 
22.                            //}).Width(100);
23.                            
24.                        })
25.                                .ToolBar(toolbar => { toolbar.Create(); toolbar.Save(); })
26.                                .HtmlAttributes(new { style = "veritcal-align:top" })
27.                        //.Editable(editable => editable.Mode(GridEditMode.InLine)) // Use inline editing mode.
28.                        .Editable(editable => editable.Mode(GridEditMode.InCell))
29.                        .DataSource(dataSource =>
30.                           dataSource
31.                           .Ajax()
32.                           .Batch(true)
33.                            .Model(model =>
34.                             {
35.                                 model.Id(P => P.peqID); // Specify the property which is the unique identifier of the model.
36.                                 model.Field(P => P.peqID).Editable(false); // Make the ProductID property not editable.
37.                                 model.Field(P => P.Type).DefaultValue(new PMTWebReconcile.Models.EquipTypeViewModel());
38.                             })
39.                                 .Create(create => create.Action("ForeignKeyColumn_Create", "PlantHierArchy")) // Action invoked when the user saves a new data item.
40.                               // .Read(read => read.Action("ForeignKeyColumn_Read", "PlantHierArchy", new { plsID = (subUnitID) }))
41.                                 .Update(update => update.Action("ForeignKeyColumn_Update", "PlantHierArchy"))  // Action invoked when the user saves an updated data item.
42.                   )
43.                   .Pageable()
44.                   .Sortable()
45.                     //.ClientDetailTemplateId
46.                   )

*

Dan
Top achievements
Rank 1
 answered on 31 Oct 2016
3 answers
226 views

How do I get around this problem?
The ParentNodeId is NULL for 1-4

This constraint cannot be enabled as not all values have corresponding parent values.

<telerik:RadNavigation ID="RadNavigation1" DataSourceID="sdsMenu" OnNodeDataBound="RadNavigation1_NodeDataBound" DataFieldID="NodeId" DataFieldParentID="ParentNodeId" DataNavigateUrlField="NavigateUrl" DataTextField="sidnamn" Skin="Bootstrap" runat="server" />
 
<asp:SqlDataSource ID="sdsMenu" SelectCommand="SELECT NodeId, ParentNodeId, sidnamn, NavigateUrl, target FROM sv_sidor where NodeId NOT BETWEEN @start AND @end Order By SortId ASC, NodeId ASC" ConnectionString="<%$ ConnectionStrings:sdsSleddogConn %>" runat="server">
    <SelectParameters>
        <asp:Parameter DefaultValue="1" Name="start" DbType="Int32" />
        <asp:Parameter DefaultValue="4" Name="end" DbType="Int32" />
    </SelectParameters>
</asp:SqlDataSource>
Peter Milchev
Telerik team
 answered on 31 Oct 2016
3 answers
204 views
Hi,
I am trying to create Dashboard with Ajax controls. I am using Telerik 2010 Q3 Ajax controls. I would like to present 4 GridView summary controls and Chart control on Dashboard page. Is there any demo or any example code available? If not could you please suggest any alternative option? Thank you
Rumen
Telerik team
 answered on 31 Oct 2016
2 answers
838 views

Hi,

I am using Radnumerictextbox with type=currency with different cultures set depending on the requirements. Suppose, if I use culture as "en-US" it is displaying the entered amount with Dollar format. And it also displayes $ symbol at the beginning.  But I don't want to display the symbol. So is it possible to set the radnumerictextbox to display the amount without the symbol... Ex : If I enter 1234 , it displays $1.234

I want only amount without $ symbol

Thanks in advance for your answer.

Regards,

Puru

R

Eyup
Telerik team
 answered on 31 Oct 2016
1 answer
105 views

I have a RadGrid where the data source is set programmatically because the data source will change based on the option the user selects. Some data sources have more columns than the others. When I have the edit item panel displayed to insert a new record I am removing a text box and adding a drop down in its place and populating the drop down from the database and selecting the value that was in the textbox. I can get this to display but when I click the insert button the page blows up because when the page gets to the init event it wants to bind the old one. any advice on how I can get around this?

here is a ajax error that I get every time I try and do an insert/update

Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

Eyup
Telerik team
 answered on 31 Oct 2016
1 answer
244 views

I followed this demo to download my content to word and it worked perfectly 

view demo

But can I add footer and header to the downloaded document ?

 

Thanks and regards.

Rumen
Telerik team
 answered on 31 Oct 2016
5 answers
157 views
Hi,

Is there a way to set the Grid.ClientEvents.Scrolling.FrozenColumnsCount in javascript?

Thank You
Tracy
Eyup
Telerik team
 answered on 31 Oct 2016
2 answers
194 views

Hi 

I am using the RadGrid control in my website and have a need to translate all the text that the user sees. Is it possible for me to translate the text on the control? 

I cant see any way to translate some of the built in text such as "Page Size", "X items in Y Pages" and the search/Filter options that can be accessed by right clicking the grid.

I have attempted to change the culture on the element but this did not appear to make any changes to the language displayed

The Telerik.Web.UI dll version we are using is 2013.2.611.40

Any ideas?

Vessy
Telerik team
 answered on 31 Oct 2016
3 answers
125 views
Hi,

I noticed that Aggregate="Sum" is not working for GridNumericColumn in DetailTables
(build 1002).  It gives the error:

Sum is not supported for type "System.Object"

It is working in previous build 724.

Example:
<telerik:RadGrid ClientSettings-AllowDragToGroup="true" ShowGroupPanel="true" ShowFooter="true" runat="server" ID="rg" AutoGenerateColumns="False" GroupPanelPosition="Top">
    <MasterTableView>
    <Columns>
    <telerik:GridBoundColumn HeaderText="id" DataField="id"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn HeaderText="text" DataField="text"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn HeaderText="value" DataField="Value" Aggregate="Sum"></telerik:GridBoundColumn>
    </Columns>
    <DetailTables>
    <telerik:GridTableView>
    <Columns>
    <telerik:GridBoundColumn HeaderText="id" DataField="id"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn HeaderText="text" DataField="text"></telerik:GridBoundColumn>
    <telerik:GridNumericColumn HeaderText="value" DataField="value" Aggregate="Sum"></telerik:GridNumericColumn>
    </Columns>
    </telerik:GridTableView>
    </DetailTables>
    </MasterTableView>
    </telerik:RadGrid>


Code behind:

Protected Sub rg_DetailTableDataBind(sender As Object, e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles rg.DetailTableDataBind
    Dim dt As New DataTable()
    dt.Columns.Add("id", GetType(Integer))
    dt.Columns.Add("text", GetType(String))
    dt.Columns.Add("value", GetType(Double))
 
    Dim r As DataRow
 
    r = dt.NewRow()
    r("id") = "1"
    r("text") = "nr. 1 detail"
    r("value") = 1.5
    dt.Rows.Add(r)
 
    r = dt.NewRow()
    r("id") = "2"
    r("text") = "nr. 2 detail"
    r("value") = 2.5
    dt.Rows.Add(r)
 
    e.DetailTableView.DataSource = dt
    End Sub
 
    Protected Sub rg_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rg.NeedDataSource
    If e.IsFromDetailTable = False Then
 
    Dim dt As New DataTable()
    dt.Columns.Add("id", GetType(Integer))
    dt.Columns.Add("text", GetType(String))
    dt.Columns.Add("value", GetType(Double))
 
    Dim r As DataRow
 
    r = dt.NewRow()
    r("id") = "1"
    r("text") = "nr. 1"
    r("value") = 1.5
    dt.Rows.Add(r)
 
    r = dt.NewRow()
    r("id") = "2"
    r("text") = "nr. 2"
    r("value") = 2.5
    dt.Rows.Add(r)
 
    rg.DataSource = dt
    End If
    End Sub

Eyup
Telerik team
 answered on 31 Oct 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?