Telerik Forums
UI for ASP.NET MVC Forum
2 answers
62 views
See image for details, the editor seems to be out of whack when in edit mode.
Iliana Dyankova
Telerik team
 answered on 31 Jan 2014
1 answer
677 views
Hi.

I would like to render a numerictextbox for an integer field that does not display any thousands separator. 

Which format can be used to render it? I tried using F as shown here: http://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx but Kendo throws an error saying that it's not a supported format.

So what can I do?

Thanks.
Alexander Popov
Telerik team
 answered on 31 Jan 2014
1 answer
63 views
Hello there

I need windows 8 opening style big rectangle effective buttons. (attached image). Does Kendo MVC UI provide any similar control?
 
Dimo
Telerik team
 answered on 30 Jan 2014
1 answer
100 views
Hello there

I need  to run asp.net mvc scheduler demo in razor engine. How to accomplish this ? Please help.

Atanas Korchev
Telerik team
 answered on 30 Jan 2014
3 answers
83 views
hello there

is there a way to get the codes of demos in the following link  ?

http://demos.telerik.com/kendo-ui/web/overview/index.html






Iliana Dyankova
Telerik team
 answered on 29 Jan 2014
1 answer
102 views
I am using an editor template for a popup editor and I have Image uploader inside that I want to place the new image name in a field. But instead, after updating I see the previous image name getting posted.

In the template this is the field.
=========================================================================================
<input type="file" name="file" id="dataPhoto" />
<script>
    $("#dataPhoto").kendoUpload({

        async: {
            saveUrl: '@Url.Action("ImageSave","Data")',
            autoUpload: true
        },
        multiple: false,
        success: function (data) {
            alert(data.response.fileName);
            $('#DatumImageName').val(data.response.fileName);
        }
    });
</script>
<div class="editor-field">
    @Html.TextBoxFor(model => model.DatumImageName)
</div>
========================================================================================
@model Lifetech.Service.ApiModels.DatumApiModel
@(Html.Kendo().Grid<Lifetech.Service.ApiModels.DatumApiModel>()
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(d => d.Title).Title("Title");
        columns.Bound(d => d.DatumImageName).ClientTemplate(
            "<img src='" + Url.Content("~/Images/Data/") +
            "#:data.DatumImageName#' alt='#: data.Title #' />"
            );

        columns.Bound(d => d.Description).Title("Description");
        columns.Bound(d => d.IsActive).Title("Is Active");
        columns.Bound(d => d.DisplayOrder).Title("Display Order");

        columns.Command(command => { command.Edit(); command.Destroy(); }).Title("Commands").Width(172);
    })        
    .ToolBar(toolbar => toolbar.Create())
        .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("DataTemplate"))
    .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
               .Ajax()
                .PageSize(20)
                .Events(events => events.Error("error_handler"))
                .Model(model => model.Id(d => d.DataID))
                .Create(update => update.Action("Create", "Data", new { Id = ViewBag.ProductId }))
                .Read(read => read.Action("Read", "Data"))
                .Update(update => update.Action("Update", "Data"))
                .Destroy(update => update.Action("Destroy", "Data"))
    )
)
====================================================================================

If I edit the value in the textbox for the image name manually then it works, but I need it to be set through javascript as I have an image uploader.


Thanks,
Amit
Petur Subev
Telerik team
 answered on 29 Jan 2014
1 answer
108 views

Hello,

 

 

I have created a page with a grid and a filter section. The filter section has multiple AutoCompleteBoxes with InputType on Token, every time a token is added the grid gets filtered. This page works how it should work, but the grid and the AutoCompleteBoxes work with a LinqDataSource.

I have changed the datasource from the grid and the AutoCompleteBoxes to a EntityDataSource and every time I filter the grid and go to a other grid page I get this error: The LINQ expression node type 'Invoke' is not supported in LINQ to Entities.

This is how my code works:

