Telerik Forums
UI for ASP.NET MVC Forum
1 answer
105 views
Hello,

I have a grid detail , i want to generate the name of the grid with a date .  How can i generate the name of the grid like this : 
"#= kendo.toString(Timestamp,  'dd_MM_yyyy_hh_mm_ss') #"

Thanks
Vladimir Iliev
Telerik team
 answered on 20 Jun 2013
3 answers
167 views
I NEED an editor that has the Format Code Block feature.  I've created an MVC app that uses Kendo, now the VS Telerik menu doesn't have the selection to apply the Telerik MVC Extensions to my MVC application, so I can use that Editor.  Do I have to add the Telerik MVC Extensions manually just to get the Editor with the Code Block?

Bottom line is, I need an editor with the Code Block feature.  What are the suggestions for this?  It doesn't seem like Kendo has one, correct?

Thanks,
King Wilder
Atanas Korchev
Telerik team
 answered on 20 Jun 2013
4 answers
476 views
I uploaded a repro project demonstrating the issue I'm having here: http://www.mediafire.com/download/s1ba31xy83naa8c/NullableComboboxInGrid.zip

Have a grid for a model with a nullable int (representing a FK relationship)
public class NullableFkModel
{
    [ScaffoldColumn(false)]
    public int Id { get; set; }
    public string Name { get; set; }
    [UIHint("Fk")]
    public int? FkId { get; set; }
}
Editor template for the nullable FK property is:
@model int?
 
@(Html.Kendo()
      .ComboBoxFor(m => m)
      .DataValueField("Value")
      .DataTextField("Text")
      .BindTo(new [] { new SelectListItem() { Text = "Joe Blow", Value = "1"}, new SelectListItem() { Text = "Jane Doe", Value = "2"}, new SelectListItem() { Text = "Batman", Value = "3"}})
      .Filter(FilterType.Contains))

Grid is pretty basic:
@(Html.Kendo()
    .Grid<NullableFkModel>()
    .Name("Grid")
    .Columns(columns =>
        {
            columns.Bound(item => item.Name);
            columns.Bound(item => item.FkId);
            columns.Command(command => command.Edit());
        })
    .DataSource(ds => ds.Ajax()
                        .Model(model => model.Id(m => m.Id))
                            .Read(read => read.Action("Nullable_Read", "Demo"))
                            .Create(create => create.Action("Nullable_Create", "Demo"))
                            .Update(update => update.Action("Nullable_Update", "Demo"))
    )
    .ToolBar(commands => commands.Create())
    .Editable(edit => edit.Mode(GridEditMode.PopUp)))

When editing, everything works fine. But when adding, the FkId is not bound to the combobox and the value is not update when the combobox is changed. You can see that it is not updated in the grid and it is not posted back to the controller.

When using the exact same setup with a non-nullable property it works as expected. I have a demo of both in the uploaded project.
Adam
Top achievements
Rank 1
 answered on 19 Jun 2013
1 answer
406 views
When creating a new item (using popup editing) I would like to save the data but prevent the popup from closing.  Instead I would like to show additional options that aren't shown until the initial object is created.  Can anyone tell me how to accomplish this?  I tried adding a "Close" event to the window but that never fires for some reason.


Thanks,
Derek
Derek Kepler
Top achievements
Rank 1
 answered on 18 Jun 2013
1 answer
108 views
Maybe anybody can help me out! I am confused.
I am failing to localize a date column in a grid.
The column is bound the following way in .csthml file:
  
"columns.Bound(o => o.IssueDate).Title(Strings.IssueDate).Format("{0:d}");"

- Session["culture"] is "de-DE"
-.Thread.CurrentCulture/CurrentUICulture is de-DE

But the date ist always displayed in british format. With the old asp.net MVC controls this works fine!

I am using asp.net mvc 4.

What am I doing wrong?

