Telerik Forums
UI for ASP.NET MVC Forum
2 answers
62 views

Hi,

I use a MultiSelect to choose several values in an m:n relation.

Everything works as expected as long as I select one or more values.
But when I select nothing I get the following error:

0x800a138f - Laufzeitfehler in JavaScript: Die Eigenschaft "length" eines undefinierten oder Nullverweises kann nicht abgerufen werden.

The failing code is for(n=0,i=e.length;i>n;n++)o+=n%2?s(e[n]):a(e[n]),r._data.push(e[n]);return o}

This happens only when I add a new record.
If I edit an existing one it is possible to remove the formerly chosen element and update after this.

I initialize the field via model.Field(p => p.Salads).DefaultValue(new List<EECanteen.Models.FoodItem>());

To explain my problem - I want to edit meal offerings for a day and can choose from zero or more salads.

ManniAT
Top achievements
Rank 2
 answered on 27 Jul 2015
4 answers
118 views
I'm trying to use Editing Custom Editor in my local Environment http://demos.telerik.com/aspnet-mvc/grid/editing-custom
But It is not working as it should be and not showing Drop Down List for Category Column in Edit mode and show numeric text box and text box instead
I'm using Northwind Database as in your example and I didn't change a lot in your code but it is not working .. so could you help to fix this issue and make it work as your example.
Dimiter Madjarov
Telerik team
 answered on 27 Jul 2015
5 answers
439 views

 In the webforms control I was able to set the Timeline to a specific day then set how many days I wanted to see after that day. I did this by setting the NumberOfSlots property. I have not been able to find this property in the MVC Scheduler. How do I get this same behavior with the MVC Scheduler control. 

 thanks for the help. 

Vladimir Iliev
Telerik team
 answered on 27 Jul 2015
5 answers
437 views

I want to use ClientRowTemplate with external template but cant seem to reference it

.ClientRowTemplate(  what goes here   ) 

how to do . thanks

<script id="cart-grid-template" type="text/x-kendo-template">
...
</script>

Dimiter Madjarov
Telerik team
 answered on 27 Jul 2015
3 answers
125 views

Hi,

 

I have two custom editors in my Grid.

One is a simple dropdown for a "ForeignKeyColumn" - using UIHint("MyEditor") this works fine in Inline as well as in PopUp edit mode.

An other column using a "MultiSelect" works in Inline but not in PopUp edit mode.

In PopUp the whole Column is not displayed.
It is something like the territories in Northwind, where on Record can belong to multiple Territories.
I works fine in Inline - but (for other reasons) I would need PopUp.

 

Manfred

Boyan Dimitrov
Telerik team
 answered on 24 Jul 2015
4 answers
1.5K+ views

Hi, I am using Kendo for ASP.Net MVC version 2015.2.264 using the Blue Opal theme.  I have a checkbox input which is not "checkable" when bound to a model property via the @CheckBoxFor razor syntax.  It renders correctly using the Kendo assigned theme, but does not allow you to check it even though it is not disabled.

 

This works:

     <div style="display:block;">
        <input type="checkbox" id="chkIntegrated" class="k-checkbox" name="Integrated">
        <label class="k-checkbox-label" for="chkIntegrated">Integrated 2</label> 
    </div>

 

 This does NOT work:

     <div style="display:block;">
        @Html.CheckBoxFor(Function(m) m.Integrated, New With {.class = "k-checkbox", .Id = "chkIntegrated"})
        @Html.LabelFor(Function(m) m.Integrated, New With {.class = "k-checkbox-label"})
    </div>

 

I have attached the test html page which illustrates this.  Any ideas? 

 

 

      

David
Top achievements
Rank 1
 answered on 24 Jul 2015
3 answers
301 views

Hello ! 

 

I have a kendo UI grid displaying data with a templated pop up for edition.:

