Telerik Forums
Kendo UI for jQuery Forum
1 answer
179 views
I am looking for functionality like the Multiselect below: US State Select -> type x = 'No Results found for x'

http://harvesthq.github.io/chosen/ 

I have built a work around providing data from the back end and on select if the id is 'noresults' I set the value of the click to forget about the selection. However I find it hard to believe that there is no option for this as it seems to be a common use case. Is there a better way to handle this than I described as my work around? I am using the MVC Helpers for the majority of this code.

Thanks in advance,

- Josh
Alexander Popov
Telerik team
 answered on 13 Jun 2014
1 answer
175 views
Our application is utilizing the editor's image browser. We found formatting bugs that are also reproducible at the following link.

http://demos.telerik.com/kendo-ui/editor/imagebrowser


Steps to reproduce:
1. Click image icon
2. Resize the modal window lager than the window content area
3. Resize the modal window lager than the window content area

I have also attached screen shots capturing the formatting issues.
The first image is the default view. The next 2 images show the formatting errors.

It would appear the simplest option is to set resizable: false for the modal window. The hyperlink window does not allow for resizing. So it would make sense this modal window would not be resizable either. The other option is to have the image browser content expand and contract with the window.

Dimo
Telerik team
 answered on 13 Jun 2014
2 answers
487 views
Hello,

I am trying to use/define templates based on meta-data. In the example below, I have hard coded a json array (to be replaced with remote data) that is used to populate the template, and other fields as well. While the correct templates are being invoked (identified by the for debug labels added), the date picker and drop list assigned to the data-role attribute are not functioning.

1.  the mock data is bound to a list view, which
2.  uses a template that calls a function
3.  the function calls another template which contains the datepicker.

Thanks in advance for your help.

Regards,

Amit Kohli

<div id="container">
</div>

<script type="text/x-kendo-template" id="textBoxTemplate">
<input type="text" id="txt#=columnName#">
</script>

<script type="text/x-kendo-template" id="dateTemplate">
<input name="#=columnName#" 
                type="text" 
                data-type="date" 
                data-role="datepicker" /><label>for debug - date</label>
</script>

<script type="text/x-kendo-template" id="dropListTemplate">
<input name="dll#=columnName#" id="dll#=columnName#"
        data-value-field="LookupValue"
        data-text-field="LookupName"
        data-source="#:lookupList#"
        data-value-primitive="true"
        data-role="dropdownlist" /><label>for debug - droplist</label>
</script>

<script type="text/x-kendo-template" id="outerTemplate">
    <table>
<tr>
<td>#=columnDisplayName#</td>
<td>
                #= renderEntityTemplate(data) #
            </td>
</tr>
</table>
</script>

<script type="text/javascript">
    //todo - amit k - validations for required, format, etc. ? May one assume all dates are required
    $(document).ready(function () {
        
        var mockData =
            [
                {  columnDisplayName: "Entity Code", columnName: "EntCode", templateType: "textBoxTemplate", lookupList: ""          },
                {  columnDisplayName: "Start Date", columnName: "EqEffBegDate", templateType: "dateTemplate", lookupList: ""        },
                {  columnDisplayName: "Entity Type", columnName: "EntTypeTID", templateType: "dropListTemplate",
                    lookupList: [{ "LookupValue": 1, "LookupName": "One" }, { "LookupValue": 2, "LookupName": "Two" }]
                },
            ];

        $("#container").kendoListView({
            dataSource: mockData,
            template: kendo.template($("#outerTemplate").html())
        });
    });

    function renderEntityTemplate(data) {
        //debugger;
        return kendo.Template.compile($('#' + data.templateType).html())(data);
    }
</script>
Daniel
Telerik team
 answered on 13 Jun 2014
2 answers
217 views
Hello,

I've found this post: http://www.kendoui.com/forums/ui/grid/any-filtering-event.aspx
Is there any other way to receive a filter event or a sort one? Or how to override the logic of sorting/filtering but keeping the styles applied on the grid ?
The reason I need those is the following:
I'm sorting and filtering the data on the server side since it's a server pagination one, but the problem is that I'm not using the DataSource transport method to retrieve it, because it's much more complex. I have lots and lots of configurations that need to be parsed and also data, the data is generic and it's shared among multiple visualization controls and each of them parsing  the data correspondingly etc.

