Telerik Forums
UI for ASP.NET MVC Forum
1 answer
126 views

Hi all,

In this simplified case my datased is filled with 2 records.

Date: 01-01-2015
Value: 10

and

Date: 01-01-
2016
Value:10

 

I want to see only those 2 days on the X asxis with a "dd-MM-yyyy"  format.

When I do the following:
axis.Date().BaseUnit(ChartAxisBaseUnit.Days).Labels(labels =>  labels.DateFormats(formats => formats.Days("dd-MM-yyyy")
I see 365 squeezed labels

How can configure the category axis to only show the dates which are are in the dataset?

 

Iliana Dyankova
Telerik team
 answered on 25 Apr 2016
1 answer
259 views

Hi,

We currently have the old HTML.Telerik().Grid() that binds entire resultset at once. We have to change this to bind records page by page. 

Do you have a sample demo that does the custom binding? Like on next / previous arrow it has to call the db and get the results.

What are the properties and methods to use?

 

Thanks!

Dimiter Madjarov
Telerik team
 answered on 25 Apr 2016
1 answer
283 views

There's something strange going on with a hierarchical grid: the parent grid displays the data correctly, but when trying to display the data of the child grids, they only display everything when opening them from the last row to the first one.

These are my grids:
PARENT GRID:
@(Html.Kendo().Grid(Model)
        .Name("ParentGrid")
        .DataSource(dataSource => dataSource
        .Ajax()
            .Read(read => read.Action("Read", "controller")
            .Data("ParameterFunction"))
        .PageSize(30)
        )
        .Columns(columns =>
        {
            columns.Bound(foo => foo.fecha_venc).Title(Global.Fecha).Format("{0:dd/MM/yyyy}"); //This is the date I need formatted
            columns.Bound(foo => foo.espe_codigo).Title(Global.Especie);
            columns.Bound(foo => foo.clas_codigo).Title(Global.Clase);
            
        })
        .ClientDetailTemplateId("template")
    )

CHILD GRID:
@(Html.Kendo().Grid<SGMTrade.DAL.ViewModels.OperacionesOCTPorFecha>()
        .Name("ChildGrid")
        .DataSource(dataSource => dataSource
            .Ajax()
            .PageSize(10)
            .Read(read => read.Action("childGrid_Read", "controller", new { fecha = "#=fecha_venc#", especie = "#=espe_codigo#", cliente = @ViewBag.cliente, clase = "#=clas_codigo#" }))
        )
        .Columns(columns =>
        {
            columns.Bound(o => o.oper_numero).Title(Global.NumeroOperacion)
            .ClientTemplate("<a href='\\\\\\#' onclick=\"showDetails('\\#=oper_numero\\#')\">\\#=oper_numero\\#</a>");
            columns.Bound(o => o.oper_forigen).Title(Global.FechaOrigen).Format("{0:dd/MM/yyyy}");
            columns.Bound(o => o.espe_codigo).Title(Global.Especie);
            columns.Bound(o => o.clas_codigo).Title(Global.Clase);
        })
        .ToClientTemplate()
    )

As it can be seen in the first attachment, if I display the second child grid first and then the first grid, I'm able to display every data, but if I go for the first child grid, the data from the second child grid is not displayed.

I analysed the code and I get the data from the stored procedure just fine, but I can't see it in the view.

Thank you very much.

Viktor Tachev
Telerik team
 answered on 25 Apr 2016
5 answers
171 views

Hi!

I made an editor template since I couldn't get the labels of the automatic editor to show up properly (they always show in lowercase, can't they pick up the DisplayName data annotation of the model?).

The issue is that it seems the model object isn't getting into the editor. For example:

If I edit a connector with the default automatic editor, I get a nice list for the "from/to" fields, with all the nodes in the diagram, which works perfectly. Now, if I want to replicate the same behaviour for my custom editor but I can't get them to show.

How can I set up my editor template so it picks up the shapes in the diagram?

Danail Vasilev
Telerik team
 answered on 22 Apr 2016
1 answer
147 views

i'm trying to start kendo.ui on my project. But when add Kendo.Mvc reference the project doesn't start and i receive this error:

The requested service '******' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

 

When I remove Kendo reference the project start.

Could you help me ?

Thanks a lot for your help.

Dimiter Madjarov
Telerik team
 answered on 21 Apr 2016
1 answer
99 views

I'm surprised I haven't seen this mentioned elsewhere (so I may be doing something very wrong...)

Whenever I'm in vs2013/15 and editing a Kendo MVC Grid - any edit in the body of the HTML helper moves indentation of the body of the helper to the right by one tab as soon as I step out (I move the caret to some other text in the grid, or outside it).

The end result is all my grid helpers tend to be shifted massively off to the right in the editor and I have to periodically 'shift tab' them back on to the screen.

Is this expected behaviour or have I got some settings wrong?

Thanks

Dimiter Topalov
Telerik team
 answered on 21 Apr 2016
1 answer
230 views

By default drag and drop files works excellent for chrome browser if the cursor is exactly over the kendo upload widget. Important - this widget is used in my application not in async mode. But when then cursor is not over kendo upload control the default action is triggered. I've blocked this by the simple code below.

$(document).on("dragover drop", function (e) {
    if (e.target.type != "file") {
        e.stopPropagation();
        e.preventDefault();
    }
});

Instead of blocking I want to change this. so when I drag file over any control in my webpage it will add a file to my kendo upload control. I've found the below solution, but this works only for one file.

$(document).on("dragover drop", function (e) {
    e.stopPropagation();
    e.preventDefault();  // allow dropping and don't navigate to file on drop
}).on("drop", function (e) {
    var dataTransfer = e.originalEvent.dataTransfer;
    $("input[type='file']").prop("files", dataTransfer.files); // put files into element
});

 

Definition of this widget is simple.

<div class="zalaczniki-files">
    @Html.Label("Opis załączników:")
    @Html.TextBox("linkDesc")
    @(Html.Kendo().Upload()
            .Name("files")
            .Multiple(true)
            .Messages(m => m.Select(linkCaption)))
</div>

 

Please - help.

 

Regards

Jaśkowiec Józef

Rekord

 

Dimiter Madjarov
Telerik team
 answered on 21 Apr 2016
1 answer
137 views
is there any server side MDX query builder like this client side one?
http://docs.telerik.com/kendo-ui/controls/data-management/pivotgrid/how-to/access-mdx-query
Georgi Krustev
Telerik team
 answered on 21 Apr 2016
2 answers
35 views

So, I have tried this a bunch of different ways to no result.  My need is I have a Grid filled with some Employees.  You can do the normal things with that Employe object.  Also, I want to have a Custom Command for "Edit Roles" which would popup a different EditablePopupGrid that also uses a ClientTemplate for just the Employee.Roles collection.

Can I accomplish this?  My grid is using Ajax currently. 

 

Radoslav
Telerik team
 answered on 21 Apr 2016
1 answer
70 views

Hi!

I need fill a tooltip with a list in a request json called from kendo grid reader, i show examples for one link or only one data, my problems is how i can get kendo data request from jquery o JavaScript or if there are other simple mode because i havent got model or other view variables, only the cast object for kendogrid it has the list in one property.

 

Thanks for your time.

Dimiter Topalov
Telerik team
 answered on 20 Apr 2016
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?