@(Html.Kendo().Grid<Model>()
    .Name("Grid")
    .Events(events => {events.Edit(@<text>
    function(e) {
        e.sender.editable.validatable._errorTemplate = kendo.template($('#tooltip-template').html());
    }
    </text>);})
    .Columns(columns =>
    {
        columns.Bound(m => m.DateReceived);
        columns.Bound(m => m.SupplierName);
        columns.Bound(m => m.InvoiceNo);
        columns.Bound(m => m.RefFileNo);
        columns.Bound(m => m.InvoiceDate);
        columns.Bound(m => m.Amount);
        columns.Bound(m => m.DatePayment);
        columns.Command(command => { command.Edit().CancelText(" ").UpdateText(" ").Text(" "); }).Title(Litigation.Action);
    })
    .ToolBar(config =>
    {
        config.Create().Text(Litigation.AddInvoice);
    })
            .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("LitigationInvoiceEditPopUp").Window(w => { w.Width(711); w.Height(300); w.HtmlAttributes(new { @class = "invoice" }); })
        .DisplayDeleteConfirmation(Generic.Delete))
    .Sortable()
 
    .Resizable(resize => resize.Columns(true))
    .DataSource(datasource => datasource
        .Ajax()
        .Model(model =>
        {
            model.Id(m => m.Id);
            model.Field(m => m.LitigationFileId).DefaultValue(Model.LitigationFileId);
        })
            .Read(read => read.Action<Controller>(x => x.Read(null, Model.LitigationFileId)))
            .Create(create => create.Action<Controller>(x => x.Create(null, null)))
            .Update(update => update.Action<Controller>(x => x.Update(null, null)))
                .Events(events => events.Error(@<text> function(e) {
                                                            debugger;
                                                            error(e);}
                                                </text>))           
        .PageSize(int.MaxValue)
 
 
    )
)


I have succeeded in setting the error Template for the validation errors and it works well. But when validation errors occurs on a combobox, the combobox border does not change to red. In my other pages I have done something like this :

 

var validator = $("form").kendoValidator({
                validate: function (e) {
                    return showErrors(this.errors(),this._errors)
                },
                errorTemplate: "<div class='validationMessage' style='color:red;font-size:10px;'>#=message#</div>"
            }).data("kendoValidator");

The function showErrors changes the colors of the combobox if they are in the parameters "this._errors"

 

I want to do the same thing with the validator of the popup but I have not find a way to do it yet. Here is what I already tried :

 In the definition of the DataSource in the grid :

 

Update(update => update.Action<Controller>(x => x.Update(null, null)))
                .Events(events => events.Error(@<text> function(e) {
                                                            debugger;
                                                            error(e);}
                                                </text>))

This is not even fired because I guess it is the server side event and the validation stops before going server side

and in the Edit Event of the grid :

 

.Events(events => {events.Edit(@<text>
    function(e) {
        e.sender.editable.validatable._errorTemplate = kendo.template($('#tooltip-template').html());
        e.sender.editable.validate =  = function(e) {debugger;error(e, this);}
    }

 e is always undefined et this does not contains any errors and the validation messages do not show up anymore.

 

I could really need a hand on this one !

 

Thanks,

 

Guillaume

 

Guillaume
Top achievements
Rank 1
 answered on 23 Jul 2015
2 answers
750 views
Model.RowVersion (TimeStamp) field is NULL when inline editing a row that includes a TimeStamp byte[] field, when inspecting the Model.RowVersion value in the UPDATE Controller action. 

I require this field because I am doing concurrency checking on the database when I update a row?

To get around this I will probably change the database data type from a TimeStamp to a UniqueIdentifier (GUID) or INT see: http://stackoverflow.com/questions/1687555/version-number-or-timestamp-for-optimistic-concurrency
columns.Bound(f => f.FluidID).Title("ID").Width(50).Hidden();
columns.Bound(f => f.Name).Title("Name");
columns.Bound(f => f.Code).Title("Code");
columns.Bound(f => f.Grade).Title("Grade");
columns.Bound(f => f.Manufacturer).Title("Manufacturer");
columns.Bound(f => f.RowVersion).Title("RowVersion").Hidden().IncludeInMenu(false);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(182);
Similar questions here:
http://stackoverflow.com/questions/16043026/kendo-ui-for-asp-net-doesnt-render-byte

http://www.kendoui.com/forums/ui/grid/bind-rowversion-field-to-popup-editor-byte.aspx#boFAeK6aG2OF1P8AAFTdxQ

http://www.kendoui.com/forums/mvc/general-discussions/683462-byte-array-rowversion-doesn-t-render-properly.aspx


Adam
Top achievements
Rank 1
 answered on 23 Jul 2015
4 answers
281 views
Hello, 
i need a help to use custom command in hierarchy grid. to add, edit and delete parent and child in the same grid.
Could you help me please. 

Thanks

DHHS
Top achievements
Rank 1
 answered on 23 Jul 2015
5 answers
108 views

Hi,

In all my projects using kendo, I have a problem with the culture. I set the culture in french but sometimes, the culture come back in english. So what I did exactly, in my main layout, i set the cultre like this : <script> kendo.culture("fr-FR"); </script> and in my references I included Kendo.Mvc.resources.

Did i forget something ?

 

Thanks by advance

Philippe
Top achievements
Rank 1
 answered on 23 Jul 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?