Telerik Forums
Kendo UI for jQuery Forum
0 answers
122 views
I'm not sure if this is possible. I'm quite new to Kendo UI and so I would like to ask:

Is it possible to force the validator to "put" a default text and style (css class) to the "k-invalid-msg" should the input PASS the validation? Let's say I have an asterisk * for required fields. Should user try to submit an empty form, these asterisks will be replaced by a "required" message. However if the user submits that form again and required fields are filled out I would like to get those asterisks back. It would be lovely if I could manipulate css classes for those cases, like: .warning, .info, .error, .notice, etc...

Thanks for any suggestions.
Ex
Top achievements
Rank 1
 asked on 18 Oct 2012
0 answers
180 views
I am attempting to add a "click" handler to a button (actually an anchor tag with data-role="button" attribute) that also has an 'href' attribute specified.  Essentially, I want to specify which view the button should link to in the HTML, but run some code prior to switching.

Unfortunately, the navigation appears to cancel out the click handler, so my click event doesn't fire.  I verified that I had the click event wired up properly by removing the 'href' attribute, and everything works as expected (except the view doesn't change), then when I add the 'href' attribute back in, the click event stops firing.

Any ideas?
Jeremy
Top achievements
Rank 1
 asked on 18 Oct 2012
0 answers
316 views
I am attempting to add a "click" handler to a button (actually an anchor tag with data-role="button" attribute) that also has an 'href' attribute specified.  Essentially, I want to specify which view the button should link to in the HTML, but run some code prior to switching.

