Telerik Forums
UI for ASP.NET MVC Forum
2 answers
813 views

I have a problem with too small X button to close a modal window when my web site is viewed on tablet computers. 

Using KendoUI with MVC. I have a window like this:

@(Html.Kendo().Window().Name("​mywindow").Title("​My very own Window Title text")
.Content("Loading...").Iframe(true).Width(600).Height(300).Visible(false).Modal(true)

)

What I want to do is make the title text and especially the X to close the window about 2x bigger to make it easier to use on tabled computers. I this possible? If so, how?

Iliana Dyankova
Telerik team
 answered on 24 Aug 2015
3 answers
210 views

Hi.

Is it possible to open detail template for a grid in windows? not in child grid.

May be it is custom command for grid's row, but not sure in how do that.

Виталий
Top achievements
Rank 1
 answered on 24 Aug 2015
2 answers
135 views
Im trying to add MenuButtons to a Menubutton (ie a subitem), but cant find any documentation of who this can be done
Alexander Valchev
Telerik team
 answered on 24 Aug 2015
1 answer
88 views

How do you set focus for the Html.Kendo().MultiSelectFor in javascript?

 

Konstantin Dikov
Telerik team
 answered on 24 Aug 2015
1 answer
84 views

How do you set focus to the Html.Kendo().DatePickerFor in javascript?

 

Konstantin Dikov
Telerik team
 answered on 24 Aug 2015
0 answers
97 views
HI

Why there have any full official report projects for demo (not .trdx only) ?

There have the online-help for telerik reporting onyly :
http://www.telerik.com/help/reporting/programmatic-creating-report.html

but there still have NO any step by step report demo :
http://www.telerik.com/help/reporting/programmatic-creating-report.html
Need Report Library first ??

NO FULL DEMOS FOR Telerik Reporting
Telerik\UI for ASP.NET MVC Q2 2015 SP1\Open Sample ASP.NET MVC Web Site in Visual Studio 2013 - UI for ASP.NET MVC
NO FULL DEMOS FOR Telerik Reporting
Telerik\UI for ASP.NET AJAX Q2 2015 SP1\Open Sample Web Site in Visual Studio - UI for ASP.NET AJAX
NO FULL DEMOS FOR Telerik Reporting
Telerik\UI for WinForms Q2 2015 SP1\Examples\C# for Visual Studio 2010\Open C# Demo Application in Visual Studio - UI for WinForms
 
Telerik is perfect but NO FULL DEMOS FOR Telerik Reporting (MVC, etc),
so Telerik Reporting becomes very hard to start for report implementation.

Visual Studio 2015 
ASP.NET 4.6
ASP.NET MVC 5

Best regards

Chris
Chris
Top achievements
Rank 1
 asked on 24 Aug 2015
1 answer
80 views

Is there any way to get the scheduler details after created the event.

 Example: Once user created a event (Date: 08/17/2015 to 08/31/2015 Time: 9:00 AM to 10:AM, Repeat: Every 2 days), We want all days and times schedule is going to be generated.

Can you please advise and provide a sample project. 

 

 

 

Boyan Dimitrov
Telerik team
 answered on 21 Aug 2015
1 answer
65 views
I would like to be able to drag an item from one element into another, but LEAVE the element in the original list.  Is this possible?
Steve
Top achievements
Rank 1
 answered on 21 Aug 2015
1 answer
173 views

Hi,

 

We have a little problem with control @html.kendo().CurrencyTextBox. We have a view where we have definite a CurrencyTextBox, this view is called from a grid from method .EditorTemplateName(“View”)

 

I send you two images, one image in Internet Explorer with correct format and another from Mozilla Firefox.

 

Now I show you the code grid from main view:

