Telerik Forums
Kendo UI for jQuery Forum
1 answer
144 views
I have a server delivering a data query in XML format. When the query fails or is ill-formed the server returns a 200 OK response that is a error message in the guise of an HTML page.  

In IE the parse of the response fails, and in Chrome it does not.

The data.xml.js parse: method uses jQuery (I am using 1.7.1) $.parseXML which in turn uses
  • window.DOMParser, or 
  • ActiveXObject( "Microsoft.XMLDOM" )
The HTML is parsed fine by window.DOMParser because the HTML is valid and valid HTML parses as XML.
The Microsoft.XMLDOM parser does not like the HTML and its .LoadXML() returns a null.

So the question is should data.xml.js handle the HTML ? I would suggest no, or at least make it controllable through an option since some future task may require using data found in some xpath of an HTML response.

To fail the HTML response I made this adjustment in kendo.data.xml.js parse: 
    documentElement = xml.documentElement || $.parseXML(xml).documentElement;

changed to 
  documentElement
    =   xml.documentElement
    || ( xml.substr(0,5)==
'<?xml' 
       ? $.parseXML(xml).documentElement
       : jQuery.error(
"Invalid XML: " + xml )
       )
    ;

A schema: property could be used to control the strictness of parsing.

schema: { type: 'xml', strict: true, ... }  // strict (default) requires <?xml lead-in, false allows for any lead-in
schema: { type: 'xml', leadin: '<?DOCTYPE HTML', ... }  // string (or array of string) for specifying allowed lead-ins

Happy coding,
Richard
Atanas Korchev
Telerik team
 answered on 11 Jun 2012
1 answer
97 views

I think I have found a typo in your code, which leads to the problems with animation.

extend(kendo.fx, {

...

animate: function(elements, properties, options) {

element.animate(multiple, extend({ queue: false, show: false, hide: false, duration: options.duration, complete: options.complete })); 

...

The extend(...) call works as if it's called with window.extend(...), which extend window object with some properties.

I'm not sure that it's what you have expected to do.

Please confirm.

Kamen Bundev
Telerik team
 answered on 11 Jun 2012
0 answers
70 views
Hi,
Is it possible to show "series" values after the bar graphs, or on top of the bar graphs? So not only on the valueAxis.

Thanks 

callaway golf 


Rose
Top achievements
Rank 1
 asked on 11 Jun 2012
0 answers
103 views
Hello,

I did remove all the content this thread.
I did read the posting HTML Content instead of images Started by Josh Lipford

But at first I was not aware that a second problem was discussed there of having 1 more page than defined.

So it works now for my solution.

Greetings Johan Borchers
Johan
Top achievements
Rank 1
 asked on 10 Jun 2012
0 answers
48 views
Dear All,
If I have implement getting data from database and bind that into grid in web application using kendo ui..same procedure and same code can use to mobile application to bind a grid?

thanks, 
Susi
Top achievements
Rank 1
 asked on 10 Jun 2012
0 answers
69 views
Dear All,
If I have implement getting data from database and bind that into grid in web application using kendo ui..same procedure and same code can use to mobile application to bind a grid?

thanks,
Susi
Top achievements
Rank 1
 asked on 10 Jun 2012
1 answer
85 views
Hello,

i'd like using data-binding attribute into a template but the data object that's bound to an html tag is not correctly associated.

for exemple:
Simple binding: http://jsfiddle.net/rKQDM/7/
More complex (expressions & events): http://jsfiddle.net/rKQDM/5/

What's wrong?

Thanks in advance.

Vladimir
Top achievements
Rank 1
 answered on 10 Jun 2012
0 answers
90 views
When looking through the code, I don't see a manager class for DataSource instances (or a simple master list), which I need to add KednoUI support to Illuminations for Developers[1]. I can add a patcher that alters the KendoUI source as it's loaded on every site that uses it (I do this for YUI3), but I'd rather not do that as it can be dangerous.

I have the same issue with widgets, but I can use the somewhat slow method of searching through all of jQuery's internal 'data' structures to find KendoUI widgets that are rendered to the page.

Any suggestion on how to get all the instantiated DataSource instances on a given web page?

[1] http://www.illuminations-for-developers.com/
Steven
Top achievements
Rank 1
 asked on 10 Jun 2012
0 answers
107 views
When a grid does not have a rowTemplate specified the kendoGrid configuration the component will build an implicit default template.

I have a situation where the grid is displaying columns A,B,C,D from a data source having A,B,C,D,X,Y,Z and I need to twiddling an entire row when some condition exists amongst X, Y and Z.

The real problem is more involved in this manner and involves a Database view V on the server and XML data responses.
  1. dataSource1 fetches column names from metadata of V
  2. dataSource2 fetches data from V
  3. grid displays some columns of dataSource2 (A,B,C,D) and needs to set css of row based on X,Y,Z
dataSource1.
  • each column name is used to setup the filelds: property of dataSource2 schema:model
    fields[this.name] = this.name+'/text()';
dataSource2.
  • every column in V will be available
grid
  • the actual columns displayed can be controlled by the user by typing in a list of regex's such as
    ^store ^city ^state ^zip mgr
    A routine guess() will take the input and find matching column names (case-insensitve).  This makes using a static template difficult.
The grid setup is thus:
$("#stores").kendoGrid({
    dataSource: dataSource,
    autoBind: false,
    selectable: "multiple",
    groupable: true,
    resizable: true,
    reorderable: true,
    columns: guess('^store ^city ^state ^zip'),
    dataBound: function (e) {
        $(e.sender.wrapper).find('[data-row-is-special=true]').addClass('my-row-is-special');
    }
});

The only piece remaining is how do I set data element 'row-is-special' when I am not using a custom template.  

The solution I chose was to tweak grid in the following manner:
  • Add a new property named "onCloseImplicitRowTag" to the templateSettings: property of the grid configuration
  • and use it my grid configuration:
  • templateSettings: { onCloseImplicitRowTag: '# if (X && X != Z && Y && Y > 0) {# data-row-is-special="true" #}#' }
If everything is functioning properly the grids implicit <TR will get a data-row-is-special=true and databound will convert that info into a class setting that has the desired display attributes (bold, italic, white on red)

The kendo.grid.js _tmpl: was modified as follows:

In the "if (!rowTemplate)" section just prior to 
rowTemplate += ">";<br>
this was added
var option = settings.onCloseImplicitRowTag;
if (option) {
    type = typeof option;
    if (type === STRING) {
        rowTemplate += ' ' + option;
    }
}

Hope this is helpful and the concept gets rolled into a future version

Regards,
Richard
Richard
Top achievements
Rank 1
 asked on 10 Jun 2012
2 answers
89 views
I have some XML data that is constructed differently when the server detects a missing value
   <STORES>
...
      <CITY>Chattanooga</CITY>
...
   </STORES>
   <STORES>
...
      <CITY missing=" " />
...
   </STORES>

In the first and normal case my schema model defintion works fine
model: {
    fields: {
...
    ,   city:  "CITY/text()"
...
    }
}

In the second case when the server sends missing=" ", the grid shows [object Object]  instead of a null or blank value.

Is there a single specifier I can use for city: so that I get either #text or @missing ?

Thanks,
Richard
Richard
Top achievements
Rank 1
 answered on 10 Jun 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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
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?