Unfortunately, the navigation appears to cancel out the click handler, so my click event does not fire.  I verified that I had the click event wired up properly by removing the 'href' attribute, and everything works as expected (except the view doesn't change), then when I add the 'href' attribute back in, the click event stops firing.

I hope that makes sense!  Any ideas?
Jeremy
Top achievements
Rank 1
 asked on 18 Oct 2012
1 answer
218 views
I've defined a combobox this way:
$(document).ready(function () {
        cboSite = $("#SiteId").kendoComboBox({
            minLength: 2,
            suggest: true,
            autoBind: false,
            dataTextField: "text",
            dataValueField: "value",
            dataSource: {
                serverFiltering: true,
                serverPaging: true,
                datatype: 'json',
                transport: {
                    read: {
                        url: '@Url.Action("GetSites", "Equipment", new { area = "Equipment" })',
                        data: {
                            q: function () {
                                return cboSite.text();
                            }
                        }
                    }
                }
                ,
                schema: {
                    data: function (data) {
                        return data.result;
                    }
                }
            }
        }).data("kendoComboBox");
    });

But I have two problems:
- if the data returned by GetSites is empty, this GetSites method is then called endlessly (I see that in firebug, it's like an infinite loop)
- if I return data filtered by the text typed by the user, then the GetSites method is never called again when he types something else

Thanks in advance

Keith Engelhardt
Top achievements
Rank 1
 answered on 17 Oct 2012
3 answers
661 views
I got a grid where I've set
selectable: true

but the change event does not fire. Any ideas why it would be so?
Leon
Top achievements
Rank 1
 answered on 17 Oct 2012
0 answers
246 views
Hi, i have problem with create and update data, if i creating data and after that updating data, model/form create data is before will be running again, so data always added when update data.
this my script :
dataSource = new kendo.data.DataSource({
   transport: {
      read: {url:"<?=base_url()?>/bank"},
      update: {url:"<?=base_url()?>/bank/update", type:"POST"},
      destroy: {url:"<?=base_url()?>/bank/destroy",type:"POST"},
      create: {url:"<?=base_url()?>/bank/create",type:"POST"},
   },
   error: function(e) {
      alert(e.responseText);
   },
   batch: true, pageSize: 25,
   schema: {
   model: {
      id: "id_bank",
      fields: {
         nama_bank: { type: "string" },
      }
   }
}
});
//kendo grid
$("#grid_bank").kendoGrid({
   dataSource: dataSource,
   editable:  "popup", height: 450, filterable: true, sortable: true, pageable: true,
   toolbar: ["create"],
   columns: [
      { field: "nama_bank",title: "Nama", filterable: true },
      { command: ["edit", "destroy"], title: " ", width: "160px" }
   ]
});

i think a solution is function parameterMap, but i don't know for using that

thank you before
rooney
Top achievements
Rank 1
 asked on 17 Oct 2012
0 answers
89 views
According to the Kendo documentation, grids will "expand to fit the width and height of its container and contents" by default. This is what I want. However, some script is automatically generating a style="height:129px" for the .k-widget div, and style="height: 99px;" for the .k-grid-content div. I can't figure out where this 130px height is coming from, I haven't specified it anywhere, and the grid is inside a container that is much larger than 130px high, and the content of the grid is thousands of pixels high.. 

This is the Javascript I'm using:


$Elem.children(".table").kendoGrid({
  dataSource: data,
  /* height: "100%", (do not specify height) */
  scrollable: true,
  selectable: true,
  sortable: true,
  filterable: true,
  pageable: false,
  resizable: true,
  rowTemplate: kendo.template($chanElem.children(".rowTemplate").html())
});

Is there a way to manually force a grid to have height:auto or height:100%? (As you can see above, I've tried putting 100% in the Javascript to no avail.)
Brenton
Top achievements
Rank 1
 asked on 17 Oct 2012
0 answers
90 views
Hi,

I want to stream a users timeline from twitter into a listview. I have tried to do this using the pull to refresh - scroll to load example and querying the username instead of html5. However this doesn't return all the users tweets only tweets up-to a certain date (17/10/2012 - 09/10/2012 no later!). So I changed the datasource to the code below:

var dataSource = new kendo.data.DataSource({
    serverPaging: true,
    pageSize: 10,
    transport: {
        read: {
            // the remote service url
 
            // JSONP is required for cross-domain AJAX
            dataType: "jsonp",
 
            // additional parameters sent to the remote service
            data: {
                screen_name: "USER_ID"
            }
        }
    },
    schema: { // describe the result format
        data: "results" // the data which the data source will be bound to is in the "results" field
    }
});

This doesn't work and nothing loads! I can't work out what's different from this apart from using 'screen_name' instead of 'q'. The query works if you put it into your browser: "https://api.twitter.com/1/statuses/user_timeline.json?screen_name=USER_ID". 

The documentation from Twitter can be found here: https://dev.twitter.com/docs/api/1/get/statuses/user_timeline

What is wrong? Why isn't it working?

Thanks,
Thomas
Thomas
Top achievements
Rank 1
 asked on 17 Oct 2012
2 answers
263 views
I'm using the code below for my combobox:

$("#ResourcesList").kendoComboBox({
            index: 0,
            placeholder: "Search by title/description",
            dataTextField: "Title",
            dataValueField: "ResourceID",
            filter: "contains",
            template: '<div style="padding: 10px;"><strong>#= Title #</strong>' + 
                '<div style="margin-top: 5px;" class="t1">#= Description #</div></div>',
            dataSource: {
                type: "jsonp",
                serverFiltering: true,
                serverPaging: true,
                pageSize: 20,
                transport: {
                    read: {
                        url: function (kcb) {
                            var strurl="/mysite/GetResourcesList?filtertext=" + 
                                $("#ResourcesList").data().kendoComboBox.text();
                            return strurl;
                        }
                    }
                }
            }
        });

Calling the following code will return the value of the combox except when an item's "Title" starts with an integer such as "2012 resource item title...".  In this case executing the code below returns the "Title" property instead of the "ResourceID" property.

alert($("#ResourcesList").data("kendoComboBox").value())
Travis
Top achievements
Rank 1
 answered on 17 Oct 2012
10 answers
395 views
When I use popup editing, the dialog window created for the editing is appended to the DOM.  If I do several rename/delete/add actions there are several k-window divs still attached to the DOM.  It's unlikely to cause a problem, but I find it unexpected.
Atanas Korchev
Telerik team
 answered on 17 Oct 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
Iron
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
Iron
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?