Telerik Forums
Kendo UI for jQuery Forum
4 answers
252 views
I'm trying to get a custom editor (DropDownList) to work, but am not having any luck. I have the following setup:

Grid:
DataSource: a remote GET request that works fine
In the grid's datasource, I have a field called ProjectId that is set to editable and of type "number"

The grid displays all of the data just fine. When I click on a cell to switch it into edit mode, I'm showing a drop down that remotely gets a list of projects to display, based on the value of the ClientId field for that row. The code is below:

var projectsDataSource = new kendo.data.DataSource({
  transport: {
    read: {
      url: "/ProjectsDataUrl";
      dataType: "json"
    }
  }
})
 
function projectsEditor(container, options) {
  if (options.model.ClientId !== null) {
    projectsDataSource.transport.options.read.data = {
      clientId: options.model.ClientId
    };
     projectsDataSource.read();
    return ($("<input name='ProjectId' data-bind='value:" + options.field + "' />")).appendTo(container).kendoDropDownList({
      dataSource: projectsDataSource,
      autoBind: false,
      dataTextField: "Name",
      dataValueField: "Id",
      optionLabel: "Select Project"
    }).data("kendoDropDownList");
  }
};

I'm only showing the editor if the ClientId field is not null. The drop down list displays fine, but after making my selection and clicking away, the underlying data does not get updated. I'm really not sure what I'm doing wrong here.
Jaben
Top achievements
Rank 1
 answered on 30 May 2012
0 answers
94 views
I noticed that some Telerik Q2 Webinars were coming up on new features etc of several of the product lines including the web AJAX/MVC packages....but doesn't look like there's anything for Kendo UI.  Is there a plan for a Q2 webinar for Kendo?

Thanks,
Eric
Eric
Top achievements
Rank 1
 asked on 30 May 2012
1 answer
120 views
I am trying to reverse the valuesAxis from 0 to 40 upside down but it doesn't work
This is my js source:

valueAxis: {
            reverse: true,
            max:40,
            min:0,          
            labels: {
                format: "{0}"
            }
        }

Iliana Dyankova
Telerik team
 answered on 30 May 2012
3 answers
209 views
I have a view model with an array in it and don't seem to be able to use third party libraries such as Sugar to extend the functionality of the arrays. I've set up an example at http://jsfiddle.net/BrianVallelunga/rmgak/ 

It seems as though Kendo transforms the view model's fields into something completely different. Is there any way to still utilize libraries like Sugar in this situation?

If not, what type are the arrays transformed into, and what methods are available on them?

Thanks
Atanas Korchev
Telerik team
 answered on 30 May 2012
1 answer
94 views
I'm trying to figure out how to have a template in a Kendo grid display the meridiem. I have the following column:

{ title: 'Start Date', field: 'startDate', template: "#= kendo.toString(convertToLocalTime(startDate), 'MMMM dd yyyy, h:mm a') #" },

But it ends up displaying 'May 1 2012, 6:00 a' instead of AM or PM. What do I need to use in the format to display this? Is there a doc anywhere showing the formats?
Kyle
Top achievements
Rank 1
 answered on 30 May 2012
0 answers
97 views
Hi,

Is there any possibility to have list view within another list view with edit functionality for each list view.

Thanks and regards,
Durga Bhavani Gubbala.
durga bhavani
Top achievements
Rank 1
 asked on 30 May 2012
1 answer
160 views
I'm trying to use my own CSS class to style an element in a grid cell, but Kendo's styles are overriding my class and not allowing my style. How do I use my own style in a grid cell?
Iliana Dyankova
Telerik team
 answered on 30 May 2012
0 answers
87 views
Hi,

I want to use CRUD features, but only predefined set of values are allowed for one field.

