Telerik Forums
Kendo UI for jQuery Forum
7 answers
286 views
Hi

I have added a table into the tabstrip.  the table aligns nicely in Forefox and Chrome, however in Internet Explorer the table width goes out of the tabstrip boundary and off the screen.

Is there a way to get IE to realign the table.  This happens across all versions of IE. I have attached the HTMl part of the code below

      tabstrip.Add().Text("Dispensary")
                  .Content(@<text>
            <table>
                <tr>
                <th></th>
                 <th>S</th>
                     <th>S</th>
                    <th>A</th>
                    <th>Prism</th>
                     <th>Add</th>
                      <th>Lens</th>
                    <th>OC</th>
                     <th>Height Above Lower Tangent</th>
                    </tr>
                <tr>
                    <th>R</th>
                <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseSRight)
                @Html.ValidationMessageFor(model => model.DispenseSRight)
            </div>
                    </td>
                                    <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseCRight)
                @Html.ValidationMessageFor(model => model.DispenseCRight)
            </div>
                                        </td>
                                                                            <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseARight)
                @Html.ValidationMessageFor(model => model.DispenseARight)
            </div>
                    </td>
                                                                                           <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispensePrismRight)
                @Html.ValidationMessageFor(model => model.DispensePrismRight)
            </div>
                    </td>
                                                                                                               <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseAddRight)
                @Html.ValidationMessageFor(model => model.DispenseAddRight)
            </div>
                    </td>
                               <td>                                                                                         

           
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseLensRight)
                @Html.ValidationMessageFor(model => model.DispenseLensRight)
            </div>
                    </td>
                                                                    <td>                                                    

                                                <td>
                  <div class="editor-field"> 
                @Html.EditorFor(model => model.DispenseOCRight)
                @Html.ValidationMessageFor(model => model.DispenseOCRight)
            </div>
                    </td>
                                                   <td>                                                                     

                               <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseHeightAboveRight)
                @Html.ValidationMessageFor(model => model.DispenseHeightAboveRight)
            </div>
                    </td>
                    </tr>
                <tr>
                    <th>L</th>
                                                                       <td>                                                 

                                                   <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseSLeft)
                @Html.ValidationMessageFor(model => model.DispenseSLeft)
            </div>
                    </td>
                                                                                           <td>                             

                                                                       <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseCLeft)
                @Html.ValidationMessageFor(model => model.DispenseCLeft)
            </div>
                    </td>
                                                                                                               <td>         

                                                                                           <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseALeft)
                @Html.ValidationMessageFor(model => model.DispenseALeft)
            </div>
                    </td>
                                                                                                                            

       <td>                                                                                                    <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispensePrismLeft)
                @Html.ValidationMessageFor(model => model.DispensePrismLeft)
            </div>
                    </td>
                           <td>                                                                                             

       <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseAddLeft)
                @Html.ValidationMessageFor(model => model.DispenseAddLeft)
            </div>
                    </td>
                                               <td>                                                                         

                           <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseLensLeft)
                @Html.ValidationMessageFor(model => model.DispenseLensLeft)
            </div>
                    </td>
                                                                   <td>                                                     

                                               <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseOCLeft)
                @Html.ValidationMessageFor(model => model.DispenseOCLeft)
            </div>
                    </td>
                                                                                       <td>                                 

                                                                   <td>
                  <div class="editor-field">
                @Html.EditorFor(model => model.DispenseHeightAboveLeft)
                @Html.ValidationMessageFor(model => model.DispenseHeightAboveLeft)
            </div>
                    </td>
                </tr>
                  </table>
            </text>);
Dimo
Telerik team
 answered on 20 May 2015
3 answers
99 views

http://demos.telerik.com/kendo-ui/autocomplete/angular

You can see the issue in the demo page.  If you inspect the autocomplete element on initial page load without doing anything else, and then type into the autocomplete field, you will see that the input's state switches between ng-dirty and ng-pristine.  if you select outside of the input field and then back into the field, it's dirty state works as expected.  

 

