Telerik Forums
Kendo UI for jQuery Forum
0 answers
149 views
Never mind. For some reason it works now that I'm using the unminified files.
Andrew
Top achievements
Rank 1
 asked on 09 Jul 2012
3 answers
317 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
134 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
623 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="height: 325px; overflow: auto;">
                </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
165 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
111 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
146 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
247 views
Is there any way to do this? Thanks very much!
Dimo
Telerik team
 answered on 09 Jul 2012
1 answer
148 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
711 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
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
Drag and Drop
Application
Map
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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?