brgds
Malcolm Howlett
Malcolm
Top achievements
Rank 1
 answered on 18 Jun 2013
2 answers
522 views
Hello,

I have few text box, drop down list controls and grid entry also. I would like to hit the save button once which should save the grid entries and other control values as well. I would disable the grid save button and I will use the main save. I have model which has the sub-collection binds the value to the grid. For example,

Model
-------------
Name,  -> textbox
Age, -> textbox
Qualifications (collections) - user can add n number of entries -> grid

Qualification collection will have
Degree,
Year of completion,
Grade.
 
I am able to display the values when I bind with the sub-collection. When I hit the save button, the model sub-collection does not get update with the entered / modified values in the server-side. I have tried the below link also which could not solve my issue.
http://www.kendoui.com/forums/mvc/grid/grid-toolbar-functioality-outside-grid.aspx

Is there any other ways to solve this issue?

Regards,
Murugan
Petur Subev
Telerik team
 answered on 18 Jun 2013
1 answer
155 views
I have the kendo licence, but I am now working on a old project useing the old MVC telerik extensions, I just upgraded the jquery to 2.02 before thinking about the MVC extensions. will the MVC telerik intentions (not kendo) work with jquery 2.0.2?
Thanks
Sebastian
Telerik team
 answered on 17 Jun 2013
4 answers
743 views
For usability, I need the users to be able to re-upload a file multiple times without having to select it again.  For example, a user can upload a file that my controller parses and determines there are formatting or schema issues with it.  The user will open the local file, fix the issue, and then upload it again.  I'd like them to be able to press a retry or upload button again without having to click the Select button, browse through their list of files to find it, and pick it again.

Is there any way to do this?  I've tried to leverage the client side upload and success events, but I've not been able to figure it out.

I can use my own Upload button (using css to hide the built in one) if there is a way for me to tell the control to start the upload in javascript.  However, I don't know if the control will still have a handle on the file to upload after it has done it successfully once already.  Also, I am currently using Async mode (AutoUpload = false), but if there is a way to do it using Sync mode then I am open to trying it.

Any ideas?

Thanks.
T. Tsonev
Telerik team
 answered on 17 Jun 2013
2 answers
325 views
Hello,

I have a grid that display a date. The controller send to the grid the dates in the right format 'dd/mm/yyyy hh:mm:ss'  but the grid displays dates such as  'Sun, 09 Mar 2008 16:05:07 GMT 0200 (Romance Daylight Time)'.  Is it possible to set the default format in french without reformating the data?
PS: i set the culture in french.


@(Html.Kendo().Grid<Scan>(Model)
                .Name("grid_Time_" + ViewData["ID"])
                .Columns(columns =>
                             {
                                  
                                 columns.Bound(e =>  e.Timestamp).Title("Date").Width(150).Format("{0:dd/MM/yyyy hh:mm:ss}");
                                 columns.Bound(e => e.GatewayID).Width(20);
                             })
                .Sortable()
                .Pageable()
                .ClientDetailTemplateId("template2")
                .DataSource(dataSource => dataSource
                          .Ajax()
                          .PageSize(30)
                          .Model(model =>
                                      {
                                          model.Id(d => d.GatewayID);
 
                                      })
 
                )
                .Events(events => events.DataBound("dataBound"))
                )

I have a client template which is loading with two values :
.Read(read => read.Action("ReadScannedMeterByGateway", "Flottes", new { Id = "#=GatewayID#",Timestamp="#=Timestamp#" }))
How can i send the dates with the format 'dd/mm/yyyy hh:mm:ss'  to server?
Farid
Top achievements
Rank 1
 answered on 17 Jun 2013
2 answers
737 views
I am using json for comment on post where i use kendo ui editor for summary. on success json i am trying to clear editor value by jquery like $('#editor').val(' ');
its not working.If i remove kendo editor its working fine. please help.
Kris Nobels
Top achievements
Rank 2
 answered on 17 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?