Telerik Forums
Kendo UI for jQuery Forum
0 answers
58 views
Is there any combination of calls I can use to make a dropdownlist's text+value blank again after the first time it has been selected? The reason being that I am using a data source to change the options available to the list, and I want the user to know that they have to select a new option when the list's contents change. Currently, it keeps the text of the last selection, even if its option is no longer present in the list.

Does anyone have any possible solutions to this problem?
Joshua
Top achievements
Rank 1
 asked on 09 May 2012
6 answers
671 views
Hi,

I have a listview that it's something like this:
<ul id="items" data-bind="source: items"></ul>

and that has selection, is bounded to a observable datasource, so i can add new items etc.
When I select an existent item I would like to bind the item details in adiv outside of the listview.

I'me doing the following in the listview change event:
var data = activitiesSource.view(),
selected = $.map(this.select(), function (item) {
      return data[$(item).index()];
});
viewModel.set("selectedItem", selected);

 The 'selectedItem' is a member of my obersable viewModel. My item details div is something like:
(i've also tried to add a data-source prop to the outside div with 'value: selectedItem' but also doesn't work)
<div class="js-item-details">
<h2 data-bind="text: selectedItem.Title"></h2>
<h3 data-bind="text: selectedItem.Descritpion"></h3>
</div>

In debug I see that the selected Item is correctly setted but when the div shows all fields ara with undefined an no errors.

Am I in the wrong path?
Lee
Top achievements
Rank 1
 answered on 09 May 2012
1 answer
263 views
Is it possible to do this? I have this jsfiddle....http://jsfiddle.net/6yJkM/32/ 

I'm adding an extra column in and I've tried to modify the row template and refresh the grid but I don't see the template being applied. Can anyone see a way of making that work please?

Thanks
Matt
Iliana Dyankova
Telerik team
 answered on 09 May 2012
5 answers
379 views
I have a ListView  that render this template:

<script type="text/x-kendo-tmpl" id="template_token_list">
            <div id="token" class="k-header">
                <h3>${codice}</h3>
                <div id='token_status' class='${colore}'></div>
                <img src="/upload/token/${codice}_small.jpg"><br>
                <button class="k-button info"><span class="k-icon k-warning"></span></button>
                <input style="display:none;" class="comboAction" />
            </div> 
</script>


<script>
...
$("#listView").kendoListView({
        dataSource: dataSource,
        template: kendo.template($("#template_token_list").html())
    });

 $(".comboAction").kendoComboBox({
            dataTextField: "text",
            dataValueField: "value",
            dataSource: items,
            placeholder: "Action..."
        });
...

but, when I call the listView refresh

var listView = $("#listView").data("kendoListView");
listView.refresh();

all the kendoComboBox return to normal input 

Please help me

Rosen
Telerik team
 answered on 09 May 2012
0 answers
109 views
If set the config param
selectable: "row"

for a grid it throws the error
c.ui.Selectable is not a constructor 

(I have included the kendo.web.min.js) Am i supposed to do anything else to make the grid rows selectable?
Vijay
Top achievements
Rank 1
 asked on 09 May 2012
6 answers
331 views
In RAD ASP controls there was a demo for full-browser window layout using Rad Splitter and panels etc. The nice thing about that demo was while resizing the browser, it allowed to automatically resize all panels within it.

We need similar type of feature in Kendo UI - how do we achieve that? For example,  I need such feature using TabStrip so that the Tab Panel resizes according to the browser size and other items like menu and call remain fix size.
Alex Gyoshev
Telerik team
 answered on 09 May 2012
1 answer
181 views
In a TreeView I can add the following:

.bind("drag", function(e) {

        })

Which allows me to access the dropTarget, which is a DomElement. How can I go about both determining if this is a tree node, and getting said tree node?
Alex Gyoshev
Telerik team
 answered on 09 May 2012
0 answers
153 views
$("#productsGrid").kendoGrid({
    dataSource: dataSoucrce,
    columns: columns,
    scrollable: true,
    groupable: true,
    sortable: true,
    pageable: true,
    filterable: true,
    selectable: "multiple,row",
 
    //put query box in toolbar
    toolbar: "<input class='span3' type='text' id='productsQuery'/>",
 
    //init query box's autocomplete
    dataBound: function(){
 if(typeof $("#productsQuery").data("kendoAutoComplete") == "undefined") {
    $("#productsQuery").kendoAutoComplete({
        minLength: 1,
        dataTextField: "key",
        filter: 'contains',
        change: function(){
            if($("#productsQuery").val() == "") {
                $("#productsGrid").data("kendoGrid").dataSource.filter({});
            }
        },
        placeholder: "Search product key...",
 
        //use the datasource of productsGrid
        dataSource: $("#productsGrid").data("kendoGrid").dataSource
    });
}
    }
});

