Kendo Grid sorting not working with blank data - kendo-ui

We are using kendo Grid component for one of our reports. Grid column, sub column sorting is working fine when we have proper data but it fails in case of blank data. Please find the screenshot for the same.

Try adding the schema, which sets the type of the column you are sorting. It works that way.

Related

Kendo Grid sometimes renders data sometimes does not

I have a dynamic Kendo grid, for which I get the data every time from the server with the column configuration. The grids renders the data as expected, but sometimes the grid does not render the data at all and only renders the column headers. The grid does not even recognize the column configuration, which mentions whether the column is hidden or not, column title etc.
When I refresh(ctrl+f5) the browser page the grids starts displaying normally.
When I checked the html generated in both cases I saw following difference
1- The Grid which displays correctly
Has a thead and tbody inside a single table
2- The Grid which does not display the data
Has two different divs for header and content
Please see the following image for Good Grid
And following image for Bad Grid
I am not sure why the same grid has two different htmls? Can anyone please help?
EDIT
One more thing that might be helpful.
The kendo grid definition is in a content.html file. And this file is used as a content URL for kendo tabstrip control. There are around 7 tabs and all the tabs are refering to the same content file.

Filter data by clicking data table row in dc.js

I am trying to create a standardized dashboard using dc.js. One question that i require help with is if its possible to filter the visuals based on a selection of the data table rows.
I am thinking of populating a table with unique column values and then using it to view filtered data.
I found a similar question here how to filter data in dcjs/crossfilter on selection of datatable row?
Not sure if there is another way of doing it internally in dc.js and hence the question.
Here is a sample dashboard made using spotfire. Here i can filter the data by selecting unique values from the filters on the right.
Thank you.
You can try the multiple select menu widget which was contributed in this PR:
https://github.com/dc-js/dc.js/pull/771
This will be included in the 2.1 release of dc.js

Detail template with locking feature in kendo grid

I tried using the frozen columns and detail template both at a time but both they are not supported at a time by kendo telerik grid I get this error every time when I try:
'Uncaught Error: Having both detail template and locked columns is not supported'.
Could you please look into this error. Would you give me an idea, how could I achieve both detail template and frozen columns together in kendo.
http://www.telerik.com/forums/grid-column-locking-with-detail-template
Shankar
As conflicting nature it's not possible in kendo ( or either grid . e.g. Excel sheet too )
http://kendoui-feedback.telerik.com/forums/127393-telerik-kendo-ui-feedback/suggestions/6263744-support-row-templates-with-frozen-columns
one probable solution is :
Create two grids side by side. ( left grid for frozen column , right grid for details columns ) you can use same dataSource for both the grid .
Make div size fixed so user cannot scroll on left grid .
hide those repeating columns in Right grid.
add one more extra expand button column in left grid.
on click of expand button of left grid, expand appropriate right side detail row.
i know this is not actual solution with kendo and lots of code work around, but using jquery, tricks you can at least achieve up to certain level.
=> if you have any solution then please share it here sankar. looks like this is old post .

Get original cell data in jqgrid

In my asp.net application, I'm using jqGrid and I am trying to trim the display text of a cell by terminating it with ...
Now, onSelectRow or by click on the message column cell, I want the original long message.
I tried duplicating the same column by giving different index name and kept it hidden. But here I am unable to retrieve cell data by index name.
Any idea here?
Resolved by duplicating message column with different headertext in DataGrid so that name in colModel can be different. Kept this column hidden and retrieving full message from this hidden column.
Any other better solution will be appreciated.

jqgrid save xml string inside hidden cell problem

I have 2 grids. in both of them i use loadonce:true .
In the first grid i have a cell with an onblur event which
opens a dialog with the second grid.
after i edit the second grid i want to save as xml it's content and
ascribe it to the row of the first grid (the row witch opened the dialog).
In the end i want to generate an xml from the first grid that will
include the xml I generated before in the second grid.
so what is the best way to implement this?
Thank's In Advance.
Depend on how exactly you implement the scenario which you describe you could has any data in the internal data parameter of jqGrid existing always if one use local datatype or loadonce:true in your case.
Direct accessing to the data parameter per jQuery("#grid_id").getGridParam('data') get your reference to the data array. The data array contain all data of the grid (not only the current displayed page) and the data are not yet placed in the <td> element. So the data are unmodified and could contain for example any XML fragments.
UPDATED: To make you easier to understand what I mean I made the small demo. If you double-click on a row you will see the XML data associated with the row.
The "note" column can be hidden. Because all hidden columns exist in grid as HTML markup I made it visible. You can see the difference what can be saved as grid internal data and what can be displayed (also as hidden data).
UPDATED 2: You can consider to use autoencode:true option in your grids.

Resources