This is messing with our angular validation messages where we only want to show a message when the input is dirty.

Jonathan
Top achievements
Rank 1
 answered on 19 May 2015
1 answer
207 views

I have the following:

<div class="demo-section" >
    @(Html.Kendo().ListView(Model)
    .Name("listView")
    .TagName("div")
    .ClientTemplateId("template")
    .Pageable()
    .Selectable(selectable => selectable.Mode(ListViewSelectionMode.Single))
    .Events(events => events.Change("onChange").DataBound("onDataBound"))
    )
</div>

and I need a way to do the filtering on the client side just like the filtering in MobileListView. How can I do that?

Petyo
Telerik team
 answered on 19 May 2015
2 answers
485 views

I'm using the MVC wrappers and one of my grids is for adding/editing/deleting comments. The model contains CommentId, UserName, Comment, TimeStamp. I want to show all but the CommentId in the grid. When I add or edit a row, the popup should only contain a textarea for Comment.  How can I achieve this using the MVC wrappers?

Thanks,

--John

Boyan Dimitrov
Telerik team
 answered on 19 May 2015
3 answers
457 views

I have a MultiSelect which is also sortable (so the selected items can be reordered): 

el.kendoMultiSelect({
    dataSource: settings.dataSource,
    dataTextField: settings.dataTextField,
    dataValueField: settings.dataValueField,
    autoClose: false,
    animation: false
});
 
var multiSelectData = el.data("kendoMultiSelect");
 
multiSelectData.tagList.kendoSortable({
    hint: function (element) {
        return element.clone().addClass("hint");
    },
    placeholder: function (element) {
        return element.clone().addClass("placeholder").text(settings.dropText);
    },
});

When I get the values -  multiSelectData.value() - they're in order which they were added, instead of the order that they've been arranged in to.

Is there a way I can have the MultiSelect update the values when an item is reordered, without delving into the 'private' properties of the MultiSelect?

 

Thanks in advance,
Dave

 

Dave
Top achievements
Rank 1
 answered on 19 May 2015
1 answer
444 views

Hello,

I am trying to format a cell in a grid differently based another cell in the row's value (i.e. format a currency cell with its proper currency symbol from another column, with multiple different currencies in the same grid).

The column that must be formatted is in a grid that is part of a client detail template for another grid. The way I have worked out to accomplish the formatting in a top level grid is a client template on the column that calls a Javascript function. I pass the implicitly defined "data" object in the client template to the function to access the row data.

...ClientTemplate("#= formatCurrency(data) #")

The problem is that, for a child grid in a client detail template, the data that I receive in the function is not the row of the child grid, but the row of the parent grid.

I have attached models, views, and controllers demonstrating the issue. I am using C# MVC and the Razor view engine, but if this is not possible with razor, I could switch to HTML5/Javascript.

Thanks for any help you can provide.

Daniel
Telerik team
 answered on 19 May 2015
1 answer
435 views

Hi, I’m encountering a problem with a logic I need to implement using the Listview.
This is the scenario:

I first load a batch of data from a REST service, with the data I recover I create a DataSource.

After having the DataSource I create a ListView from that.

Since I can recover only a batch of data at a time from a larger set, I implemented a custom way of using the listview as an infinite scroll, and it works pretty well.
The way I’m doing that is recovering the next batch of data, adding the data to the array, recreate the data source with the new array and than using the function setDataSource on the ListView lo load the new data.

This works wonders, since the scrolling does not get modified, but we are encountering a problem since setting the data source redraws even the old content of the first batch, deleting css we add when selecting an element.

For bypassing this problem I tried on using the function add() on the listView, to not redraw the past element and just add the new element of the batch one byone.
But when trying to use the function I couldn’t find the type of object that’s required to pass to the function.

I usually get the error with the following stacktrace, contentImage is one of the placeholder in the template