<div id="grid"></div>
            
            <script>
                $(document).ready(function () {
                    var crudServiceBaseUrl = "<?= base_url().'/index.php/'.$action?>";
                        var dataSource = new kendo.data.DataSource({
                            transport: {
                                read:  {
                                    url: crudServiceBaseUrl + "<?= '/read/'.$table_name?>",
                                    dataType: "json"
                                },
                                update: {
                                    url: crudServiceBaseUrl +  "<?= '/update/'.$table_name?>",
                                    type: "POST" ,
                                    dataType: "json"
                                },
                                destroy: {
                                    url: crudServiceBaseUrl + "<?= '/destroy/'.$table_name?>",
                                    type: "POST" ,
                                    dataType: "json"
                                },
                                create: {
                                    url: crudServiceBaseUrl +  "<?= '/create/'.$table_name?>",
                                    type: "POST" ,
                                    dataType: "json"
                                },
                                parameterMap: function(options, operation) {
                                    if (operation !== "read" && options.models) {
                                        return {models: kendo.stringify(options.models)};
                                    }
                                }
                            },
                            pageSize: 30,
                            schema: {
                                model: {
                                    id: "item_name",
                                    fields: {
                                        item_name: { validation: { required: true } },
                                        item_type: {  validation: { required: true, min: 1} },
                                        item_calories: {  type: "number", validation: { required: true, min: 1} },
                                        item_ingredients: { },
                                        item_category: {validation: { required: true } } ,
                                        dish_type: {validation: { required: true } }
                                    }
                                }
                            }
                        });

here dish_type can only contain VEG or NON VEG:

 var categoryDataSource = new kendo.data.DataSource({
                    data: [ {
                               item_type: "Veg"
                           },
                           {
                            item_type: "Non Veg"
                           }
                          ]
                    });                    
                    
                    function categoryDropDownEditor(container, options) {
                        $('<input data-text-field="item_type" data-value-field="item_type" data-bind="value:' + options.field + '"/>')                        .appendTo(container)
                            .kendoDropDownList({
                                autoBind: false,
                                dataSource: categoryDataSource
                            });
                    }
                    
                    $("#grid").kendoGrid({
                        dataSource: dataSource,
                        pageable: true,
                        height: 400,
                        toolbar: ["create"],
                        columns: [
                            { field:"item_name", title: "Product Name" },
                            { field: "dish_type", editor:categoryDropDownEditor },
                            { field: "item_type", title:"Type", format: "{0:c}", width: "150px"  },
                            { field: "item_calories", title:"Calories", width: "150px" },
                            { field: "item_ingredients", width: "300px" },
                            { field: "item_category", width: "150px" },                           
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "210px" }],
                        editable: "popup"
                    });


BUG: while editing, value selected in drop down is not reflected, whereas object is getting bound.. Kindly help. 
Is it not recommended to use GRID for CRUD with predefined value for a field ?
Srinivas
Top achievements
Rank 1
 asked on 30 May 2012
2 answers
174 views
Hi 
I have created a simple textinput widget with a button. When the button is clicked a window (with a combobox is created). The combobox is initialized correctly. However, when I declare a second textinput widget, the combobox does not initialize. 

I've searched around the forums but can't find any answers. I have created a simple test app to demonstrate the problem.

Any help would be appreciated.

Kashim
Neo Wong
Top achievements
Rank 1
 answered on 30 May 2012
4 answers
423 views
I have a grid that uses virtual scrolling. It ends up with about 250 rows. Once all of the data is loaded into the grid and I try to grab the scroll handle and drag it back to the top, it does not work.  I can click the scroll arrows or within the scroll bar and it scrolls fine, but I can't drag the scroll handle to the top or anywhere for that matter to get it to scroll.

Also, only the editors towards the top of the grid appear. If I click in an editable field after scrolling down, the editor does not appear.

I've created a jsFiddle that demonstrates the issue with editing in conjunction with the virtual scrolling here: http://jsfiddle.net/yGSHr/ 

However, I can't reproduce the scroll bar issues in this particular example.
Alexander Valchev
Telerik team
 answered on 30 May 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?