01.@(Html.Kendo().Grid<ValoritzablesViewModel>()
02.        .Name("refundables")
03.        .HtmlAttributes(new { style = "height: 100%; border: 0;" })
04.        .ToolBar(t =>
05.        {
06.            if (User.IsInRole("Modify"))
07.            {
08.                t.Save().SaveText("Validar");
09.            }
10.        })
11.        .Columns(columns =>
12.        {
13.            columns.ForeignKey(f => f.CentreID, (System.Collections.IEnumerable)ViewBag.Centres, "ContactID", "Nom").Width(120);
14.            columns.ForeignKey(f => f.CycleID, (System.Collections.IEnumerable)ViewBag.BillingCycles, "OptionID", "Name").EditorTemplateName("CustomGridForeignKey").Width(90);
15.            columns.Bound(f => f.CodFact).Width(100);
16.            columns.Bound(f => f.ProductorName);
17.            columns.Bound(f => f.DataServei).Width(100);
18.            columns.Bound(f => f.ServiceID).Width(80);
19.            columns.Bound(f => f.RefExt).Width(80);
20.            columns.Bound(f => f.DocNum).Width(100);
21.            columns.ForeignKey(f => f.Reference, (System.Collections.IEnumerable)ViewBag.CatalegResidus, "Value", "Text");
22.            columns.Bound(f => f.Quantitat).Width(80);
23.            columns.Bound(f => f.Preu).ClientTemplate("#: kendo.toString(data.Preu, 'C2') # (" +
24.                                                        "# if (data.RefundFare == " + (short)fareType.Custom + ") { #Contracte" +
25.                                                        "# } else if (data.RefundFare == " + (short)fareType.Standard + ") { #Standard" +
26.                                                        "# } else if (data.RefundFare == " + (short)fareType.Premium + ") { #Premium" +
27.                                                        "# } else if (data.RefundFare == " + (short)fareType.AdHoc + ") { #Puntual" +
28.                                                        "# } else { #General" +
29.                                                        "# } #)").EditorTemplateName("RefundFare").Width(350);
30.            columns.Template(@<text></text>)
31.                .ClientTemplate("<input type='checkbox' #= Generate ? checked='checked':'' # class='chkbx' />")
32.                .HeaderTemplate("<input type='checkbox' id='checkAllRecords' onclick='checkAll(this)' />")
33.                .Width(36);
34.        })
35.        .Editable(editable =>
36.        {
37.            if (User.IsInRole("Modify"))
38.            {
39.                editable.Mode(GridEditMode.InCell);
40.            }
41.            else
42.            {
43.                editable.Enabled(false);
44.            }
45.        })
46.        .Pageable(pageable => pageable.Refresh(true))
47.        .Scrollable()
48.        .Sortable()
49.        .Filterable()
50.        .DataSource(dataSource => dataSource
51.            .Ajax()
52.            .Batch(true)
53.            .PageSize(30)
54.            .Model(model =>
55.            {
56.                model.Id(a => a.DetailID);
57.                model.Field(f => f.CentreID).Editable(false);
58.                model.Field(f => f.ServiceID).Editable(false);
59.                model.Field(f => f.DataServei).Editable(false);
60.                model.Field(f => f.RefExt).Editable(false);
61.                model.Field(f => f.DocNum).Editable(false);
62.                model.Field(f => f.ProductorName).Editable(false);
63.                model.Field(f => f.CodFact).Editable(false);
64.                model.Field(f => f.CycleID).Editable(false);
65.                model.Field(f => f.Reference).Editable(false);
66.                model.Field(f => f.Quantitat).Editable(false);
67.            })
68.            .Events(e => e
69.                .Error(@<text>
70.                    function (e) {
71.                        onError(e, "refundables");
72.                    }
73.                </text>)
74.                .RequestEnd(@<text>
75.                    function (e) {
76.                        onRefundRequestEnd(e);
77.                    }
78.                </text>))
79.                .Sort(s => s.Add(f => f.DataServei).Descending())
80.                .Read("RefundRead", "Payments")
81.                .Update("RefundValidate", "Payments")
82.            )
83.    )

 

And for finish I show you code with view RefundFare with CurrencyTextBox control:​

 

