Telerik Forums
UI for ASP.NET MVC Forum
1 answer
97 views
I'm writing a small mvc application for time scheduling. We will need the basic unit of time reservation to be 15 mins. I did some searching, it seems that minutesPerRow is exactly property I need. However, when the installation was complete, I can't seem to find the minutesPerRow property  using Visual Studio's intellisense. Is it still available? Or is there some kind of how-to to make it work? Thanks!
Rosen
Telerik team
 answered on 28 Apr 2014
2 answers
78 views
We have a project with Telerik MVC Extensions which we're migrating it to Kendo UI. There's only one significant issue when using ForeignKey columns in Grids.

I believe that this is caused by the EditorTemplate file GridForeignKey.ascx. When it's using a Telerik DropdownList it does not work 100% properly in Kendo Grids, when I set it to Kendo, it does not work 100% properly on old Telerik grids.

How can I set to Kendo use a different one for its foreign key? We have added Kendo EditorTemplate to EditorTemplates\Kendo folder.

Thanks,
Ezequiel

Ezequiel
Top achievements
Rank 2
 answered on 25 Apr 2014
2 answers
67 views
I've just downloaded the Kendo UI for ASP.NET MVC v.2014.1.415.340 and first it wouldn't run due to a missing WebGrease library and then it gave me the Unable to get value of the property 'jQuery' exception previously reported (and supposedly fixed) in 2013.2.716.