So what I need is to catch some filter/sort event, stop the default behavior, call my get data methods, parse the data and reassign it to the data source, but keeping the sorting/ filtering info in the headers of the grid. With the little trick in the post above I've managed to do it, but I don't like it that much especially that in order to keep the filtering/sorting info in the columns headers of the grid, I need to reapply the sorting and filtering on the data source in the client side which I don't like.

Please let me know your thoughts,
Walid


Simon
Top achievements
Rank 1
 answered on 13 Jun 2014
3 answers
1.1K+ views
I have a template that has a multiselect control on it. I want to be able to hide it or show it dynamically.

  <script id="popup_editor" type="text/x-kendo-template">
<div id="monthlyOptions" >
      <label>Select Days of Month</label>
      <select id="daysOfMonth" name="daysOfMonth"  multiple="multiple" data-placeholder="Select Days"  data-role="multiselect">
          <option>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
          <option>11</option>
          <option>12</option>
          <option>13</option>
          <option>14</option>
          <option>15</option>
          <option>16</option>
          <option>17</option>
          <option>18</option>
          <option>19</option>
          <option>20</option>
          <option>21</option>
          <option>22</option>
          <option>23</option>
          <option>24</option>
          <option>25</option>
          <option>26</option>
          <option>27</option>
          <option>28</option>
          <option>29</option>
          <option>30</option>
          <option>31</option>
      </select>
      <span class="k-invalid-msg" data-for="daysOfMonth"></span>
          </div>      </script>

How would i gain reference to this to call show/hide on it. Im doing something similar on a form and can call $("#daysOfMonth").hide() and it works fine. Doesn't work in the popup editor however. Any clues how to do this?
Kiril Nikolov
Telerik team
 answered on 13 Jun 2014
6 answers
214 views
What is the best way to put a button on the bottom of the screen, ios style?
Kiril Nikolov
Telerik team
 answered on 13 Jun 2014
4 answers
502 views
Hi,

  I am trying to save the modified changes from kendo ui grid, but its not hitting the controller method. Here is my view code,

01.  @(Html.Kendo().Grid<Club.Models.FieldModel>()
02.      .Name("config")
03.      .Columns(columns =>
04.      {
05.          columns.Bound(s => s.Id).Hidden();
06.          columns.Bound(s => s.FieldName).Width(10).Title("Field Name");
07.          columns.Bound(s => s.isVisible).Width(10).Title("Hidden ?");
08.          columns.Bound(s => s.isReadonly).Width(10).Title("Read Only ?");
09.          columns.Bound(s => s.isMultiSelect).Width(10).Title("Single Select ?");
10.          columns.Bound(s => s.isMask).Width(10).Title("Masking ?");
11.          columns.Bound(s => s.MaskLength).Width(10).Title("Mask Length");
12.          /*columns.Command(commands =>
13.          {
14.              commands.Destroy(); // The "destroy" command removes data items
15.          }).Title("Commands").Width(200);*/
16.      })
17.      .ToolBar(toolbar =>
18.      {
19.         // toolbar.Create(); // The "create" command adds new data items
20.          toolbar.Save(); // The "save" command saves the changed data items
21.      })
22.      .Editable(editable => editable.Mode(GridEditMode.InCell)) // Use in-cell editing mode
23.      .DataSource(dataSource =>
24.          dataSource.Ajax()
25.            .Batch(true) // Enable batch updates
26.            .Model(model =>
27.            {
28.                model.Id(s => s.Id);
29.                model.Field(s => s.Id).Editable(false);
30.                model.Field(s => s.FieldName).Editable(false);
31.                model.Field(s => s.MaskLength).DefaultValue(2);
32.               
33.            })
34.           // .Create(create => create.Action("Products_Create", "Home"))
35.            .Read(read => read.Action("GetConfig", "Field",new { moduleId = 1 }))
36.            .Update(update => update.Action("ConfigsUpdate", "Field").Type(HttpVerbs.Post))
37.            //.Update(update => update.Action("ConfigsUpdate", "Field"))
38.            .Destroy(destroy => destroy.Action("Products_Destroy", "Home"))
39.            .PageSize(5)
40.      )
41.      .Pageable(pager => pager.PageSizes(new int[] {5, 10, 20}))
42.      .Filterable()
43.      .Sortable()
44.       
45.)

