Telerik Forums
Kendo UI for jQuery Forum
1 answer
276 views
Hi,

I'm not sure if this is a bug or just a misunderstanding on my part. I'm also putting this post here, but it may be more relevant for the SPA section!

When using a dropdownlist inside a view (rendered as part of an SPA layout), the following element is created at the foot of the body (as well as the normal markup):
<div style="display: none; position: absolute;" data-role="popup" id="dropdownlist1-list" class="k-list-container k-popup k-group k-reset"><ul aria-live="off" id="dropdownlist1_listbox" aria-hidden="true" role="listbox" tabindex="-1" style="overflow: auto;" unselectable="on" class="k-list k-reset">
On a view change, using layout.showIn(), I was to understand the the view and all its child elements would be removed from the DOM. As it is, these elements remain - if the view reference is retained it would appear that only one instance is created if the the view reference is recreated, a duplicate is formed when the view is rendered.

The JSFiddle here demonstrates the issue hopefully. Obviously if there are a lot of views being used with many dropdownlists, then the capacity for many of these remnants to be created could be significant. I haven't done exhaustive testing, but this doesn't seem to happen for (for example) the grid.

Grateful for any assistance!

Many thanks,

J.
Georgi Krustev
Telerik team
 answered on 07 Jun 2013
1 answer
98 views
Not sure what version of kendo  I have, but the javascript parser add-in for Visual Studio detected an anomaly in the kendo.all.min.js file -- in one place the word groupable is quoted with a single quote on the left end and a double quote on the right end.
Vladimir Iliev
Telerik team
 answered on 07 Jun 2013
1 answer
66 views
I'm not sure what version I've got, but there's a mismatched quotation mark  (single on one end , double on the other) in kendo.all.min.js.

I tried to attach  a PNG showing where it is, but there's an error message "Invalid post content".

Thanks
Vladimir Iliev
Telerik team
 answered on 07 Jun 2013
3 answers
41 views
I'm using normal drop down, with external data source, I'm selecting item using select method.
Item is properly selected on all browsers I've checked, however on mobile ones drop down is not scrolled to that selected item. On desktop browsers it is scrolled properly, on mobile not, I need to scroll to the bottom to see selected item.
Daniel
Telerik team
 answered on 07 Jun 2013
7 answers
854 views
Title says it all.  I am editing a record inline.  When I hit update, the request to the server occurs, the record is saved and the response is returned.  However, the Grid does not acknowledge the fact that the AJAX request was successful.  So the Grid stays in edit-mode.  If I cancel then refresh the grid, the row shows up as it should (saved).  No errors are occurring on the server or client.

I'm using the ASP.NET MVC Wrappers - AJAX.

<div style="width: 700px">
    @(Html.Kendo().Grid<RoleGridModel>()
        .Name("grdRoles")
        .Columns(columns =>
        {
            columns.Bound(r => r.Name).Width(200);
            columns.Bound(r => r.Description).Width(300);
            columns.Command(command => {
                if (security.CanAdd || security.CanUpdate) command.Edit();
                if (security.CanDelete) command.Destroy();
            }).Width(200);
        })
        .Groupable(grouping => grouping
            .Enabled(false))
        .Events(events => { if (security.CanAdd && !security.CanUpdate) events.DataBound("function() { this.table.find('.k-grid-edit').hide(); }"); })
        .DataSource(dataSource => dataSource
            .Ajax()
            .Model(model => model.Id(r => r.RoleId))
            .Events(events => events.Error("error_handler"))
            .Read(read => read.Action("Index", "Roles", new { area = "Setup" }))
            .Create(create => create.Action("Create", "Roles", new { area = "Setup" }))
            .Update(update => update.Action("Edit", "Roles", new { area = "Setup" }))
            .Destroy(destroy => destroy.Action("Delete", "Roles", new { area = "Setup" }))
            .Sort(sort => sort.Add(r => r.Name).Ascending())
            .PageSize(10))
        .Filterable(filtering => filtering
            .Enabled(true))
        .Editable(editable => editable.Mode(GridEditMode.InLine))
        .Pageable(paging => paging
            .Enabled(true)
            .Info(true)
            .PageSizes(false)
            .Refresh(true))
        .Scrollable(scrolling => scrolling
            .Enabled(false)
            .Height(400)
            .Virtual(false))
        .Sortable(sorting => sorting
            .Enabled(true)
            .AllowUnsort(false)
            .SortMode(GridSortMode.SingleColumn))
        .ToolBar(toolbar => { if (security.CanAdd) toolbar.Create(); })
    )