01.@using SGI2014.Models;
02.@model object
03. 
04.<script type="text/javascript">
05.    var row = $(event.srcElement).closest("tr");
06.    var grid = $(event.srcElement).closest("[data-role=grid]").data("kendoGrid");
07.    var currentDataItem = grid.dataItem(row);
08. 
09.    function onPreuChange() {
10.        @*var radios = document.getElementsByName("RefundFare");
11.        for (i = 0; i < radios.length; i++) {
12.            radios[i].checked = (radios[i].value == @((short)fareType.AdHoc));
13.        }*@
14.        @*var radio = $("input[value='@((short)fareType.AdHoc)']");
15.        radio.prop("checked", true);
16.        currentDataItem.RefundFare = @((short)fareType.AdHoc);*@
17.        currentDataItem.set('RefundFare', @((short)fareType.AdHoc));
18.        currentDataItem.set('Generate', true);
19.        grid.refresh();
20.    }
21. 
22.    function onRefundFareClick(e) {
23.        //var ctb = $("#Preu").data("kendoNumericTextBox");
24.        if (e.value == @((short)fareType.AdHoc)) {
25.            //ctb.value("");
26.            //currentDataItem.Preu = 0;
27.            currentDataItem.set('Preu', 0);
28.        } else {
29.            $.ajax({
30.                cache: false,
31.                url: '@Url.Action("GetFarePrice", "Payments")',
32.                //data: { fare: e.value, detailID: getParentID() },
33.                data: { fare: e.value, detailID: currentDataItem.DetailID },
34.                success: function (received) {
35.                    //ctb.value(received);
36.                    //currentDataItem.Preu = received;
37.                    currentDataItem.set('Preu', received);
38.                }
39.            })
40.        }
41.        currentDataItem.set('Generate', true);
42.        grid.refresh();
43.    }
44. 
45.    //function getParentID() {
46.    //    var row = $(event.srcElement).closest("tr");
47.    //    var grid = $(event.srcElement).closest("[data-role=grid]").data("kendoGrid");
48.    //    var currentDataItem = grid.dataItem(row);
49.    //    return currentDataItem.DetailID;
50.    //}
51.</script>
52. 
53.@(Html.Kendo().CurrencyTextBox()
54.    .Name("Preu")
55.    .HtmlAttributes(new { style = "width:100px" })
56.    .Events(e => e.Change("onPreuChange"))
57.)
58. 
59.<input type='radio' name='RefundFare' value='@((short)fareType.Standard)' onclick="onRefundFareClick(this)">Standard
60.<input type='radio' name='RefundFare' value='@((short)fareType.Premium)' onclick="onRefundFareClick(this)">Premium
61.<input type='radio' name='RefundFare' value='@((short)fareType.Custom)' onclick="onRefundFareClick(this)">Contracte
62.<input type='radio' name='RefundFare' value='@((short)fareType.AdHoc)' onclick="onRefundFareClick(this)">Puntual

 

 Thanks in advance.

 

 

Xavier de la Rubia.

Petyo
Telerik team
 answered on 21 Aug 2015
1 answer
804 views

Hello all,

 

I have a problem with save one row. Here is my code:

DataSource:

var localDataSource = new kendo.data.DataSource({
            batch: true,
            transport: {
                read: function (options) {
                    $.ajax({
                        url: "Content/JSON/GridData.json",
                        success: function (result) {
                            options.success(result);
                        },
                        error: function (result) {
                            options.error(result);
                        }
                    });
                },
 
 
                update: function (options) {
                    console.log("update call");
                    options.success();
                }
            },
            schema: {
                model: {
                    id: "Id",
                    fields: {
                        Name: "Name",
                        Position: "Position"
                    }
                }
            }
        });

 

 Kendo grid:

var grid = $("#grid").kendoGrid({
           dataSource: localDataSource,
           editable: true,
           toolbar: ["save", "cancel"],
           columns: [
             {
                 command: {
                     name: "saveOneRow", text: "save", click: function (e) {
                         var row = $(this).closest('tr');
                         grid.editRow(row);
                         grid.saveChanges(); // save all
                     }
                 }, title: " ", width: "180px"
             },
             { field: "Name", width: "100px", title: "Name" },
             { field: "Position", width: "100px", title: "Position" },
              
           ],
       }).data('kendoGrid');

 

Save all and cancel all works fine.

But how can I save one row?

(because localDataSource.sync() (save all) and localDataSource .read() (cancel all).)

 

p.s. I tried command {name: "save"}, but he didn`t fire any event

 

Thanks

Rosen
Telerik team
 answered on 21 Aug 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?