And my update actionmethod in the controller is,

01.[AcceptVerbs(HttpVerbs.Post)]
02.  public ActionResult ConfigsUpdate([DataSourceRequest]DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<FieldModel> fieldItems)
03.  {
04.      var entities = new List<FieldModel>();
05.      foreach (var item in fieldItems)
06.      {
07.          var entity = new FieldModel
08.          {
09.              Id = item.Id,
10.              FieldName = item.FieldName,
11.              isVisible = item.isVisible,
12.              isMultiSelect = item.isMultiSelect,
13.              isReadonly = item.isReadonly,
14.              isMask = item.isMask,
15.              MaskLength = item.MaskLength
16.          };
17.      }
18.      return Json(entities.ToDataSourceResult(request, ModelState, item => new FieldModel
19.      {
20.          Id = item.Id,
21.          FieldName = item.FieldName,
22.          isVisible = item.isVisible,
23.          isMultiSelect = item.isMultiSelect,
24.          isReadonly = item.isReadonly,
25.          isMask = item.isMask,
26.          MaskLength = item.MaskLength
27.      }));
28.  }

Daniel
Telerik team
 answered on 13 Jun 2014
2 answers
344 views
Hi,

 We have a requirement to collapse/expand TabStrip's currently selected tab using code - lets say on some button click. I already have set collapsible property as true for my Tab.
So is there any method that we can call in this case? I know the feature that clicking on tab header toggles the content - we need API for that so that we can call it from our code.

Thanks a lot,
Abhishek
Bhupendra
Top achievements
Rank 1
 answered on 13 Jun 2014
1 answer
221 views

Hello,

Let me explain my scenario for better understanding:
- my Model contains a list of products. All these products are displayed in GridView
- there is a nested detail template with TabStrip for each product
- one tab/item of this TabStrip contains all ebay auctions of this product in another GridView

ie. something like this http://demos.telerik.com/aspnet-mvc/grid/detailtemplate

My view in razor syntax:

@model List<Site.Models.Products>  // main model
[...]
 
@(Html.Kendo().Grid(Model)  // first grid which lists all products
    [...]
    .ClientDetailTemplateId("Details"// nested template
    [...]
 
<script id="Details">
    @(Html.Kendo().TabStrip()
    [...]
    .Items(items =>
    {
        [...]
        items.Add().Text("Auctions").Content(@<text>
            @(Html.Kendo().Grid(new List<Site.Models.EbayAuctions>())
            .Name("Auctions_for_#=strProductID#"// this variable is from Site.Models.Products
            .Columns(columns =>
            {
                columns.Bound(p => p.strEbayID); // this variable is from Site.Models.EbayAuctions
                [...]
Above example works fine! DataSources are read from Actions in my Controller.

But I don't want to display the strEbayID just like that, I want to display a link to the actual auction on the Ebay website.
The closest I got was this (replacing the above column):
.Columns(columns =>
{
    columns.Bound(p => p.strEbayID).ClientTemplate(
        "<a href=\"http://www.sandbox.ebay.com/itm/\">" + "#=data.strEbayID#" + "</a>"
    )
But unfortunately this doesn't work. To build the String I can use variables from the main model without a problem. But I don't know how I can use values from the nested model, ie. strEbayID here. It's displayed as undefined this way.

I couldn't solve this yet and I am running out of ideas. But I should be pretty close I guess. Can you help me?

With kind regards...

Daniel
Telerik team
 answered on 13 Jun 2014
1 answer
250 views
Hi,

I can select multiple rows in grid using the Ctrl & Mouse down.

Is it possible to select/deselect multiple rows in grid using Shift + up or down keys? if so how can i do that?

Presently, when I trying to do that, it navigates to different tab in my application.

Thanks,
Prashant
Dimiter Madjarov
Telerik team
 answered on 13 Jun 2014
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
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
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?