Telerik Forums
Kendo UI for jQuery Forum
2 answers
269 views
Hello. When the user selects a value in the Kendo AutoComplete textbox, I want to run a function to modify the selected value (for example, remove unwanted characters) and have that be returned to the textbox.

For example, I would call the below function upon Select:
function editText(e) {
    var text = this.dataItem(e.item.index());
    text = text.replace(myRegexPattern, '');
    (?????) = text;
};
Is there a property I can set, or an easy way to update/modify the selected text in this way? Thanks!
Dave
Top achievements
Rank 1
 answered on 13 Nov 2012
3 answers
529 views
When I create a new item in the server-side using a Kendo UI data sourcehow do I update the ID of the client-side data item with the ID of the new record inserted in the database in the server-side?
Jeroen
Top achievements
Rank 1
 answered on 13 Nov 2012
1 answer
943 views
I'm creating a single page app and I run into some trouble. It's basically very simple. When I try to persist a new model (model A) it want to use a property of this model (model A.id) in the persistance of another model (model B). The property 'id' (model A.id) is supplied by the back-end.

If I use the following sequence;

var A = dataSource.add({ dataObjectA });
dataSource.sync();
 
var dataObjectB = { 'aId' : A.id, 'otherData': [] };
var B = otherDataSource.add({ dataObjectB });
dataSource.sync();

then the property A.id will be present AFTER the sync() call on the data source. The a-synchronous nature of these calls will lead to the problem that when the call is being made to the otherDataSource.add method the property A.id is not yet set.

After an extensive search I thought of a solution using promises. Since I don't know how to implement these I looked at the source of the data source component. That is when I discovered that the data source already has some sort of promises built in. Would it be possible to supply me (and all readers of this forum) with an example of how to use the promises?

This problem is giving me massive headaches and I've been stuck with the development of my app for quite some time so some help would be very, very, very much appreciated! :) 
Jeroen
Top achievements
Rank 1
 answered on 13 Nov 2012
2 answers
193 views
I am having issues in passing the Parameters to my Webservice. I am passing two parameters that my WS is expecting in the code as: 

  var dataSource = new kendo.data.DataSource({
                        transport: {
                            read: {
                            url: "http://localhost/ws/MobileWS.asmx/GetMenuItems",
                                dataType: "json", 
                                contentType: 'application/json; charset=utf-8',
                                data:  
                                }
                                    q: { 'MenuID': '5', 'VersionID': '2' }
                                }
                            }
                        },

The parameters are passed with special characters as:
http://localhost/ws/MobileWS.asmx/GetMenuItems?q%5BMenuid%5D=5&q%5BVersionID%5D=2

How can I clean it up to get it as:
http://localhost/ws/MobileWS.asmx/GetMenuItems?Menuid=5&VersionID=2 


Thanks,
Chandu

DaVID
Top achievements
Rank 1
 answered on 13 Nov 2012
1 answer
112 views
Hi,
I'm using a remote view to navigate to an different .aspx page, and it's works fine if the hyperlink is in the footer tabstrip (shows header/footer & styles on remote view).  However, using the same link on the actual page (in the view), it will navigate, but no header/footer or styles.
Is this possible?
Thanks 
Tom
tommy
Top achievements
Rank 1
 answered on 13 Nov 2012
1 answer
343 views
Is there a way to prevent the styling around the input tag associated with a Datepicker? I do not want the icon or the surrounding border which is wrapped around the input. It also sets some inline styles on the input which is preventing me from styling the input using classes. 
Joshua
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 13 Nov 2012
0 answers
142 views
Hi,

When I am calling following method I am still getting "Delete" text in the Delete/Destroy button.

c.Command(command => command.Destroy().Text("")).Width(90);
The only workaround it is to use space in Text(" ")

c.Command(command => command.Destroy().Text(" ")).Width(90);

Is this is a bug?
Vlad
Top achievements
Rank 1
 asked on 13 Nov 2012
0 answers
118 views
Hi,

Im fairly new to Kendo UI and have managed to build grids successfully but what i want to do next is have a detailed form page based on what record is clicked on the grid. I know popups and inline editing can be done but i have other linked tables (i.e. notes and status history) which i want to display as grids based on the ID passed on the details page along with a simply client form.

Heres where im at. Currently if you double click on a record in the grid it goes to a details page passing the id of the client in the URL. e.g. edit.php?id=1. I want then 3 windows:

Window 1 - a form with the clients details on so they can be updated (cant do this)
Window 2 - Client notes displayed as a grid (I can do this)
Window 3 - Client status history displayed as a grid (I can do this)

I tried the tutorials on dataSource binding but am not sure if i need to be using a custom listView, gridView or Observable. These seem a little to much for what i want. i just want a form that populates based on the ID passed un the URL, that can be updated using the jSon dataSource which i already have setup.

and advise would be great

thanks
lee
Top achievements
Rank 1
 asked on 13 Nov 2012
3 answers
292 views
Hi,

I use Ajax.BeginForm to add new article. How can I pass uploaded files together with Save action
to save new Article firts and after that save files into database?
I use 
@(Html.Kendo().Upload()
            .Name("file")
            )
inside form.

Thx
Tomaz
Tomaz
Top achievements
Rank 1
 answered on 13 Nov 2012
0 answers
222 views
I just got started with Kendo UI - thinking about switching from Telerik MVC controls. Right off the bat, editing in grids seems like a nightmare. Hopefully someone can help me out here.

Lets say I have a simplified domain model of:
public class User
{
   public Guid UserId { get; set; }
   public string Name { get; set; }
   public Guid TimeZoneId { get; set; }
}
And then I try to make a view model that has to serve as both an EditModel and ViewModel (because of a Kendo limitation? see further below)
public class UserViewModel
{
   public Guid UserId { get; set; }
   public string Name { get; set; }
   public Guid TimeZoneId { get; set; }
   public string TimeZoneName { get; set; }
}
Okay, so lets say I pass a list of UserViewModels to the view and sneak in a list of TimeZoneModels to the ViewBag.

I then add this to my view:
    <%: Html.Kendo().Grid(Model.Users)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.UserId);
        columns.Bound(p => p.Name);
        columns.Bound(p => p.TimeZoneName);
        columns.Bound(p => p.TimeZoneId).EditorTemplateName("TimeZoneId");
        columns.Command(command => { command.Edit(); command.Destroy(); });
    })
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .DataSource(dataSource => dataSource
        .Ajax()
           .Model(model =>
           {
               model.Id(p => p.UserId);
           })
        .Read(read => read.Action("EditingInline_Read", "Grid"))
        .Update(update => update.Action("EditingInline_Update", "Grid"))
        .Destroy(update => update.Action("EditingInline_Destroy", "Grid")))
%>
With an edit template named TimeZoneId.ascx
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<% Html.Kendo().DropDownList()
    .Name("TimeZoneId")
    .DataValueField("TimeZoneId")
    .DataTextField("Name")
    .BindTo(ViewBag.TimeZones).Render();
%>
Okay, here's where it gets fuzzy.

1. First off, when clicking edit for this, It edits inline great. When switching to Popup however, the editor template is not used. What gives?
2. Secondly, how do you manage this properly? I needed a TimeZoneName to show the name in the grid, but in order to preserve a timeZoneId when creating or editing a user, I need to have a TimeZoneId field on the model as well. So, how do you show just the TimeZoneName when displaying while hiding the TimeZoneId. Then hiding the TimeZoneName when editing and showing the TimeZoneId with a dropdown. It doesn't appear this is thought through very well here. How is everyone else handling this?

-Levi
Levi
Top achievements
Rank 1
 asked on 13 Nov 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
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
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?