Telerik Forums
UI for ASP.NET MVC Forum
1 answer
146 views
Data Source has:

    serverFiltering: true,

Grid has:

           filterable: true,
 
When the Filter is selected from the columnMenu, nothing goes across the wire per Fiddler and the C# breakpoint is not hit.  (Sorting server-side on this grid works fine, HttpGet breakpoint in the Controller is hit for every change.)  

And fyi the filter doesn't seem to work at all in Chrome, it won't accept a text value to search.

For the browsers where it works, do I have to do something else to enable the grid to Filter on the server?
Vladimir Iliev
Telerik team
 answered on 29 Mar 2013
4 answers
269 views
I'm using trial version of Kendo UI Complete for ASP.NET MVC to test some features of the mobile component.
I'm trying to build a mobile app to test some features, but I'm having some problems to understand some concepts.

              1. The initialization of the app:
var app = new kendo.mobile.Application();
Should be done just once, to be able to use the navigation capabilities of the kendo framework, am I right? Using the MVC pattern of ASP.NET MVC, where is the best place to put this piece of code? There is some best practice/suggestion to place the initialization?

                  2. This question is related with the first one. In the "Create" view, I have the following code:
@model MiniSIGEMobile.Models.Student
@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
  
    <ul data-role="listview" data-inset="true">
           
         <li data-role="fieldcontain">
            @Html.LabelFor(model => model.Person.FirstName)
            @Html.EditorFor(model => model.Person.FirstName)
            @Html.ValidationMessageFor(model => model.Person.FirstName)
        </li>
        <li data-role="fieldcontain">
            @Html.LabelFor(model => model.Person.Age)
            @Html.EditorFor(model => model.Person.Age)
            @Html.ValidationMessageFor(model => model.Person.Age)
        </li>
        <li data-role="fieldcontain">
            @Html.LabelFor(model => model.Course)
            @Html.EditorFor(model => model.Course)
            @Html.ValidationMessageFor(model => model.Course)
        </li>
        <li data-role="fieldcontain">
            <input type="submit" value="Create" />
        </li>
    </ul>
}
And the "Create" action in the controller is like this:
// POST: /Student/Create
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create(Student student)
{
    if (ModelState.IsValid)
    {
        db.Students.Add(student);
        db.SaveChanges();
        return RedirectToAction("Index");
    }
    return View(student);
}
So when I click the "Create" button, the information is stored in the database, but the RedirectToAction("Index") is forcing the rebuild of all HTML, so the mobile app is no more initialized, without the mobile styles (because I'm initializing just once in another controller action).
How should I solve this?

           3. Finally, I would Like to know how can I change the style of the "Create" input to be like a kendoMobileButton? 

 Any kind of suggestion or guidance will be very appreciated!
Alexander Valchev
Telerik team
 answered on 29 Mar 2013
1 answer
196 views

I'm using the Kendo UI Web controls with ASP.NET MVC 3 on .NET Framework 4.0.  We've been developing a new application that uses Kendo controls extensively.    Grids with custom toolbars, command buttons, ~20 columns, and editor templates are used heavily.    

I've been running the application side by side on IE 8 and Chrome.  The performance on Chrome is significantly better (~5X better).  It's most notable with the Kendo Grids.  On IE8 there seems be a notable lag between loading the data and then displaying the data on grids.  Same for going in and out of edit mode.  It's not taking CPU processing time during this lag.  It takes a few seconds to refresh the grid once the data is loaded.  In Chrome it's pretty must instantaneous. 

Unfortunately IE 8/9 are our official browsers.  Any tips to improve performance?  Our users won't accept the performance as it currently sits.  

Dimo
Telerik team
 answered on 29 Mar 2013
1 answer
929 views
Hello,

I'm experiencing a problem where the multislect submits the value of one item only even if more than one item is selected. Shouldn't it submit all the values delimited by a comma?

Here is my code:

View:
@using (Html.BeginForm("Send", "MultiSelect", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<div class="demo-section">
    <h3 class="title">Select Continents</h3>
    @(Html.Kendo().MultiSelect()
            .Name("multiselect")
            .DataTextField("Text")
            .DataValueField("Value")
            .BindTo(continents)
            .Events(e =>
            {
                e.Change("change").Select("select").Open("open").Close("close").DataBound("dataBound");
            })
    )
</div>
    <input id="sendButton" type="submit" value="   Send   " />
}
Contoller:

public partial class MultiSelectController : Controller
    {
        public ActionResult Events()
        {
            return View();
        }
 
        public ActionResult Send(string multiselect)
        {
            //the string parameter multiselect has only one value even if more than one                      //value is selected
            return View();
        }
    }
Is there something wrong I am doing??
kabbas
Top achievements
Rank 1
 answered on 29 Mar 2013
2 answers
184 views
Hello,

I'm wondering if I can use my custom developed filters with the multiselect, instead of being tied only to the ready-made ones (starts with, contains, equals)

I want to implement the custom filter server-side, i.e the multi-select makes an AJAX request with the query and the server makes the filtering then returns the results.

Thank you.
kabbas
Top achievements
Rank 1
 answered on 28 Mar 2013
2 answers
115 views
Hello,

We are facing serious problems using Kendo UI Grid with IE 10. For example, when scrolling down, select a row
at the end, the Grid 'jumps' back to first row.
This is very anoying for the user, because the selected row leaves the visible area.

This behaviour does not occur in FF or Chrome.

Many thanks in advance Thomas

More details in attached images.




Dimiter Madjarov
Telerik team
 answered on 28 Mar 2013
1 answer
289 views
I have a model with the [Required] attribute applied to several properties.  When I use a pop-up editor from my grid if I Update a record, the Grid DataSource's Create and Update methods are called without any validation occurring.

Model Example:

public class SessionMain
{
[Required]
public string Title { get; set; }

[Display(Description = "Auction")]
[Required]
public long AuctionID { get; set; }

[Display(Description = "Increment Set")]
[Required]
public long IncrementSetID { get; set; }

[Display(Description = "Venue")]
[Required]
public long VenueID { get; set; }

[Display(Description = "Ringman Lane")]
[Required]
public long RingmanLaneID { get; set; }
}

Grid declaration:

@(Html.Kendo().Grid<Spectrum.Model.SessionMain>()
.Name("sessionGrid")
.HtmlAttributes(new { style = "height: 500px" })
.AutoBind(true)
.Columns(columns =>
{
columns.Bound(c => c.ID).Groupable(false);
columns.Bound(c => c.Title).Groupable(false);
  columns.Bound(c => c.VenueID).Groupable(true);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
}
)
.Editable(editable => editable
.Mode(GridEditMode.PopUp)
.TemplateName("SessionPopUp")
.Window(window => {
window.Title("Session");
window.Name("sessionWindow");
window.Modal(true);
window.Resizable();
window.Width(960);
}))
.Pageable(pageable => pageable
.Enabled(true)
.PageSizes(new int[3] { 10, 25, 50 })
.Refresh(true))
.Sortable()
.Scrollable()
.Selectable()
.DataSource(datasource => datasource
.Ajax()
.Model(model => model.Id(s => s.ID))
.Events(events => events.Error("gridError"))
.Create(cfg => cfg.Action("GridCreate", "Session").Data("getAuctionID"))
.Read(cfg => cfg.Action("GridRead", "Session").Data("getAuctionID"))
.Update(cfg => cfg.Action("GridUpdate", "Session"))
.Destroy(cfg => cfg.Action("GridDestroy", "Session"))
.ServerOperation(false))
.Events(ev => ev.Change("setGridChange"))
)

Popup Declaration (file in \Shared\EditorTemplates named "SessionPopUp.cshtml"):

@model Spectrum.Model.SessionMain@Html.ValidationSummary(true)
@Html.HiddenFor(model => model.ID)<table>
    <tr>
        <td>@Html.LabelFor(model => model.Title)</td>
        <td>
            @Html.TextBoxFor(model => model.Title, new { @class = "k-textbox" })
            @Html.ValidationMessageFor(model => model.Title)
        </td>
        <td>@Html.LabelFor(model => model.SessionType, "Session Type")</td>
        <td>
            @(Html.Kendo().DropDownListFor(model => model.SessionType)
                .Name("sessionTypeDropDown")
                .Items(items => {
                    items.Add().Text("Live").Value("1");
                    items.Add().Text("Internet").Value("2");
                })
                .OptionLabel("Select Session Type...")
            )
            @Html.ValidationMessageFor(model => model.SessionType)
        </td>
    </tr>
    <tr>
        <td>@Html.LabelFor(model => model.IncrementSetID, "Increment Set")</td>
        <td>
            @(Html.Kendo().DropDownListFor(model => model.IncrementSetID)
            .DataTextField("Title") //Specifies which property of the Product to be used by the combobox as a text.
            .DataValueField("ID") //Specifies which property of the Product to be used by the combobox as a value.
            .DataSource(source => source
            .Read(read => read.Action("List", "IncrementSet"))
                )
            .OptionLabel("Select Increment Set...")
            )
            @Html.ValidationMessageFor(model => model.IncrementSetID)
        </td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td>
            @Html.LabelFor(model => model.VenueID, "Venue")
        </td>
        <td>
            @(Html.Kendo().DropDownListFor(model => model.VenueID)
            .DataTextField("Title") //Specifies which property of the Product to be used by the combobox as a text.
            .DataValueField("ID") //Specifies which property of the Product to be used by the combobox as a value.
            .DataSource(source => source
                .Read(read => read.Action("GetVenuesList", "Venue"))
                )
            .OptionLabel("Select Venue...")
            )
            @Html.ValidationMessageFor(model => model.VenueID)
        </td>
    </tr>
</table>
Petur Subev
Telerik team
 answered on 28 Mar 2013
1 answer
199 views
Hello to all,

we are using check box column in Kendo Grid. The problem is, that the user has to click twice to
edit check box (click once to activate edit mode, wait, then change the value) . This is cumbersome and annoying for our users.

Ist there a possibility (example), implementing CheckBox in Grid, using a single click to change value ?

Many thanks
Thomas
Dimiter Madjarov
Telerik team
 answered on 28 Mar 2013
4 answers
298 views
Hi,

DataSourceRequest ‘Sorts’ parameter (‘Filters’ and ‘Groups’
too) are null in my MVC action. Other parameters (‘PageSize’, for example) bind
properly.

If I use MVC wrapper for Kendo Grid everything works
perfectly, but I need to connect grid’s data source with MVC action without
wrapper. Is it possible?

JS libraries bundle:
jquery.min.js
kendo.all.min.js
kendo.aspnetmvc.min.js

Grid example:
$('#cars').kendoGrid({
            pageable: true,
            sortable: true,
            dataSource: new kendo.data.DataSource({
                serverPaging: true,
                serverSorting: true,
                schema: { data: "Data", total: "Total" },
                transport: {
                    read: {
                        url: '@Url.Action("GetCars")',
                        contentType: "application/json; charset=utf-8",
                        type: "POST"
                    },
                    parameterMap: function (options) {
                        return JSON.stringify({ request: options }); 
                    }
                }
            })
        });

HTTP request:
{"request":{"sort":[{"field":"Name","dir":"desc"}]}}

MVC action:
[HttpPost]
public JsonResult GetCars([DataSourceRequest]DataSourceRequest request)
{
     ..............
}

 Thanks!
Max
Top achievements
Rank 1
 answered on 28 Mar 2013
3 answers
490 views
Hi,

I'm new to the Kendo UI stuff, so please forgive me if this is an easy one; I've been trying to find some documentation that might tell me what I'm doing wrong, but nothing so far.

I have a grid with (ATM) nine rows in it. I need to make this grid pageable. I followed this example to do so (http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/custom-binding) with the only deviations being that I set my page size to five (since I only have nine rows) and I didn't do the sorting part since I'm not using that right now. I did not do that part beginning with "Custom AJAX Binding" because it didn't seem relevant to the rest of the example.

Here's what I've got:

Controller method:
public ActionResult Assigned([DataSourceRequest(Prefix = "Grid")] DataSourceRequest gridRequest)
{
    if (gridRequest.PageSize == 0)
    {
        gridRequest.PageSize = 5;
    }
 
    var orders = _orderModel.GetDashboardOrders(DashboardOrderStatus.Assigned);
     
    if (gridRequest.Page > 0)
    {
        orders = orders.Skip((gridRequest.Page - 1)*gridRequest.PageSize).ToList();
    }
 
    orders = orders.Take(gridRequest.PageSize).ToList();
 
    ViewData["total"] = orders.Count; 
 
    var model = new DashboardModel
                    {
                        SelectedTab = "Assigned",
                        Orders = orders
                    };
    model = SetGlobalTabsBasedOnUserRole(model) as DashboardModel;
    return View(model);
}

and the declaration of the grid on my CSHTML page:
@(Html.Kendo()
.Grid<ProjX.Web.Models.Entities.DashboardOrder> ()
.Name("Grid")
.EnableCustomBinding(true)
.BindTo(Model.Orders)
.TableHtmlAttributes(new {style="width: 850px;"})
.Columns(columns =>
             {                    
                <columns removed for readability, they work fine>
             })
             .Pageable(x => x.PageSizes(true))
             .DataSource(ds => ds
                 .Server()
                 .Total((int)ViewData["total"])
                 ))


On my page I have the paging controls showing up on my grid, but it shows there only being one page "bubble" and a message saying "1-5 of 5 items" None of the forward/back arrows are enabled.

I'm kind of stumped here; I've been trying to find some documentation or blog post that shows me where I went wrong, but so far nothing. So, what am I doing wrong here?
Atlas
Top achievements
Rank 1
 answered on 27 Mar 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?