Telerik Forums
Kendo UI for jQuery Forum
0 answers
217 views
I am using the pattern attribute to do validation on a textbox I am using ^http expression to make sure the text entered starts with http but it doesn't seem to work properly.  The only valid input is http exactly here is the html being rendered - 

<input class="k-textbox k-textboxAd1" id="id" name="name" pattern="^http" type="text" validationmessage="Please enter a valid URL it must begin with http(s)" value="" />

Am I doing something wrong?
Andre'
Top achievements
Rank 1
 asked on 12 Sep 2012
2 answers
793 views
Hi, 

I've been having issues binding a custom parameter map to an ASP web api method. I basicly have a kendo grid with a delete button. But by default if I click the delete button it sends the whole data source model for the row as a request. I want it to send just the ID because thats all I need. While its set to the default and I have a viewModel as a input parameter for the web api delete method with the same properties as the data source model everything works fine. I wrote a parameter map that in case of destroy only sends the userID and observed the network request. The ID gets sent fine, but the web API method returns an error that the non nullable input parameter is a null. So it didn't bind right. Anybody had experience with this?

This is the important part of my data source, where you can see the model, parameter map and destroy method, I should note that I also tried using kendo stringify on the return for the parameter map that didnt help.

var viewModel = kendo.observable({
    teamMembersSource: new kendo.data.DataSource({
        transport: {
            read: {
                url: '@(Url.Action("Get", "TeamMembers", new { Area = "API" }))', 
                data: {
                    companyID: '@(((Signuper.WebApp.Infrastructure.SignuperProfessional)User).CompanyID)'
                }
            },
            destroy: {
                url: '@(Url.Action("Delete", "TeamMembers", new { Area = "API" }))',
                type: "DELETE",
                datatype: "json",
            },
            parameterMap: function (options, type) {
                if (type == "destroy") {
                    return { ID: options.UserID };
                }
                else
                    return options;
            }
        },
        schema: {
            model: {
                id: "UserID",
                fields:
                    {
                        UserID: { type: "number"},
                        FirstName: {type: "string"},
                        LastName: {type: "string"},
                        Gender: {type:"string"},
                        CompanyID: { type: "number" },
                        EmailAdress: { type: "string" },
                        IsCompanyAdmin: { type: "boolean" },
                        DateOfBirth: { type: "Date" }
                    }
            },
            data: "TeamMembers",
            total: "TotalCount"
        },


This is the code for my web Api method, pretty simple:
public dynamic Delete(long ID)
{
    var user = membership.GetProfessional(ID);
    if (user == null)
        return new { success = false, errors = "The user that is set to be deleted cannot be found" };
 
    if (ID == ((Signuper.WebApp.Infrastructure.SignuperUser)User).UserID)
        return new { success = false, errors = "You cannot delete the currently logged in user" };  // You cant delete your own user
 
    if (((Signuper.WebApp.Infrastructure.SignuperProfessional)User).CompanyID != user.CompanyID)
        return new { success = false, errors = "You cannot delete the user of a different company" };
 
    membership.DeleteUser(ID);
    return  new { success = true, errors = "You cannot delete the user of a different company" };
     
}

And I've attached a picture with my http request, the response is: {"Message":"The request is invalid.","MessageDetail":"The parameters dictionary contains a null entry for parameter 'ID' of non-nullable type 'System.Int64' for method 'System.Object Delete(Int64)' in 'Signuper.WebApp.Areas.API.Company.Controllers.TeamMembersController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter."} One final thing to note is that i first named the parameter on the web api method and in the parameter map UserID instead of ID as it is now. When it's like that I get a different webAPI error saying simply that no webAPI method that matches my parameters can be found.

Thanks in advance to anybody that can help!
Ross
Top achievements
Rank 1
 answered on 12 Sep 2012
1 answer
120 views
I tried doing the scatter chart date axis example locally (http://demos.kendoui.com/dataviz/scatter-charts/date-axis.html) and instead of the dates on the x-axis displaying nicely MM-YYYY form like in the example it just looks like a bunch numbers as can be seen in my screenshot.

Is there something special that has to be done to format the x-axis date labels that isn't being shown in the example?

My version of Kendo.DataViz is 2011.3.1129

Thanks
Caleb Sandfort
Top achievements
Rank 1
 answered on 12 Sep 2012
2 answers
73 views
I am sending over an array to my MVC Controller and it seems to match the signature. However the array from my data source maps the value as such:

allocations[0][key]=value

The model is looking for the following: allocation[0].key=value.

Is there a way to rewrite the way the array will send out its value to the controller?
Nohinn
Top achievements
Rank 1
 answered on 12 Sep 2012
5 answers
1.1K+ views
Hi all,

I'm wondering if anybody founds a work around for the binding of custom attributes to kendo widgets.

A very useful scenario for me would be the binding of the validator attributes like validaitonMessage or pattern. I'm working in a site that must be displayed in multiple languages, and I'm binding every label and localized rules to a model that controls the translation and how that input would behave based on the language. 

Thanks
Alexander Valchev
Telerik team
 answered on 12 Sep 2012
1 answer
175 views
Hi,
I am trying to extend kendoUI's Window widget.
The widget extends and displays a window upon call. But when I try to close that window, error appears on console and window does not also close.

Please check the JS Fiddle at following URL:
http://jsfiddle.net/nxhPW/19/ 

On Firefox console error shows as following:
TypeError: K(b) is undefined           kendo.web.min.js (line 8)

On Chrome console error shows as following:
Uncaught TypeError: Cannot read property 'options' of undefined           kendo.web.min.js:8

Note: If you uncomment the close event handling code in my fiddle, it would work as expected.

Please can anybody tell me, what is wrong with this or is this a bug ?

Thanks
Alex Gyoshev
Telerik team
 answered on 12 Sep 2012
9 answers
1.8K+ views
I need to style the menu to fit int the bar I have which currently has a height of 43 pixels, so the menu should not be bigger then that, and sub menus should follow that as well. Also the text seem to stay in place when I attempt to override k-menu and k-item, the cause the whole thing to nonaligned.

What css classes do I have to override the height so I don't have that problem anymore?
CHI-CHUNG
Top achievements
Rank 1
 answered on 12 Sep 2012
3 answers
235 views
Hi,

I am having a problem with kendoWindow and IE8: the kendoWindow don't show on screen.

My application works fine in all other browsers including IE7. But in IE8 the kendoWindow simply do not appear on screen. I tested it in non-modal and modal mode, the problem is the same.
In modal mode, only the overlay appears, in the non-modal mode, nothing happens... 

I created a simple example: http://jsfiddle.net/8rzay/5/

KendoVersion: CDN version 2012.2.710 
OS: Windows 7
Browser: tested with IE8 && with IE9 using the IE8 browser/document mode
Jquery: 1.8.0 && 1.8.1
FRANCISCO C P RODRIGUES
Top achievements
Rank 1
 answered on 12 Sep 2012
1 answer
122 views
Again I am behind a corporate firewall so I have a video demonstrating my site in both IE and chrome...

http://www.screencast.com/t/GfampffDwcE

After the user makes a selection from the dropdowns the grid is re-read but on IE it breaks paging and everything else like heirachy sorting filtering etc....

It's beyond aggravating... 

For you Kendo reps... I can start a online meeting and invite you to view this live and to look over the source... 

I haven't filed a support request yet. but if nothing can be gleaned from the demo by the user base I will

Also at the end IE has a serious rendering issue when I hover over items in the grid 
Dimo
Telerik team
 answered on 12 Sep 2012
0 answers
130 views
Hello Everyone,
         I'm new to Kendo UI. I've tried getting the data by giving the values in the datasource of kendoComboBox.
But I need to get the values from Sql Server 2008 database and display in the Kendo UI Combo Box.

Say my database is like

Table Name:Fabrics
----------------
Fab Name
----------------
Cotton
Polyester
Rib Knit
Nylon


Please Help
Thanks,
Karthik
Top achievements
Rank 1
 asked on 12 Sep 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
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
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
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
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?