Telerik Forums
Kendo UI for jQuery Forum
0 answers
172 views
Hello,

I'm evaluating KendoUI for a project. One of the needs is to be able to dynamically update the text of the items in a DropDownList. With traditional HTML / JQuery, I can do the following:

<select id="myOptions">
  <option value="0">Some Text</option>
  <option value="1">Some Other Text</option>
  <option value="2">Third Option Text</option>           
</select>
 
...
 
$("#myOptions option[value='0']").text(getUpdatedText(0));
$("#myOptions option[value='1']").text(getUpdatedText(1));
$("#myOptions option[value='2']").text(getUpdatedText(2));

This works exactly as desired. I've tried something similar in Kendo, however, I haven't had any success. My most recent attempt looks like this:

<select id="myOptions">
  <option value="0">Some Text</option>
  <option value="1">Some Other Text</option>
  <option value="2">Third Option Text</option>          
</select>
  
...
  
$("#myOptions").kendoDropDownList();
$("#myOptions option[value='0']").text(getUpdatedText(0));
$("#myOptions option[value='1']").text(getUpdatedText(1));
$("#myOptions option[value='2']").text(getUpdatedText(2));
$("#myOptions").data("kendoDropDownList").refresh();

Unfortunately, the text of the options never updates. The reason I need to do this is because I need to update the text of the options on a regular interval. Can someone please tell me what I'm doing wrong?

Thank you!
JQuery
Top achievements
Rank 1
 asked on 21 Mar 2012
3 answers
257 views
hi all;
im use grid for remote jsp return json data,for example:
[{title: "Star Wars: A New Hope", year: 1977}, {title: "Star Wars: The Empire Strikes Back", year: 1980}]
grid 
<script type="text/javascript" >
    $(document).ready(function(){
        var sharableDataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url:"contract/test.jsp",
                    dataType: "json"
                }
            }
        });
        $("#grid").kendoGrid({
            dataSource: sharableDataSource,
            columns: [
                { title: "title", field: "title", width: 130},
                { title: "year", field: "year",width: 100},],
            height: 550,
            groupable: false,
            scrollable: true,
            sortable: true,
            pageable: true
        });
    });
</script>
but grid empty,no any,pls help me ,thanks.
Jeremy
Top achievements
Rank 1
 answered on 21 Mar 2012
0 answers
156 views
Hi,

I am trying to find out whether its possible to associate a knockout view-model to chart data. The sample shows how to create chart using local data and remote data. But I couldn't find a way to tie the data of the chart to a view model. Can anyone please help me with this.

Thanks
Guru
Guru
Top achievements
Rank 1
 asked on 21 Mar 2012
0 answers
73 views
Hi,

I've run into a bit of an issue with the Grid on a second refresh of data.

I'm trying to do something a bit different as per the examples, and displaying the Grid through a different dataSource after every search on my site as it matches my coding structure better.

so I have:

Search -> Display grid + assign data source -> search again -> empty grid div (using $('#grid').empty()) -> display grid + assign data source.

This all works completely fine, other than it losing the actual grouping feature, the groupable panel shows but the grouping function no longer works.

Are there any workarounds for this?
Chris
Top achievements
Rank 1
 asked on 21 Mar 2012
1 answer
268 views
Hi telerik team,

     Is it possible to display threshold value line in the bar charts. As my requirements is to show the threshold value as a vertical line on the bar chart, so that the user can easily able to find which are out of limits..?

 
Thanks,
Rajesh
Iliana Dyankova
Telerik team
 answered on 21 Mar 2012
1 answer
79 views
Hi telerik team,

How to show visualized lines  between the data points and the labels for bar graphs.


Thanks,
Rajesh
Iliana Dyankova
Telerik team
 answered on 21 Mar 2012
