Telerik Forums
Kendo UI for jQuery Forum
0 answers
130 views
I am trying to entirely format a grid based on static HTML (i.e. no data binding). 

I have found it hard to find info on how to handle this scenario elegantly and how to properly set configuration attributes.

1 - One particular issue I have been struggling with is that I want to enable filtering on the grid, including for a date column, but do not want Kendo to touch the date format in the cells (or at least be able to control it).

So far I have been able to go to the <th> tag and add a data-type="date" attribute, which causes the filtering to behave properly, but have not been able to set the "format" of the data.  I was hoping that "data-format" on the th tag would work but did not. 

Due to the use case involved, I cannot roll this into defining the schema of the columns in JS/JSON, it needs to have the formatting defined within the HTML itself (i.e. data-format)

2 - I am also having to add dummy data-field attributes to every th to get them to sort and filter...I don't feel I should need to do this since the data rows are already there (perhaps if no data-field attr is specified there should be "dummy" values automatically?  that's all I'm doing)

3 - When trying to define paging, there is a gap left between the last row of a page and the footer paging bar.  Basically, it appears that the height of the grid without paging is applied (with all rows visible), and then it adds the paging in but does not shrink the grid to fit...


any help?
Paul
Top achievements
Rank 1
 asked on 10 Jul 2012
0 answers
153 views
Hello,

All the samples on MVVM show that, we fetch a datasource assign it to select list. The selected object in select list is then bound to view model.

e.g. in viewmodel we initailly set selectedProduct = null
the controls are then bound as 
<label>UnitPrice</label> <input type="text" data-role="numerictextbox" data-bind="value: selectedProduct.UnitPrice, events: { change: change }" />

Note the value field, it is bound to selectedProduct

Now, i dont have a dropdown on my form, i want to fetch data from server on readrequest and directly bind that to all controls.
So my transport has read method but i dont have a selectedProduct. I want to assign values from read transport directly to controls.

Is there a way to do this?

Please let me know if this is not clear, i'll attach code blocks.

Thanks,
Sushant
Sushant
Top achievements
Rank 1
 asked on 10 Jul 2012
0 answers
201 views
I just wanted to share an elegant solution I found for passing the group value to a button that handles picking the entire group:

"Group: #= value #, Count: #= count # <div data-val='#= value #' class='button black' onclick='GridPickGroup(this)'>Select Group</div>";

function GridPickGroup(button) {
    var value = $(button).data("val");
    var currentGroupRow = $(button).closest(".k-grouping-row");
    GridData.grid.select(currentGroupRow.nextUntil(".k-grouping-row"));
}
Dr.YSG
Top achievements
Rank 2
 asked on 10 Jul 2012
0 answers
108 views
Hi all,
I find out that Kendo mobile element behavior looks like jquery mobile in case of using data-attributes,
So my question is - does kendo mobile support all the attributes listed here http://jquerymobile.com/test/docs/api/data-attributes.html ,
or is there a place where we can see all the supported attributes ?, (like for this data-role there are this, this , this .....  attributes )

I hope with tomorrow's release we'll got much better support for kendo mobile documentation like it is for kendo MVC widgets.

Thanks in advance.
Harut
Top achievements
Rank 1
 asked on 10 Jul 2012
1 answer
378 views
Hi,

Consider the jsfiddle: 

http://jsfiddle.net/brCCY/1/ 

For the span tag what I'd like to be able to do is 'set' the html (ala innerHTML) of this element using 'Body' however the example I've given fails silently.

I've trawled through http://www.kendoui.com/documentation/framework/templates/overview.aspx and I probably got the inspiration for the possibility from: 
http://www.kendoui.com/blogs/teamblog/posts/12-03-20/mvvm_declarative_initialization_and_html5_data_attributes.aspx 
In my case (where I am using MVVM on top of the template) - I have had no issues binding other things like attr, events etc.

Any thoughts?

Thanks,

Mark.
Mark
Top achievements
Rank 1
 answered on 10 Jul 2012
14 answers
3.9K+ views
Hi,
We downloaded your last build 'kendoui.web.2012.1.322.commercial'. But we couldn't find the 'kendo.all.min.js' in the JS directory. Any chance of getting the all minified of the latest JS?

Thanks.
Sebastian
Telerik team
 answered on 10 Jul 2012
0 answers
95 views
I have a KendoUI Grid Embedded in a Tabstrip like so:

...
<
div id="tabstrip">
<ul>
<li class="k-state-active">Tab 1 Title</li>
<li>Tab 2 Title</li>
</ul>
<!--Tab1-->
<div>
<div id="grid"></div>
</div>
<!--Tab2-->
<div>
<div id="Tab2">
Config 1: <input type="text" name="config1" />
Config 2: <input type="text" name="config2" />
<input type="checkbox" name="config3" value="Config A" /> Config A
<input type="checkbox" name="config3" value="Config B" /> Config B
</div>         
</div>                 
</div>
...

When I use the following libraries, the grid will populate, but the filters will be blank:
    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.dataviz.min.js"></script>
    <script src="../../../js/kendo.core.min.js"></script>
    <script src="../../../js/kendo.all.min.js"></script>
    <script src="../../content/shared/js/console.js"></script>


When I use these libraries, the grid will not populate, but the filters will work:
    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.web.min.js"></script>  
    <script src="../../../js/kendo.dataviz.min.js"></script>
    <script src="../../../js/kendo.core.min.js"></script>

    <script src="../../content/shared/js/console.js"></script>


Any ideas?
Thomas
Top achievements
Rank 1
 asked on 10 Jul 2012
1 answer
146 views
I am trying to get the dropdownlist to auto size to the contents after an ajax load.   In the dataBound event I have the following code:

if( isDefined( this.options.width )) {
    if( this.options.width === "auto" ) {
     var popup = this.control.popup.element;
     var width = popup.css("visibility","hidden").show().outerWidth();
     popup.hide().css("visibility","visible");
    } else {
     width = this.options.width;
    }
    this.control.wrapper.closest(".k-widget").width(width);
}

It seems to operate to some degree, but the problem is the outerWidth is not calculated properly and I am still getting wrapping on the items in the dropdown list.   

Is this an issue with the calculation or am I doing this too soon (i.e. while it is still loading)?  

Is there a better way?
Is there a different event I should use?  (using this method in the change event does not work at all)

Petur Subev
Telerik team
 answered on 10 Jul 2012
2 answers
317 views
I was so exciting about giving this framework a go and can't believe I am posting in the forum unable to get the basic usage Grid working.
 
$(function(){<br>        $("#grid").kendoGrid();<br>    });

Hope someone can help....
Jerry T.
Top achievements
Rank 1
 answered on 10 Jul 2012
1 answer
7.2K+ views
I'm trying to loop through the dataitems held by my grid but get an error that the field I am  trying to look at in every data item is undefined. This is the code I'm using:

grid = $("#grid").data("kendoGrid");
 
for (var i = 0; i < 50; i ++) {
    if ( grid.dataItem(i).FirstName == reference) {
        var item = grid.dataItem(i);
        break;
    }
}

What I'm trying to do is get the data item whose FirstName field matches the reference variable. Does anyone have any ideas?
Jerry T.
Top achievements
Rank 1
 answered on 10 Jul 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?