Uncaught ReferenceError: contentImage is not defined(anonymous function) @ VM785:1
n.ui.DataBoundWidget.extend.refresh @ kendo.all.min.js:31
b.extend.proxy.b.isFunction.i @ jquery.min.js:3
i.extend.trigger @ kendo.all.min.js:9
ht.extend._process @ kendo.all.min.js:11
ht.extend._change @ kendo.all.min.js:11
b.extend.proxy.b.isFunction.i @ jquery.min.js:3
i.extend.trigger @ kendo.all.min.js:9
ht.extend.splice @ kendo.all.min.js:11
ht.extend.insert @ kendo.all.min.js:11
n.ui.DataBoundWidget.extend.add @ kendo.all.min.js:31

Uncaught ReferenceError: contentImage is not defined(anonymous function) @ VM785:1
n.ui.DataBoundWidget.extend.refresh @ kendo.all.min.js:31
b.extend.proxy.b.isFunction.i @ jquery.min.js:3
i.extend.trigger @ kendo.all.min.js:9
ht.extend._process @ kendo.all.min.js:11
ht.extend._change @ kendo.all.min.js:11
b.extend.proxy.b.isFunction.i @ jquery.min.js:3
i.extend.trigger @ kendo.all.min.js:9
ht.extend.splice @ kendo.all.min.js:11
ht.extend.insert @ kendo.all.min.js:11
n.ui.DataBoundWidget.extend.add @ kendo.all.min.js:31

An example of the object i use to create the data source is ( I just removed how I populate the data)
sourceData[i] = {
  contentId : “…”,
  contentName : “…”,
  contentDescription : “…”,
  contentImage : "…",
  contentOwner : “…”,
  contentAuthor : “…”,
  contentViewCounter : “…”,
  contentLastView : “…”,
  contentLastUpdate : “…”,
  contentType : “…”,
  contentCreationDate: “…”,
};

sourceData[i] = {
    contentId : "...",
    contentName : "...",
    contentDescription : "...",
    contentImage : "...",
    contentOwner : "...",
    contentAuthor : "...",
    contentViewCounter : "...",
    contentLastView : "...",
    contentLastUpdate : "...",
    contentType : "...",
    contentCreationDate: "...",
};


I create an array of object of this type and then pass that to the data param of the dataSource used like this:

 

this.widgetDataSource = new kendo.data.DataSource({
    data: this.completeSourceData,
    ...
})


Any help on how to correctly create an object to pass to the add function, or an alternative solution for the problem will be really helpful.

 

Thanks in advance,

Leonardo


Alexander Popov
Telerik team
 answered on 19 May 2015
2 answers
1.0K+ views

Hi all,

Is it possible to use a single regular expession for the masked text box? I have the problem that I want to set the mask for a country-dependent IBAN entry field. The regular expression for Norway, for instance, would be '/^NO[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{1}$/'  while for Romania it would be '/^RO[0-9]{2}[A-Z]{4}[A-Za-z0-9]{16}$/'. They are different in length, different in where there should be letters or digits, etc. I cannot think of a way to easily change the mask/custom rules during runtime. Just setting a single regex would do the trick quickly and easily, if it is supported that is.

 

Regards,

Henk

Henk
Top achievements
Rank 1
 answered on 19 May 2015
1 answer
137 views

Hi,

When we use the rich text editor and multiselect control in the same page, the multiselect is behaving in a funny way. 

We are able to select items only when we tap the item twice (This issue persists only in Blackberry mobile. In Andriod and iPhone devices there is no issue).

Is there any solution for this problem?

Atanas Georgiev
Telerik team
 answered on 19 May 2015
1 answer
83 views
The picture says it all. I took a screenshot of the debugger so you can see the source template value, the resulting calculated JS, and the exception being thrown. This makes no sense to me. It's a very simple for loop. It's taken almost exactly from the examples in the documentation. I have spent over an hour trying various adjustments and this seems like a bug. What's going on?
Petyo
Telerik team
 answered on 19 May 2015
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?