1 answer
366 views
I have a very odd problem, my editable grid has a date field (ExpiryDate), so there is one in every line (row).
If i edit a row and i change the contents of the datefield, i 'lose' the variable ExpiryDate from my POST vars completely. (if i dont edit the date field, but i edit other fields (text) my code works perfectly.)
According to Firebug, the parameter called ExpiryDate is not even in the Post values (unless of course i didnt trigger the date picker flyout.
Obviously there is something i'm doing wrong. Please could someone take a look.
This happens if i edit inline, popup or incell.
Maybe i should be initializing the datepicker evertime i use it? but where?
Please help?

(i have a php/mysql datasoure and CRUD setup)

      
            $("#grid").kendoGrid({
                dataSource: {
                    transport: {
                        read: "data/users.php",
                        update: {
                            url: "data/users.php",
                            type: "POST"
                        },
                        destroy: {
                            url: "data/users.php",
                            type: "DELETE"
                        },
                        create: {
                            url: "data/users.php",
                            type: "PUT"
                        }
                    },
                    error: function(e) {
                        alert(e.responseText);
                    },
                    schema: {
                        data: "data",
                        model: {
                            id: "ID",
                            fields: {
                                EmailAddress: { validation: { required: true}, type: "string" },
                                FirstName: { validation: { required: true}, type: "string"  },
                                SecondName: { validation: { required: true}, type: "string" },
                                AdvertType: { validation: { required: true}, type: "string"},
                                SubscriptionType: {  validation: { required: true}, type: "string" },
                                ActivationCode: { validation: { required: true}, type: "string" },
                                ExpiryDate: { editable: true, type: "date", parse: function(value) { return kendo.toString(value) } }
                            }
                        }
                    }
                },
                    
                pageable: true,
                height: 400,
                toolbar: ["create"],
                columns: [
                    { field: "EmailAddress", width: "250px" },
                    { field: "FirstName", width: "150px" },
                    { field: "SecondName", width: "150px" },
                    { field: "AdvertType", width: "100px" }, //, editor: advertTypeEditor },                    
                    { field: "SubscriptionType",  width: "100px" },
                    { field: "ActivationCode", width: "150px" },
                    { field: "ExpiryDate", width: "150px", format: "{0:dd-MM-yyyy}" },
                    { command: ["edit", "destroy"], title: " ", width: "200px" }
                ],
                //editable: "popup",
                editable: "incell",
                detailTemplate: kendo.template($("#template").html()),
                detailInit: detailInit,
                        toolbar: ["create", "save", "cancel"],

            });
Vauneen
Top achievements
Rank 1
 answered on 21 Mar 2012
1 answer
240 views
Hi,
I have a grid that uses in-line editing.
i need to add a dropdownlist (with datasource) to one of the columns when it's being edited.

Has anyone done this yet?
Please help me out.
I've tried a few ways.

I thought this would work:

in my column definitions:

                columns: [
                   ...
                    { field: "AdvertType", width: "100px", editor: advertTypeEditor },       

later:
                function advertTypeEditor(container, options) {
                                $('<input name="' + options.field + '" id="Adverttypes" >').appendTo(container);
                            }

and then this:
   
           $(".Adverttypes").kendoDropDownList({
                dataTextField: "Adverttype",
                dataValueField: "ID",
                dataSource: {
                    transport: {
                        read: "data/adverttypesfordropdowns.php"
                    },
                    schema: {
                        data: "data"
                    }
                }

            });

But it's not working.

Please advise me....

Thanks,
Vauneen
Vauneen
Top achievements
Rank 1
 answered on 21 Mar 2012
0 answers
164 views
Hi,

I have a filter in the grid. And that filter is on column of type : date. When i click on the calendar icon the datepicker is displayed. Now when i move to other month on clicking the next or previous arrow, it shows two months. I mean it shows the other month below the current month. but once it has moved to next month, it becomes alright. What is the issue here? Attaching the screen shot. Please help.
Khushali
Top achievements
Rank 1
 asked on 21 Mar 2012
0 answers
149 views
I have a grid inside a jquery UI tab, and I'd like to have a horizontal scrollbar in the Grid.
I don't understand how it should work, it seems nothing change when I set the grid columns width.

see the problem in the picture attached

Thanks in advance
jc mag
Top achievements
Rank 1
 asked on 21 Mar 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
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
Licensing
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
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?