Telerik Forums
UI for ASP.NET MVC Forum
1 answer
1.1K+ views
Hello.

I'm using the Datepicker, but it will not work when the Date has a Kind of type Local.

It renders as :

<input data-val="true" data-val-date="The field FechaInicio must be a date." data-val-required="El campo FechaInicio es obligatorio." id="FechaInicio" name="FechaInicio" type="date" value="2013-07-20T15:00:00.000Z" />

Instead of the proper way which works that is :

<input data-val="true" data-val-date="The field FechaInicio must be a date." data-val-required="El campo FechaInicio es obligatorio." id="FechaInicio" name="FechaInicio" type="date" value="15/07/2013" />
I'm using the Kendo UI MVC Wrapper, and I'm getting this weird behaviour when posting the date to the controller from javascript with:
date.toISOString()
Kiril Nikolov
Telerik team
 answered on 13 Aug 2013
1 answer
188 views
By default the KendoUI MVC project template for VS 2012 is an internet project.  After I create the project, I want to make it an intranet project(window integrated authentication).  I have done the following on the project properties:

1.  Disabled the Anonymous Authentication
2. changed Managed Pipeline Mode to Integrated.
3. Enabled Windows Authentication

but it always redirects me to http://localhost:55063/login.aspx?ReturnUrl=%2F.  Of course, the file doesn't exist.  It works when I refresh with the url.
Please let me know how to remove this redirect.

Thanks.

Yingyi
Kiril Nikolov
Telerik team
 answered on 13 Aug 2013
3 answers
205 views
Hi,

What I'm trying to do is relatively close to the Grid Editing custom editor sample. The difference in my case is that the list of categories must not be the same for all products. In fact, depending on the product properties, I want to display only a subset of all categories.
In the EditorTemplate ClientCategory.cshtml a model is defined "@model Kendo.Mvc.Examples.Models.ClientCategoryViewModel" but this model is always null. Is there a way to access the ClientCategoryViewModel in the EditorTemplate partial view ?
Or is there another way to acheive this ?

Thank you,
Regards,


Vladimir Iliev
Telerik team
 answered on 13 Aug 2013
1 answer
84 views
Hi there,

I have a grid which contains "Quantity" and "Amount" columns. When the user selects multiple rows from the grid, they can then click a "Sum" button which will calculate the Total Quantity and Total Amount based on the current selected rows. How can I achieve this?
Dimiter Madjarov
Telerik team
 answered on 13 Aug 2013
1 answer
2.0K+ views
Test case:
1. I type "March 2015" into DatePicker
2. Kendo validator accepts this value, i.e. "kendo.parseDate(input.val()) !== null". So the form can be submitted.

The first problem: pop-up calendar does not show the date 03/01/2015. Why? 

3. On the server side I have model property  correctly binded from the incoming value "March 2015" (so it has value "03/01/2015"). And I return the same view with the same model. That value is again rendered as <input value="March 2015"...>

The second problem:
 I have empty value in datepicker in browser. 
Is there a way to get value in datepicker in this situation? I'm awared about parseFormats parameter. But why the default behavior is so strange? Why you do not use kendo.parseDate(input.value) when no parse formats are given explicitly?

The same problem is here when I type date in some other formats - '2013/02/13' for example. Kendo Validator accepts this value, MVC default model binder accepts this value, but widget does not. It seems to me you use ""format" property of DatePicker options to parse a value when parseFormats are not given explicitly.
Vladimir Iliev
Telerik team
 answered on 13 Aug 2013
3 answers
532 views
Is it possible to disable spell checking?

Setting 
Html.Kendo().MultiSelect().HtmlAttributes(new { spellcheck = "false" }) ...
doesn't disable spell checking. 

Thanks!
Vladimir Iliev
Telerik team
 answered on 13 Aug 2013
5 answers
220 views
I am trying to place a grid inside a mobile view, but the grid is slightly too large and some of the words in the last column get cut off.  What is the best way to accommodate the additional scrolling.  Maybe zoomable views ??
Nikolay Rusev
Telerik team
 answered on 13 Aug 2013
1 answer
161 views
As I state in the subject.  Is it possible to have batch editing/deletion, but the have a Popup Create?

I actually want to take it a step further and use the values from the grid's 'selected' rows to pre-populate/default the 'Create' pop-up.

Are either possible?

Thanks,
David
Alexander Valchev
Telerik team
 answered on 12 Aug 2013
