Telerik Forums
Kendo UI for jQuery Forum
3 answers
286 views
Hello guys,

I have the following grid:

_grid.kendoGrid({
    navigatable: true,
    pageable: true,
    editable: true,
    toolbar: ["create", "save"],
    columns: (_columns.length > 0) ? _columns : null,
    dataSource: {
        data: (_view.data > 0) ? _view.data : null,
        pageSize: 100,
        schema: {
            model: {
                id: "id",
                fields: _spec
            }
        }
    },
});

The columns for the grid, and the fields for the schema's model are generated as follows:

var _filter = null;
var _columns = new Array();
 
var _spec = new Array();
 
for (_field in _view.fields) {
    if (typeof _view.fields[_field] == 'undefined') continue;
 
    var _f = _view.fields[_field];
 
    if (_f.type == 'DropDown') {
        _filter = {
            field: _f.key,
            title: _f.title,
            editor: setEditor(_f)
        };
 
        _spec[_f.key] = _f.key;
    }
    else {
        _filter = {
            field: _f.key,
            title: _f.title
        };
 
        _spec[_f.key] = {
            type: getKendoFieldType(_f),
            //editable: true,
            validation: {
                required: ((_f.required) ? true : false)
                //min: 1
            }
        };
    }
 
    _columns.push(_filter);
}
 
_command = {
    command: 'destroy',
    title: ' ',
    width: 110
};
 
_columns.push(_command);

When I click an item in the grid that's supposed to be a DropDown, it calls the method "setEditor" as per the code above, it looks like this:

setEditor: function (_field) {
    var _context = this;
 
    return function (container, options) {
        $.post('/api/',
        {
            method: 'GET',
            api: context.api + _field.populateapi,
            json: ''
        },
        function (data) {
            if (!_context.valid(data, true)) return;
            var _data = $.parseJSON(data);
 
            $('<input data-bind="value:' + options.field + '" />')
                .appendTo(container)
                .kendoComboBox({
                    autobind: false,
                    dataValueField: 'id',
                    dataTextField: 'datatext',
                    dataSource: _data
                });
        });
    }
},

The grid gets generated just fine. When I click on one of the fields that's supposed to be a drop-down field, it works fine too, the combo-box gets generated. When I selected something for the drop-down, it doesn't dissapear, it also doesn't put the selected text in the field on the grid. I looked at many examples, but I can't figure why this isn't working.

Any help would be appreciated. Thanks for your time!
Jerry T.
Top achievements
Rank 1
 answered on 09 Jul 2012
0 answers
121 views
Hi,
I want set a particular height for sub-menu rendering i.e to specific no of sub-menu items and if number of sub-menu items extends,i want to enable a top-down image which would scroll the menu items top/down.
Also if no menu items exist at bottom or top the respective image should be invisible.
The  Attached Screen shot explains the same.
Kindly reply as soon as possible...plz
Thanks in Advance.....
Dhananjay
Top achievements
Rank 1
 asked on 09 Jul 2012
3 answers
596 views
Hi,

I have Listview with pager. on search change event am binding listview and pager using data source. on first binding listview and pager is working properly but not in successive binding. listview is refreshing in successive binding but pager is not. (its adding one more row (attachment))
below is my code:

HTML:
    <div>
                <input type="search" id="fieldSearch" placeholder="search...">
                <div id="listView" style="height325pxoverflowauto;">
                </div>
                <div class="k-pager-wrap">
                    <div id="pager">
                    </div>
                </div>
    </div>
Jquerry:
$(document).ready(function () {
$("#fieldSearch").live("change", Search);
}
function Search() {
 
 var tSearchText = $("#fieldSearch").val();
 
 var dataSource = new kendo.data.DataSource({
      transport: {
                  read: {
                          url: "http://...." + tSearchText,
                          dataType: "json"
                         }
                  },
                  pageSize: 12
      });
                            
      $("#pager").kendoPager({
               dataSource: dataSource
       });                              
 
       $("#listView").kendoListView({
                                    dataSource: dataSource,
                                    selectable: "single",
                                    dataBound: onDataBound,
                                    change: function (e) { onChange(e) },
                                    template: kendo.template($("#Template").html())
        });
 
       }

    <script type="text/x-kendo-tmpl" id="Template">
                    <div style="height:27px; cursor: pointer;">
                          <span>${Name}</span>                     
                    </div>
    </script>

Doug
Top achievements
Rank 1
 answered on 09 Jul 2012
1 answer
139 views

I am completely new to KendoUI and am trying to understand the grid aggregates example. I have looked at the example code. Although the example code is very helpful, it doesn't always clarify what one can and cannot do with aggregated data in a grid.


Suppose I have data with fields a,b,c,d,e,f.   I want to group the data on field a, but display in the groupheadertemplate only fields b & c and an aggregate based on field d . In the main grid, I want to display d, e, & f in columns, but nothing else.  Is this feasible with the current kendo grid?  (I assume that templates might be required to achieve this)

Iliana Dyankova
Telerik team
 answered on 09 Jul 2012
0 answers
99 views
I'm forcing the IOS theme with my app. And I really want to use Blackberry form style in listview.
How can I do that? Or how can I restore the original look of form elements, especially the <select> 

Thanks.
Fanzy
Top achievements
Rank 1
 asked on 09 Jul 2012
1 answer
125 views
I have a scenario where i need my calendar to be full screen. Currently there are only 2 letters that represent the day of the week. Is there a nice way to change these to be representative of the full name?
Dimo
Telerik team
 answered on 09 Jul 2012
3 answers
220 views
Is there any way to do this? Thanks very much!
Dimo
Telerik team
 answered on 09 Jul 2012
1 answer
133 views
I have a database table where the primary key is a combination of several fields:

Field1, Field2, Field3

If it was just one field (Field1) I could use 

.DataSource(dataSource => dataSource
,Server()
.Model(model => model.Id(p => p.Field1))
)

but how do I set the datakeys/model id when there are several fields?

(If I set the grid to be .Selectable and if I don't set the model id, I get an error message saying that the DataKeys aren't set.)

Thanks.
Petur Subev
Telerik team
 answered on 09 Jul 2012
3 answers
667 views
We are using a DataSource for a search result. When there are rows returned, we display a template in a ListView. When there is no data returned from the search we'd like to indicate 'No records to display' similar to the RadGrid setting.

What is the best way to do this? We can return 'No records to display' in the json response but it will not fit well into our template.
Robert
Top achievements
Rank 1
 answered on 09 Jul 2012
1 answer
94 views
I see documentation and example of hash navigation and views in Kendo UI Mobile but not for Web version. Are they available for the web version? Does mobile documentation apply to the web version as well or is it something entirely different? Thanks in advance.
Iliana Dyankova
Telerik team
 answered on 09 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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
ContextMenu
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
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?