Telerik Forums
UI for ASP.NET MVC Forum
14 answers
577 views
I'm getting a JavaScript error after I apply grouping.
Unable to get property 'length' of undefined or null reference kendo.web.min.js, line 10 character 28275
Step 1. See attached Drag to GroupBy row.png - Load the page and group any column
Step 2. See attached JavaScript error when GroupBy.png, I get the JavaScript error.

The code I am using looks to me to be identical to the Custom AJAX Binding sample code included in the examples, but I am getting this error?

.CSHTML
@(Html.Kendo().Grid<Fluid>()
    .Name("Grid")
    .Columns(columns => {
        columns.Bound(o => o.FluidID).Groupable(false);
        columns.Bound(o => o.Name);
        columns.Bound(o => o.Code);
        columns.Bound(o => o.Grade);
        columns.Bound(o => o.Manufacturer);
    })
    .Deferred()
    .Pageable()
    .Sortable()
    .Filterable()
    .Scrollable()
    .Groupable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("GetJsonData", "FluidKendo"))
    )
)


Controller Code:
public ActionResult GetJsonData([DataSourceRequest] DataSourceRequest request)
{
    List<Fluid> allFluids = MockFluids();
    // When drag column header into group by row the following JavaScript error occurs
    // JavaScript error IE: SCRIPT5007: Unable to get property 'length' of undefined or
    // null reference kendo.web.min.js, line 10 character 28275
    // JavaScript error Chrome: Uncaught TypeError: Cannot read property 'length' of undefined
    // --- Example taken from the Custom AJAX Binding example: CustomAjaxBindingController.cs
    var resultThatErrors = new DataSourceResult();
    resultThatErrors.Data = allFluids;
    resultThatErrors.Total = allFluids.Count();
 
    return Json(resultThatErrors);
}
If anyone is interested I have a Visual Studio 2012 Sample App to show the error download here: https://skydrive.live.com/redir?resid=3113F9DB92CC84B2!1997&authkey=!Nefhm5WSin4%24

Refer to the attached Highlighted VS solution items.png for the highlighted items of interest.

Thanks,
Beau


Beau
Top achievements
Rank 1
 answered on 11 Jul 2013
2 answers
203 views
Can someone point me to an example of using the GroupFooterTemplate with the MVC Server Wrappers?

From what I can tell, this should work when I 'group by' any column:
.GroupFooterTemplate( f => "Sum: " + f.Sum )

Is there any other setup / configuration that's needed to make it work?

Edit:
I've add this to the DataSource as well without success
.Aggregates( a => a.Add(c => c.Quantity).Sum())
Tom
Top achievements
Rank 1
 answered on 10 Jul 2013
1 answer
132 views
Dear KendoUI Team!
Please help out! Attached you find a project with Editortemplates in a nested table.
Please try the following:
- Open Editortemplate 'Country3.cshtml'
- Change Serverfiltering to true
- run the website
- try to edit a row
- you will experience an 'invalid template' error
I you change serverifltering to false the 'invalid template' error is gone.
But I need server filtering there!
What is going on? What can I do?

brgds
Malcolm Howlett
Malcolm
Top achievements
Rank 1
 answered on 10 Jul 2013
3 answers
145 views
I am using the Kendo UI Upload control with the Knockout-Kendo.js project's binders.  I have a file upload control on my form and am seeking to upload the file through the ajax callback provided by the Knockout-Kendo.js api.  Most of the time, the upload goes through successfully, but every once in a while, so far only on IE, there's an issue and I get a javascript error saying "SCRIPT5: Access is denied."   I've read that IE9 has security rules that can cause this error in certain situations, but I do not understand well enough how the kendo ui control works (or how the knockout-kendo library works) to understand what I might need to change to prevent the error.  Any ideas will be very much appreciated!

Here is a simplified version of my code:
In the view:
<input name="fileUpload" type="file" id="fileUpload" data-bind="kendoUpload: $root.fileUploadSettings()" />

In the javascript viewmodel:
var fileCategory = "myCategory";
 
fileUploadSettings = function () {
        var kendoSettings = {
            multiple: false,
            enabled: true,
            async: { saveUrl: "../Entity/AddFiles" },
            success: function (e) { _uploadFileSuccess(e, fileCategory); },
            error: function (e) { _uploadFileError(e, fileCategory); },
            select: function (e) { _uploadFile(e, fileCategory); },
            localization: { select: "Upload File" },
        };
In the MVC controller: 
[HttpPost]
public ActionResult AddFiles(File data, System.Web.HttpPostedFileBase fileUpload)
{
    try
    {
        File file = FileUIService.AddFile(data, fileUpload);
        FileView rfv = new FileView()
        {
            Id = file.Id,
            Name = fileUpload.FileName.Substring(fileUpload.FileName.LastIndexOf('\\') + 1)
        };
 
        return Json(rfv, "text/plain");
    }
    catch (Exception ex)
    {
        return Json(ex.Message, "text/plain");
    }
}
Daniel
Telerik team
 answered on 10 Jul 2013
0 answers
56 views
Please refer the attached file.
Prasad
Top achievements
Rank 1
 asked on 09 Jul 2013
3 answers
1.7K+ views
I'm trying to change the color of the grid command button but the CSS is not taking effect.  The CSS is being called because the font size is changing.  The color is not for some reason.  Any ideas.


CSS:
.editButtonChangeColor
{
background-color: Red;
color: Red;
border-color: Red;
font-size: 20px;
}

Databound function of grid:
$(".k-grid-edit").addClass("editButtonChangeColor");
Dimiter Madjarov
Telerik team
 answered on 09 Jul 2013
2 answers
267 views
I looked at the code sample at http://www.kendoui.com/code-library/mvc/grid/export-grid-to-excel.aspx
It uses AJAX binding.
Can this be done using server binding? I am having some issues with ajax binding.

Thanks

Jagdish
Top achievements
Rank 1
 answered on 08 Jul 2013
1 answer
66 views
The Model has 4 properties, Description, Amount, Note and a boolean, NoteRequired.
I have a grid with 3 columns, Description, Amount and Note.  
If NoteRequired is True for a row and the Amount > 0, how do I show them a message that a Note is Required and set the focus in the Note field?

Dimo
Telerik team
 answered on 08 Jul 2013
5 answers
164 views
I created MVC 3 web application and then convert it to Kendo UI for ASP.NET MVC application. Plz see attached project.

There is a simple grid on index page, add new item button is on grid toolbar, edit and destroy buttons are in column.

I could add new row successfully, but when I try to edit existing row, another create action is posted again. Refresh page, two rows in grid. the same thing happens when I try to delete a row.

Why? Am I missing anything there?

Please advise.
Jason
Top achievements
Rank 1
 answered on 08 Jul 2013
0 answers
101 views
hello all, 
i need to work on new project and we are planning to have rich data grid functionality. i searched for telerik controls for Data Grid and came to this Kendo UI . our platform would be Asp.net Mvc4. please help.
Sandeep
Top achievements
Rank 1
 asked on 08 Jul 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
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?