As you see, I put the query box in the toolbar of kendoGrid, and use kendoGrid's datasource for the kendoAutoComplete.
But I found that after I grouped by the kendoGrid, the autoComplete dropdown list became list of "undefined"s.
Chris
Top achievements
Rank 1
 asked on 09 May 2012
0 answers
118 views
Hello,

I have created a couple of real simple Android applications using the webview. This time however I am creating an actual interface and of course my button are defined in xml. I could define them in Java but for now they are in xml. Can I use / apply Kendo themes to Android XML objects? For example:...of course there is no such Style parameter so I made that last line up to show what I was thinking.

TIA
JB

<Button
            android:id="@+id/btn_Next"
            android:layout_width="100dp"
            android:layout_height="40dp"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:layout_marginRight="30dp"
            android:layout_marginBottom="30dp"
            android:text="Next"
            android:onClick="btn_NextClick"
            android:Style="BlueOpal"  />
Ramjet
Top achievements
Rank 1
 asked on 09 May 2012
0 answers
113 views
1. Chrome and IE 9 seem to be fine.
2. Here is the scenario:
   I have a DataSource and a kendoGrid widget setup. Here is part of the code:

   $(document).ready(function () {
        // Monthly Detail data source         var monthlyDetailDataSource = new kendo.data.DataSource({             transport: {                 read: {                     url: '@HttpUtility.JavaScriptStringEncode(Url.Content("~/Home/GetMonthlyDetailData/"))',                     data: {                         asOf: function () {                             return $("#datePicker").val();                         },                         fund: function () {                             try {                                 var dataItem = getSelectedDataItem();                                 var fundCode = dataItem.Fund.split(" ")[0];                                 return fundCode;                             }                             catch (err) {                                 return "";                             }                         }                     }                 }             },             batch: true,             schema: {                 model: {                     fields: {                         MonthStarting: { type: "date" },                         Nav: { type: "number" },                         MonthReturn: { type: "number" },                         Ytd: { type: "number" },                         Ltd: { type: "number" }                     }                 }             },             sort: { field: "MonthStarting", dir: "desc" }         });         // Monthly Detail grid         $("#monthlyDetailGrid").kendoGrid({             height: 300,             scrollable: true,             selectable: true,             sortable: true,             columns: [                 { title: "Month", field: "MonthStarting", template: '#= kendo.toString(MonthStarting, "yyyy-MM (MMM)") #' },                 { title: "NAV", field: "Nav", width: "100px", template: '<span style="float:right">#= kendo.toString(Nav, "n4") #</span>' },                 { title: "Monthly", field: "MonthReturn", width: "100px", template: '<span style="float:right">#= kendo.toString(MonthReturn, "p2") #</span>' },                 { title: "YTD", field: "Ytd", width: "100px", template: '<span style="float:right">#= kendo.toString(Ytd, "p2") #</span>' },                 { title: "LTD", field: "Ltd", width: "100px", template: '<span style="float:right">#= kendo.toString(Ltd, "p2") #</span>' }             ],             dataSource: monthlyDetailDataSource         }).data("kendoGrid"); // more code goes here ...
    });
On document ready I'm hitting my MVC 3 action on the server and returning null instead of "real"
JsonResult. The code of the method:
        public JsonResult GetMonthlyDetailData(string asOf, string fund)         {             if (String.IsNullOrEmpty(fund))             {                 return null;                                                                    // This is an issue                 // return Json(new List<FundReturnHistory>(), JsonRequestBehavior.AllowGet);    // This fixes it             }                              var asOfDate = GetDateOrDefault(asOf);             var data = historyProvider.GetFundReturnHistory(asOfDate, fund).First();             return Json(data, JsonRequestBehavior.AllowGet);         }

 
After that the workflow usually is: the user makes a dropdown selection on the UI, 
and subsequently triggers dataSource.read(), in this case:
 $("#monthlyDetailGrid").data("kendoGrid").dataSource.read();
which will not work if I have returned null in the GetMonthlyDetailData() method. Returning empty Json there fixes the problem. Different browsers have different native support for Json, so returning null would be handled differently... But on top of all that I think the DataSource is being put into an error state which could be a bug, and it might be worth fixing it... ~ Boris
Boris
Top achievements
Rank 1
 asked on 08 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
Dialog
Chat
DateRangePicker
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?