1 answer
343 views
Hi everyone,
I am using Kendo Grid Hierarchy in my ASP.Net MVC application.

For each row in my parent table, i have an option to add a child table.

My parent table is associated with a model. Each row in this parent table has several columns:
- ID
- Name
- Amount
- Button
Every time i add a parent row, all values are empty (ID and Name).

Now, here is my problem:

When my parent row has a child table filled with rows, e need to hide the button in the parent row. 
When i remove my child table, i need to show the buttons again.
I also need to fill a hidden column in the child table, which indicates me who is the parent row.

How can i do this, only in the client side (using javascript)? I want to edit my information inline, and i would like to make a post only after my editing is completed, serializing my table to JSON and sending it to the server.

Thanks in advance.

Best regards
Atanas Korchev
Telerik team
 answered on 12 Aug 2013
2 answers
275 views
My data structure consists of groups and users with a link table between them.  I have setup an OData data source, where I can do either of the following:

/api/Users?$expand=USERGROUPS
or 
/api/UserGroups?$expand=USERS

I want to display a grid with user groups, and the details row to be a grid of users.

Setting up the grid, I use /api/UserGroups in the data source, and I get all my groups to appear.  Where I am experiencing a problem is displaying the users for a selected group.

At first glance, the data source method to use seems to be /api/Users?$expand=USERGROUPS.  I wrote a function that takes in the value of the selected group from detailInit(e), where e is the USERGROUP.data value, and the group's properties can be accessed:

function userDataSource(groupData) {
    console.log("group data");
    console.log(groupData);
    var userDS = new kendo.data.DataSource({
        type: "odata",
        transport: {
            read: {
                //url: "/api/UserGroups?$expand=USERS",
                url: "/api/Users?$expand=USERGROUPS",           // only need to expand users for the selected group
                dataType: "json"                                // the default result type is JSONP, but WebAPI does not support JSONP
            },
            parameterMap: function (options, type) {
                // this is optional - if we need to remove any parameters (due to partial OData support in WebAPI
                var parameterMap = kendo.data.transports.odata.parameterMap(options);
                return parameterMap;
            }
        },
        schema: {
            data: function (data) {
                console.log("USERS");
                console.log(data.value);
                return data.value;
            }
            ,
            total: function (data) {
                console.log("user count: " + data["odata.count"]);
                return data["odata.count"];
            },
            model: {
                fields: {
                    ITEMID: { type: "string" },
                    USERNAME: { type: "string" },
                    FIRSTNAME: { type: "string" },
                    LASTNAME: { type: "string" },
                    EMAIL: { type: "string" }
                }
            }
        },
        pageSize: 10,
        //filter: { field: "odata.value.USERGROUPS.ID", operator: "eq", value: groupData.ID },                     // filter where the the user.group nav prop ID = group id
        serverPaging: true,
        serverFiltering: true,
        serverSorting: true
    });
 
    return userDS;
 
}

function detailInit(e) {
 
    $("<div/>").appendTo(e.detailCell).kendoGrid({
        dataSource: userDataSource(e.data),
        scrollable: false,
        sortable: true,
        pageable: true,
        columns: [
            { field: "USERNAME", title: "User Name", width: "130px" },
            { field: "EMAIL", title: "Email", width: "130px" },
            { field: "NETWORKID", title: "Network ID" }
        ]
    });
 
 
    //var detailRow = e.detailRow;
 
    //detailRow.find(".tabstrip").kendoTabStrip({
    //    animation: {
    //        open: { effects: "fadeIn" } 
    //    }
    //});
}

userDataSource(groupData) returns an array of USERS[], and due to the pageSize attribute, limited to 10.  USERS.  Each USERS element contains a USERGROUPS[] (array) element.

What I would like to return is a list of users where USERS.USERGROUPS.ID == groupData.ID, and have these all displayed in the details grid.

I considered using api/UserGroups?$expand=USERS as the datasource.  In that case I would have to return the array of users within a given group.

Regardless, the filter option I am trying on the data set is not working:
filter: { field: "odata.value.USERGROUPS.ID", operator: "eq", value: groupData.ID },                     // filter where the the user.group nav prop ID = group id

I realize that I could write another data source API that only spits out a list of users (which maybe much simpler), but I would like to know how to use this expanded, navigation content data.

Assistance on this would be appreciated.



B
Top achievements
Rank 1
 answered on 09 Aug 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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Security
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?