Telerik Forums
Kendo UI for jQuery Forum
1 answer
212 views
Using this demo (http://demos.kendoui.com/web/scheduler/selection.html) it is possible to select a single day or multiple days in row (Month view). Is it possible to select multiple dates which do not follow up? For example: 4 october and 12 october.

Thanks in advance!
Vladimir Iliev
Telerik team
 answered on 02 Oct 2013
5 answers
420 views
HI,

I have the following code :
<select id="mlstProdTypes" multiple data-bind="source: prodTypesList, value: filter.prodTypes"
           data-text-field="name" data-value-field="id" class="prodTypesList"></select>




filter.prodTypes is defined as []. Even though I have specified data-value-field, selectedItem { name: "", id: "" }  added to filter.prodTypes instead of adding only the "id"

Please help how to get back only the selected item's data-value-field instead of the selected item ....

Thanks
Aparna



 

 

 

Alexander Valchev
Telerik team
 answered on 02 Oct 2013
1 answer
205 views
If i create an editor widget and set its value to an img tag with a style attribute, the style attribute gets removed when I view the html for the editor (using the "viewHtml" command tool):

<div id="homeBanner" contenteditable="true" style="height: 160px; overflow: hidden; border: 1px dashed red; padding: 0">
    <img src="~/Content/TemplateImages/homeBanner1.png" style="width: 100%" />
</div>
    var bannerEditor = $("#homeBanner").data("kendoEditor");
    bannerEditor.value("<img alt='' src='/ImageBrowser/Image?path=homeBanner.png' style='width: 100%' />");

Expected edited value: <img alt='' src='/ImageBrowser/Image?path=homeBanner.png' style='width: 100%' />
Actual Result:  <img alt="" src="/ImageBrowser/Image?path=homeBanner.png" width="100" />

style tag is missing and width is missing the '%'.
This does not happen on all tags e.g. <p> does not get modified.
Is there a way to prevent this behavior? I want to set any image added to be 100% width.

Thank you!
Vladimir Iliev
Telerik team
 answered on 02 Oct 2013
1 answer
113 views
Hi,

I am using KendoUI version Q2 2012.
I have added a drpdownlist. I set its SelectedIndex to -1.But when I open a dropdown list it is selecting 0 index by default.
I want to reset selection after every selection.
Following is my code:

@(Html.Kendo().DropDownList()
                                  .Name("BorderWidth")
                                  .HtmlAttributes(new { style = "width: 0px;float:left;" })
                                  .DataTextField("Text")
                                  .DataValueField("Value")
                                  .SelectedIndex(-1)
                                  .Height(150)
                                          .Events(events => events
                                                      .Close("borderWidthChange")
                                                 )
                                  .BindTo(new List<SelectListItem>() {
                                      new SelectListItem() {
                                        Text = "1pt", Value = "1"   
                                      },
                                       new SelectListItem() {
                                        Text = "2pt", Value = "2"   
                                      },
                                       new SelectListItem() {
                                        Text = "3pt", Value = "3"   
                                      },
                                       new SelectListItem() {
                                        Text = "4pt", Value = "4"   
                                      },
                                       new SelectListItem() {
                                        Text = "5pt", Value = "5"   
                                      },
                                       new SelectListItem() {
                                        Text = "6pt", Value = "6"   
                                      }
                                  })
                                
.Template("${ data.Text } " + "<img src=\"" +
Url.Content("~/Content/Images/Line/") + "${data.Text}.png\" />")

                            )

Kindly help.
Petur Subev
Telerik team
 answered on 02 Oct 2013
5 answers
400 views
Hi,

I am trying to specify a value with the menu item when I add it to the menu. When I inspect the menu.dataSource I can see the value I specified during initialization, however I don't see a way to associate the select event's e.item object to the menu.dataSource[N] object that the li was created from.

My goal is to store a value with each menu item that is NOT the text of the menu.

Any guidance is appreciated.

Thanks,

Elan
Kamen Bundev
Telerik team
 answered on 02 Oct 2013
3 answers
348 views
I have two grids on a scrolling div.
<div>
    <table id="grid1">
    ...
    </table>
 
    <table id="grid2">
    ...
    </table>
</div>
 
<script>
  $(document).ready(function() {
    $("#grid1").kendoGrid({
      height: 200,
      scrollable: false
    });
 
    $("#grid2").kendoGrid({
      height: 200,
      scrollable: false
    });
 
  });
</script>
Each div is initialized via tables using the standard grid.KendoGrid({...}) method; however, only one of the grids is styled correctly.
What is missing or otherwise causing the style to fail?  Thanks

I am prototyping this in the following jsFiddle:  http://jsfiddle.net/raltman/wcD28/13/

Dimo
Telerik team
 answered on 02 Oct 2013
3 answers
367 views
I have a grid, approx 500 row in it, using remote data.  The grid is declared in MVC helper, rather than JS, but I don't think that matters in for this issue.

I've added a function which updates some of the values within the grid, that works fine:

//I have already tried using grid.dataSource.data() instead of view(), but it doesn't help)
var dataItems = grid.dataSource.view();
 
for (i = 0; i < dataItems.length; i++) {
var dataItem = dataItems[i];
dataItem.Amount = dataItem.OriginalAmount;
dataItem.IsIncluded = true;
 
dataItem.dirty = true;
}
 
grid.dataSource.fetch();   //This shows the dataSource's changed values in the grid

(I deliberately am not using the dataItem.set() method, because it fires the dataSource.change event repeatedly, which makes the js function bomb out if running on many rows.

So the above function works fine, and updates 500 rows in about half a second, which is acceptable.  

The problem comes when I want to save (sync) the changes.  It takes an age, close to a minute before it even calls the controller action to update (as specified for update in the grid definition).

It does work and save/update, but it needs to be faster.  

Is there a way that doesn't take a minute to hit the controller save/update action?  Or is there a better way of doing this?

Thanks.
Atanas Korchev
Telerik team
 answered on 02 Oct 2013
4 answers
826 views
Hi

I have a TabStrip control on my page but I would like to bind each tab to a separate page as opposed to put all the views in the same page:
<div data-role="footer">
    <div data-role="tabstrip">
        <a href="/Clients" data-icon="contacts">Clients</a>
        <a href="/Home" data-icon="organize">Tickets</a>
        <a href="/Settings" data-icon="settings">Settings</a>
    </div>
</div>
But when I click on the tabs I see strange URL results. For example if I am in <domain>/Clients page and click on Home the URL that is generated will be <domain>/Clients#/Home instead of <domain>/Home.

Could you let me know what I am doing wrong?

Thanks in advance
Ron Farko

Kiril Nikolov
Telerik team
 answered on 02 Oct 2013
2 answers
292 views
I am using Kendo UI Web Grid, not one of the Server Wrappers. I am only displaying a few fields in the grid.
The rest of the fields are displayed in the create or edit popup. For this popup I am using a template:

<script id="popup_editor" type="text/x-kendo-template">
<div class="k-edit-label">
<label for="Title">Title</label>
</div>
<div class="k-edit-field">
<input type="text" class="k-input k-textbox" name="Title" data-bind="value:Title" required>
</div>
</script>

and then I am calling it from the grid:
 editable: {
mode: "popup",
template: $("#popup_editor").html(),
confirmation: "Are you sure?"
}

This works great for input boxes. However I have a foreign key column in my table. I want to display all the options from the foreign key table in a dropdown and select the correct one based on the value in my table. I have searched around quite a bit but haven't been able to find an answer or example to this.

Any help would be greatly appreciated.
Joel
Top achievements
Rank 2
 answered on 01 Oct 2013
1 answer
235 views
I am trying to figure out how to get a date column to sort when the grid was initialized from an html table. I see from the demos that I would have added formatting to the columns, but I don't see how to add the format when initializing from HTML.

Some things to take into consideration in trying to answert this question:

The size of the table, and number of columns, is created dynamically in a JSP using jstl. This means that a row might be date, and it might not be.

The formatting of the date is always "ddMMMyyyy", all upper case.

Here is an example of what the html might look like:
<tr>
    <td><div>01JAN2013</div></td>
</tr>

Notice that it has a div in it, which is used for cell scrolling, should the value not be a date, and have large amounts of text in it.

The jstl for the header of the date might be something like this:

<c:forEach var="column" items="${row}">
<c:choose>
    <c:when test="${column.type eq "date"}" >
        <th <%---Add some kind fo attribute here to tell kendo this is a date?---%>My Date</th>
     </c:when>
     <c:otherwise>
         <%-- Do some other stuff, without date formatting --%>
     </c:otherwise>
 </c:choose>
</c:forEach>

I suppose I could try to build the JavaScript object dynamically, but I really dislike the idea of building JavaScript objects with jstl, and I'm not certain how that might conflict with initializing from html.

I'm working with some legacy data and services, and so I have no choice as to how the data is returned to the JSP. 


Alexander Valchev
Telerik team
 answered on 01 Oct 2013
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
LLM Kit
+? 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?