When a token is added in a AutoCompleteBox this event get fired:

 

protected void RadAutoCompleteBoxSalesOrderNumber_Event(object sender, EventArgs e)
    {
      AutoCompleteBoxEntryCollection entries = ((RadAutoCompleteBox)sender).Entries;
      if (entries.Count != 0)
      {
        this.salesOrderNumber = entries[0].Text;
        ViewState["salesOrderNumber"] = entries[0].Text;
      }
      else
      {
        this.salesOrderNumber = null;
        ViewState["salesOrderNumber"] = null;
      }
    }


And this is the OnQueryCreated event the grid uses:

protected void EntityDataSourceGrid_QueryCreated(object sender, QueryCreatedEventArgs e)
    {
      IQueryable<vw_DeliveryLines> query = e.Query.OfType<vw_DeliveryLines>();
 
      e.Query = query.Where(GetData());
    }
 
private Expression<Func<vw_DeliveryLines, bool>> GetData()
    {
      var predicate = PredicateExtensions.True<vw_DeliveryLines>();
 
      if (!String.IsNullOrEmpty(salesOrderNumber))
        predicate = predicate.And(c => c.SODocNum.Equals(salesOrderNumber));
      if (salesOrderLineNumber > -1)
        predicate = predicate.And(c => c.SOLineNum.Equals(salesOrderLineNumber));
      if (!String.IsNullOrEmpty(deliveryNumber))
        predicate = predicate.And(c => c.DELDocNum.Equals(deliveryNumber));
      if (deliveryLineNumber > -1)
        predicate = predicate.And(c => c.DELLineNum.Equals(deliveryLineNumber));
 
      if (cardCode > -1)
        predicate = predicate.And(c => c.CardCode.Equals(cardCode));
 
      return predicate;
    }

I hope someone can help to fix my problem.

 

 

 

Petur Subev
Telerik team
 answered on 29 Jan 2014
1 answer
129 views

Hello,
i'm having trouble with kendo ui events handler.
When an error has been throwed from controller to the request response, the error is showed on an alert, like this:

@(Html.Kendo().Grid(Model)
      .Name("grid")
      .Events(e => e.Error("error")
//another declarations
 
function error (args){
   if (!args) return;
 
   if (args.errors) alert(args.errors)
}

The problem is when the delete request is make again, the grid makes the requisition again, and keep maintaining the request makes before, doing multiple requests.




Alexander Popov
Telerik team
 answered on 29 Jan 2014
6 answers
674 views
I'm trying to use Upload inside Grid with GridEditMode.PopUp

I have already created custom Edit Template for property:

    public class Contact
    {
        [UIHint("PhotoFileNameEditor")]
        public string PhotoFileName { get; set; }
    }
}

@(Html.Kendo().Upload()
    .Name("PhotoFileName")
    .Multiple(false)
    .Async(async => async.Save("SavePhoto", "Contact").Remove("RemovePhoto", "Contact").AutoUpload(true))
)

And Save method
  public ActionResult SavePhoto(IEnumerable<HttpPostedFileBase> PhotoFileName)
        {
            if (PhotoFileName != null)
            {
                foreach (var file in PhotoFileName)
                {
                    var fileName = Path.GetFileName(file.FileName);
                    var physicalPath = Path.Combine(Server.MapPath("~/Images/"), fileName);
                     file.SaveAs(physicalPath);
                }
            }
            return Content("");
}

It saves the file without problem, but Contact.PhotoFileName is not changed so the PopUp form is not submited at all.

How do I change the value of PhotoFileName so i can save it to database?

Thank you
amit
Top achievements
Rank 1
 answered on 28 Jan 2014
4 answers
177 views
I recently updated to the latest version and previously did some custom css to pull in white icons instead of black but that is no longer working. Is there anyway to change the filter/sort icons from black to white?
Justin
Top achievements
Rank 1
 answered on 28 Jan 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?