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

Hi all:

 We have a functional requirement to be able to edit the data in a column inside a kendo grid, by selecting a different header.

 For example, let's say we have a kendo grid that has six columns. 

 Name City Class etc

We need the ability for a user (with the given permission) to select a different option for each header column. 

Let's say they decide that they don't want "Class" as the third header/column.  We'd like the user to be able to click into the header, a dropdown appear and then the user can select a different data source.  Once selected the grid would update with the new data in the third column.

 Anyone able to point me in the right direction?  We also need to be able to reorder the kendo columns but I see that already with the Grid/Column reordering drag drop feature which is perfect.

 Thanks!

 

Boyan Dimitrov
Telerik team
 answered on 10 Jun 2015
1 answer
149 views

Hi 

How can I hide the Excel Export button in runtime? Depending on the logged in user I have to hide and show the Export Excel button.

Would you have some sample code?

 

Dimiter Madjarov
Telerik team
 answered on 10 Jun 2015
5 answers
398 views
I did the same as tutorial http://demos.telerik.com/aspnet-mvc/grid/excel-export . But as you can see in the tutorial, when you export the excel, it contains only page 1. 
I want to export all the the pages. How should i do ? 

Regards.
Dimiter Madjarov
Telerik team
 answered on 10 Jun 2015
9 answers
2.9K+ views
Hi! I'm using the KendoUI Grid with MVC 4.  I'm trying to figure out how to automagically save the cell data when I step out of the cell.  I can get it to save using a "Save" button and batch editing, but my requirements are such that they don't want to have to press the "Save" button.

Thanks for your help in advance.
Dimiter Madjarov
Telerik team
 answered on 10 Jun 2015
1 answer
339 views

In one of our projects, we are using Kendo UI Q2 and we cannot upgrade because of IE8 support and we need Export to Excel & Export to PDF features. So we decided to take these features to server side.

By googling, I found following sample projects from github:

https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid/excel-export-server-side

https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid/pdf-export-server-side

These seem to be helping but in the PDF part I see that iTextSharp is used and it's commercial license is NOT FREE. What I want to confirm is that by having a valid license of Telerik DevCraft, can we use iTextSharp commercially or do we need separate license for it?

 

Any other help or solution will be highly appreciated.

Dimiter Madjarov
Telerik team
 answered on 10 Jun 2015
6 answers
947 views
Hi All,

Initially we are using Telerik ASP.NET combo box. For this having load on demand option ( link). Now we are moving to Kendo UI combo box.
This combo box doesn't contain all options (which are present in telerik asp.net combobox) like Load on demand , ShowMoreResultsBox.. etc.  

Could you please provide solution for updating item on Load on demand 
@(Html.Kendo().ComboBox()
         .Name("fabric")
         .Filter("contains")
         .Placeholder("Select fabric...")
         .DataTextField("Text")
         .DataValueField("Value")
         .DataSource(source =>
             source.Read(read =>
                     {
                         read.Url("http://localhost:59590/api/Search/LoadonDemand");
                     }).ServerFiltering(true))
         .HighlightFirst(true)
         .IgnoreCase(true)
Nuno
Top achievements
Rank 2
 answered on 09 Jun 2015
2 answers
163 views
Hi There,

I'm working on an Umbraco CMS Project , in which in one of the page I need to use telerik Upload control (to upload large files)- I have worked on this component in separate MVC project and I am happy with its working status, now i need to integrate this functionality in Umbarco CMS, I referenced Kendo.MVC.dll in CMS project, and have copied CSS and JS relating to component in respective folder and all paths are updated where necessary, now CMS project has stopped working i.e published content is inaccessible within CMS pages, it used to work earlier, If I remove reference CMS project starts working again- So I'm unable to embed kendo UI related changes into the Umbraco CMS. could you please advise me how this can be addressed.

Thanks
Satish
Geoff
Top achievements
Rank 1
 answered on 09 Jun 2015
2 answers
462 views

Is it possible to mask a phone number with or without an extension?  I'm looking for:

(612) 555-1212

or

(612) 555-1212 ext. 5

or

(612) 555-1212 ask for Larry

 Basically, the beginning of the string must be formatted as a phone number, but the user can enter whatever they want after that. 

 Can I do it?

 Thanks!

Laurie
Top achievements
Rank 2
 answered on 09 Jun 2015
1 answer
594 views
 I have a dynamic model below is the cshtml code, is line editing possible with dynamic model ? 
 
@(Html.Kendo().Grid<dynamic>()
              .Name("requestCapacity")
              .Columns(columns =>
              {
                  foreach (var c in Model)
                  {
                      if (c.Equals("Week Starting"))
                          columns.Template(@<text> </text>).ClientTemplate(@"<span class='k-widget k-datepicker' style='width: 150px;'><span class='k-picker-wrap k-state-default'><input id='datepicker'  style='width: 100%;' data-role='datepicker' type='text' class='k-input' role='combobox' aria-expanded='false' aria-owns='datepicker_dateview' aria-disabled='false' aria-readonly='false' aria-activedescendant='270cfa37-b189-46a8-b0ea-857df06f84ab_cell_selected'><span unselectable='on' class='k-select' role='button' aria-controls='datepicker_dateview'><span unselectable='on' class='k-icon k-i-calendar'>select</span></span></span></span>").Width(150).Title(c.Key);
                      else
                          columns.Template(@<text>c</text>).Title(c.Key);
 
                  }
                  columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
              }
      )
              .Editable(editable => editable.Mode(GridEditMode.PopUp))
                  .HtmlAttributes(new { style = "height:auto;width:85%;align:center;margin:0 auto" })
                  .Pageable()
                  .ToolBar(toolbar => toolbar.Create().Text("Add"))
              .Sortable()
              .Scrollable().EnableCustomBinding(true)
               .DataSource(dataSource => dataSource
                      .Ajax().Model(model =>model.Id("ID")
                      )
                  .PageSize(10)
                    .Events(events => events.Error("error_handler"))
                                   .Create(update => update.Action("EditingInline_Update", "RequestCapacity",new {testing="#=dataItem#"}).Type(HttpVerbs.Post))
                          .Read(read => read.Action("PopulateRequest", "RequestCapacity").Type(HttpVerbs.Post))
                                  .Update(update => update.Action("EditingInsline_Update", "RequestCapacity","#=dataItem#").Type(HttpVerbs.Post))
                          .Destroy(update => update.Action("EditingInline_Destroy", "Capacity"))
              )
)

 

controller code.

public ActionResult RequestCapacityPopUp()<br>        {<br>            var dynamicBinding = new List<string>(){"Week Starting"};<br>            using (var dataModel = new CapacityPlannerEntities())<br>            {<br>                foreach (var team in dataModel.Teams)<br>                {<br>                    dynamicBinding.Add(team.TeamName);<br>                }<br>            }<br>            return View(dynamicBinding);<br>        }

Alexander Popov
Telerik team
 answered on 09 Jun 2015
1 answer
191 views

Hi

How do I pass a value from the button .content

@(Html.Kendo().Button()
                .Name("p14")
                 .HtmlAttributes(new { type = "button" })
                .Content("135")
                       .Events(ev => ev.Click("onClickPol")))
     <script>
    function onClickPol(e) {
       //This dos not work, I want to retrieve the name, content of that button what n this case is 135
        var xContent  = $(e.event.target).closest(".k-button").attr("textContent")

    }
    </script>

Dimiter Madjarov
Telerik team
 answered on 09 Jun 2015
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
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
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?