</div>

[HttpPost]
public ActionResult Edit([DataSourceRequest] DataSourceRequest request, RoleGridModel model)
{
    if (ModelState.IsValid && model != null)
    {
        try
        {
            Role r = Mapper.Map<RoleGridModel, Role>(model);
            r.AppContext = this.AppContext;
            r.SubscriberId = this.AppContext.SelectedSubscription.SubscriberId;
            r.SubscriptionId = this.AppContext.SelectedSubscription.SubscriptionId;
            r.ModifyDate = DateTime.UtcNow;
            r.IsNew = false;
            r.IsMarkedForDelete = false;
            r.HasChanges = true;
            r.Save();
        }
        catch (Exception ex)
        {
            LogException(ex);
            ModelState.AddModelError("", "Unable to update role. " + ex.Message);
        }
    }
 
    return Json(ModelState.ToDataSourceResult());
}
Vladimir Iliev
Telerik team
 answered on 07 Jun 2013
1 answer
509 views
US zipcodes come in two varieties, a 5-digit code (e.g. "90210") and a 5-digit-hyphen-4-digit code (e.g. "19063-2345").   I am interested in the former.  

Both formats can begin with a leading zero, e.g. Princeton NJ zipcode is "08540".

Can the NumericTextBox  be made to preserve the leading zero, and to display the value as a string of five digits without commas, decimal points?

I'm looking to adapt the NumericTextBox into a masked text box that accepts a string of five digits.
Does KendoUI have a masked text box that I've overlooked?

Thanks
Georgi Krustev
Telerik team
 answered on 07 Jun 2013
1 answer
46 views
Hi

I am using the same javascript function for several columns, filterable, ui in my grid
In the function I would like to get the field name used.
So is there an option to get the field name within that javascript function?

Thanks and best regards

Pascal
Alexander Valchev
Telerik team
 answered on 07 Jun 2013
1 answer
42 views
Hi
 
I am using the following syntax to use a the javascript function for adding a dropdown to a filter within a column of a grid:
 
columns: [  
            {
                title: "Typ",
                field: "FileExtension",
                width: 50,
                filterable: {
                    ui: dropDownFilter
                }
            },       
            {
                title: "Titel",
                field: "Title",
                width: 360,
                filterable: {
                    ui: dropDownFilter
                }
            },
 
 
Within the javascript function "typeFilter" I would like to know the column or better the field of the column
to build a javasript function that can work dynamically for several columns.
So is there a way to get the field ("FileExtension") within the javascript function or a way to pass it down to it?
 
function dropDownFilter(element) {
       element.field ?????
}
 
Thanks for your help!
 
Best regards,
 
Pascal Hohensträter

Alexander Valchev
Telerik team
 answered on 07 Jun 2013
4 answers
68 views
Thanks in advance for any help you can provide.

I'm pulling my hair out trying to figure out why this simple example wont work.

Here's the jsFiddle: http://jsfiddle.net/cmichaelgraham/NWsSj/

Seems like the content of my <div>'s end up on the 1st tab.

-Mike Graham


Kamen Bundev
Telerik team
 answered on 07 Jun 2013
4 answers
491 views
I've got html form and Kendo UI Multiselect in it. In js function i will reset form by usin form.reset(). How do i clear user made selections of it? It seems that selected values are still visible but my Kendo UI validator gives me required error.
ICT
Top achievements
Rank 1
 answered on 07 Jun 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
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?