Telerik Forums
Kendo UI for jQuery Forum
2 answers
644 views
Hi I am working with the Kendo UI grid and am currently able to display data from my MySQL database using JSON to transport the information.

I am allowing the user to update the data in the database through a series of inputs, which when clicking a row on the grid are populated by an item in the grid's datasource. This is all working perfectly and very quickly. However, when I update the item I am then calling the .read() method on the datasource, and the only issue I am having is that I am not currently able to figure out how I can reselect the same row. I can loop through the datasource's views and find the view in particular that matches up to the edited item by one of its properties but I can't figure out a way to reselect it.

var grid = $(".grid.dynamic.tbl").data("kendoGrid");
grid.dataSource.read();

//console.log(grid.dataSource.view());
for (i in grid.dataSource.view()){
console.log(grid.dataSource.view()[i]);
if (myID == grid.dataSource.view()[i].MyID) console.log('Found correct ID at index: '+i);
}

Any ideas? It is probably staring me right in the face to be honest.
Basem
Top achievements
Rank 1
 answered on 24 May 2012
2 answers
398 views
What's the best way to maintain Grid Selection after the user sorts a column? Right now when the user changes the sort by clicking a column header the selection disappears.
Basem
Top achievements
Rank 1
 answered on 24 May 2012
1 answer
160 views
HI all,

I want to have a webapp in android device where the app has to retrive the data from a database.I am uncertain about the process of retriving data through  the app using kendo UI.

Any help is appreciated..

Thanks,
Swarup
Lee
Top achievements
Rank 1
 answered on 24 May 2012
2 answers
238 views
Hi Guys,

Do you have a deadline for when the Kendo UI Mobile (and Web for that matter) will be available for ASP.NET MVC 3/4 ?

 What license should I buy to support this effort and be sure to receive the builds when they are done?

I'm normally developing business apps with monotouch but the pace of (especially UI) development is to slow. So I would like to employ this principle and make a monotouch native app that really only serves as a UIWebView wrapper for a particular site made with Kendu UI Mobile and ASP.NET MVC. This wrapper will have a list of services that the web app can call, like camera, geo location, contacts, etc. You know all native stuff that web apps traditionally cannot get at.

The best part is that I would not need to resubmit my apps to the appstore to change views, forms or the like.

So. I need Kendo UI Mobile in ASP.NET MVC clothing. When can I have it? :)
TDG
Top achievements
Rank 1
 answered on 24 May 2012
1 answer
186 views
I have a DataSource object that uses a schema model to extract the pertinent info out of an XML document:

var dataSource1 = new kendo.data.DataSource ({
transport: {
    read:
        { cache: false, url: crud, data: { action: 'list' }, error: successCheck },
    update:
        { cache: false, url: crud, data: { action: 'update' }, success: successCheck },
    destroy:
        { cache: false, url: crud, data: { action: 'delete' }, success: successCheck },
    create:
        { cache: false, url: crud, data: { action: 'create' }, success: successCheck }
},
schema: {
        type: 'xml',
        data: '/TABLE/THINGS',
        model: {
            id: "thingid",
            fields: {
                thingid:    { editable:false, field: "id/text()" },
                name:       { editable:true,  field: "name/text()" },
                timestamp:  { editable:false, field: "timestamp/text()"  }
            }
        }
    }
}

The grid is 

$("#thingList").kendoGrid({
    dataSource: dataSource1,
    pageable: true,
    toolbar: [
        {   name:"create", text:"New Thing", id:"add"}],
    columns: [
        {   field: "name", title: "Name", template: "<a class='viewlink' href='viewthing?id=${thingid}'>${name}</a>" },
        {   field: "timestamp", title: "Created", width: "12em" },
        {   command: [ {name:"edit",text:"Rename"}, "destroy"], title:" ", width:"15.5em"} ],
    editable: "inline"
});

When I click on "New Thing" a new empty row does not appear in the table, and the html developer console shows 
Uncaught ReferenceError: timestamp is not defined 


The apparent issue is that kendo.data.xml loads up data records with this statement
record[field] = modelInstance._parse(field, model.fields[field].field(value)); 
In other words, the field property of a models fields is expected to be a function

and when kendoGrid handles "New Thing" it calls addRow which makes a default row via dataSource.insert, which in turn relies on a new instance of the xml reader model, which in turn relies on properly defined defaults.

Unfortunately the Model.define function uses the field property of a models fields as a key for associating with a default value

name = field.field || name;

if (!field.nullable) {
value = proto.defaults[name] = field.defaultValue !== undefined ? field.defaultValue : defaultValues[type.toLowerCase()];
}

In the case of XML, name is an anonymous function because field.field is taking precedence over name.

A guess is that Model.define should contain this: 
name = typeof(field.field)=='string' ? field.field : name; 




Atanas Korchev
Telerik team
 answered on 24 May 2012
1 answer
202 views
I did this job follow the Thread : http://www.kendoui.com/forums/ui/grid/how-can-i-get-the-pure-json-data-of-the-selected-row.aspx
this is my code:
$("#synchronizationStart").click(function(){
var $row = $("#employee").data("kendoGrid").select();
var data = [];
for (var i = 0; i < $row.length; i++) {
data[i] = $("#employee").data("kendoGrid").dataItem($row[0]).toJSON();
alert(data[i]);
}
});
});
but it did't work in my project.
Here is the error in  chrome's console:
  1. Uncaught TypeError: Object #<Object> has no method 'toJSON'
    1. (anonymous function)showStaff:136
    2. f.event.dispatchjquery-1.7.1.min.js:3
    3. f.event.add.h.handle.i

so, what should i do  ?
since my native language is not English, please forgive my grammar errors :)
Liviu
Top achievements
Rank 1
 answered on 24 May 2012
1 answer
93 views
0 answers
92 views
Is it possible to have Kendo AutoComplete within the Editor. I want to give the user a few suggestions whenever "#" is pressed. Please help..
Vishnu
Top achievements
Rank 1
 asked on 24 May 2012
2 answers
1.1K+ views
I'm evaluating the Kendo web controls before buying. Specifically, I need to be able to style the controls to match the controls in Microsoft Dynamics CRM 2011. I'm looking at the grid control, creating a grid from fixed data and generating the grid in place of an empty grid, as per the example code.

I'm trying to work out how I can change the grid styling and I can't seem to get anything to work so I'm after pointers. I need to change things like the background colour of rows, row borders, row height, fonts used, etc. I need to understand how to change the styles independantly for normal rows, selected cells, cells being edited, etc. Can someone give me a starting point?

NB: I'm pretty new to jQuery, being historically a .NET developer using ASP.NET web forms, but at the point of making a switch to using much more HTML / jQuery to meet the new development models in CRM.
Richard
Top achievements
Rank 1
 answered on 24 May 2012
1 answer
124 views
Is there an easy way to clear everything inside of a datagrid? I could loop though each of the rows and call dataGrid.removeRow(aRow) but that seems overly complicated. There must be a simpler way?
vince
Top achievements
Rank 1
 answered on 24 May 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
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?