I am using VS2010 (client's choice, not mine), but aside from that it's the sample website built from the 'Telerik C# MVC Web Application' template (right out of the box).

Any thoughts?

TIA
Dave Hayward
Top achievements
Rank 1
 answered on 25 Apr 2014
2 answers
45 views
There seems to be a lot of demos for ASP.NET MVC, but where is the API Reference documentation?
Thanks.
Dan
Dimiter Madjarov
Telerik team
 answered on 25 Apr 2014
4 answers
1.6K+ views
I've got a grid and I would like to have one of the grid fields be a link which will open a Window widget.  But the widget needs to load a partial view using LoadContentFrom.  This will need to be a controller method and pass a parameter which is also available in the grid.

The normal grid ClientTemplate column would look like this:
columns.Bound(m => m.Proposal_Title).ClientTemplate("<a href='/Proposal/Index/#= Proposal_ID #'>" + "#= Proposal_Title #" + "</a>").Title("Title");


But I need that to maybe be a javascript call which will load a Window with a partial view and open it?

The normal LoadContentFrom would look like this:
.LoadContentFrom("Index", "Proposal", new { id = "22893" })

But I need those links to be created on the grid and the id to be the Proposal_ID as shown above.

Thanks in advance....






Alexander Popov
Telerik team
 answered on 25 Apr 2014
1 answer
154 views

Hi ,

        I have the kendo grid with popup editing and I'm able to increase the width od the window..But I need to increase the columns width in the popup windo, How do i do that..Thank you

Please find the attached image
Iliana Dyankova
Telerik team
 answered on 24 Apr 2014
2 answers
235 views
Not sure if I'm missing something, but I have a destroy action in my grid and it's removing the row before even reaching Controller Method.
and then, if I get any error, the row is not in the grid anymore.
Destroy Method on Controller:
public ActionResult DestroyCommission([DataSourceRequest]DataSourceRequest request, EditableCommission editable)
 {
     ModelState.AddModelError("Id", "Error");
       
     return Json(new[] { editable }.ToDataSourceResult(request, ModelState));
 }

My Grid:
<% this.Html.Kendo().Grid<EditableCommission>().Name("GridCommission").ToolBar(bar => bar.Create())
.DataSource(ds => ds.Ajax().Batch(false).ServerOperation(false)
.Read(read => read.Action("ReadCommission", "Commission").Data("getParam"))
.Create(create => create.Action("UpdateCommission", "CadastrarPedido").Data("getParam"))
.Update(update => update.Action("UpdateCommission", "CadastrarPedido").Data("getParam"))
.Destroy(destroy => destroy.Action("DestroyCommission", "Commission").Data("getParam"))
.Events(ev => ev.Error("error_handler.bind({WidgetID: '#GridCommission'})"))
                                .Model(model =>
                                    {
                                        model.Id(p => p.Id);
                                    }))
                        .Events(events =>
                        {
                            events.Save("onSave");
                            events.Edit("onEdit");
                        })                                  
                        .Columns(columns =>
                        {
                            columns.Bound(o => o.Id).Hidden(true);
                            columns.Bound(c => c.AgentId).Hidden(true);
                            columns.Bound(c => c.Agent).ClientTemplate("#=AgentName#").Width(180);
                            columns.Bound(o => o.Percentage).Width(95).Format("{0:N2}");
                            columns.Bound(o => o.Value).Width(90).Format("{0:N4}");
                            columns.Command(commands =>
                            {
                                commands.Edit();
                                commands.Destroy();
                            }).Width(120);
                        })
                        .Pageable(page => page.Refresh(true).PreviousNext(false).Input(false).Numeric(false).PageSizes(false))
                        .Editable(edit => edit.Mode(Kendo.Mvc.UI.GridEditMode.PopUp))
                        .Render(); %>

Am I missing something?
Petur Subev
Telerik team
 answered on 24 Apr 2014
5 answers
287 views
Prior to the recent 2014.1.318 release, it was possible to obtain the id of a table in the event object in javascript, like so:

function DoSomethingForThisTable(e){
    var id = e.sender.options.table.context.id;
    //get the table with this id and do things
}

However, after the release, this process fails, as the table object on the e.sender.options is now always null.  Is there an alternative to doing this, or is this a bug?

Vladimir Iliev
Telerik team
 answered on 24 Apr 2014
6 answers
82 views
I have just upgraded to 2014.1.415 and some things no longer work.  I would like to revert back to 2013.2.918 but the installer removes the old version from my machine.  How can I get the older version reinstalled?
Stephen
Top achievements
Rank 1
 answered on 23 Apr 2014
7 answers
1.1K+ views
I am trying to disable the delete buttons of a grid in jquery depending on certain conditions.  If I check my conditions on document.ready the code to disable the buttons is not working, seemingly because the grid has not been initialized yet.  I am trying to figure out how to check if it is initialized so I can do my check and then disable the buttons if necessary.  I have tried it onDataBinding but that doesn't seem to do it.  Here is the relevant code:

    @(Html.Kendo().Grid<PASS.ViewModels.Proposals.AttachmentsViewModel>()
        .Name("gridAttachments")
        .Columns(columns =>
        {
            columns.Bound(c => c.File_Name).ClientTemplate("<a href='" + Url.Action("LoadAttachment", "Proposals") + "/#= ID #'>" + "#= File_Name #" + "</a>").Title("File Name");
            columns.Bound(c => c.File_Size).Title("Size");
            columns.Bound(c => c.Content_Type).Title("Type");
            columns.Command(command => { command.Destroy(); }).Width(90);
        })
        .Sortable()
        .Events(events => events.DataBinding("onDataBinding"))
        .DataSource(dataSource => dataSource
            .Ajax()
            .Model(model => model.Id(c => c.ID))
            .Read(read => read.Action("GetAttachments", "Proposals", new { proposalID = Model.Proposal_ID }))
            .Destroy(destroy => destroy.Action("DeleteAttachment", "Proposals"))
        )
    )
 
<script type="text/javascript">
$(document).ready(function () {
    var formDisabled = $('#Form_Disabled').val();
    if (formDisabled == "True") {
        $('#Files').data('kendoUpload').disable();
    }
})
 
$(function () {
    $("#Files").data("kendoUpload").bind("success", function () {
        $("#gridAttachments").data("kendoGrid").dataSource.read();
    })
})
 
function onDataBinding(e) {
    var formDisabled = $('#Form_Disabled').val();
    alert(formDisabled);
    if (formDisabled == "True") {
        $('.k-grid-delete', '#gridAttachments').hide();
    }
}
</script>

I have also tried assigning the onDataBinding in jquery instead of in the razor code but that didn't work either.






Dimiter Madjarov
Telerik team
 answered on 23 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?