Telerik Forums
Kendo UI for jQuery Forum
1 answer
108 views
I am looking to have a validation message only be populated when needed. So I have an observable object with 3 fields: Value, IsValid, and Message. IsValid is dependent on Value, and Message is dependent on IsValid.

http://jsfiddle.net/GExfL/
var viewModel = kendo.observable({
    OrderNumber: {
        Value: '',
        IsValid: function(){
            return (this.get('Value').length >= 8);
        },
        Message: function(){
            if(this.get('IsValid')){
                return '';
            }
            else{
                return 'Text length must be at least 8 characters.';
            }
        }
    }
});

It doesn't appear that this is allowed, but is there an easy way to design the VM to get something similar?

The closest I've come up with is a utility method that is shared by both IsValid and Message (http://jsfiddle.net/GExfL/1/), but it seems a little verbose.
Martin
Top achievements
Rank 1
 answered on 09 Nov 2012
2 answers
188 views
Hello,

I need to get the minimum size of a given pane in the splitter. I see the following behavior...

When I call splitter.min(pane) it enters the following method in kendo.all.js:

function panePropertyAccessor(propertyName, triggersResize) {
return function(pane, value) {
var paneConfig = $(pane).data(PANE);

if (arguments.length == 1) {
return paneConfig[propertyName];
}

paneConfig[propertyName] = value;

if (triggersResize) {
var splitter = this.element.data("kendoSplitter");
splitter.trigger(RESIZE);
}
};
}


In this case, propertyName is 'min', however, in the paneConfig the property is called 'minSize', and therefore this returns undefined.
Dino
Top achievements
Rank 1
 answered on 09 Nov 2012
1 answer
341 views
When doing server-side paging, I am receiving results from the query string that are confusing.
The documentation for the web control grids server-side paging does not list all of the items that show up in the query string.

For instance there are keys that appear with nested filters:

filter[filters][0][filters][1][field]

and some that are not nested:

filter[filters][1][field]

There is a logical on the first level, that shows up regardless: filter[logic]
but there are also logicals that show up on other levels.

Sometimes the first columns sorting is on the first level, sometimes on the second level of nesting.

1.Is there any documentation available, that describes what the filters query string structure represents, so we can parse it and make SQL statements accordingly?
 http://docs.kendoui.com/api/framework/datasource#serverfiltering  is all I have found so far, and it is not complete.

2. If there is not documentation available, has anyone successfully parsed this data in such a way that works for all cases of multiple columns, some with one filter, two filters, and zero filters?

3. The same filters give different results, if the operator in the first column never gains focus (if you leave it on and, but enter criteria for second filter on first column). Can we assume this is a bug with the control, and can we assume this is only for the first column?

Thank you


***Update***:
 I parsed based on recurring pattern which is assuming #3 above is a special case and seems to be working ok. For anyone else trying to parse serverside filters for the grid control you can assume that all but the first column are in format:

one filter on a column: filter[filters][X][field] where X is column #
two filters on a column: filter[filters][X][filters][Y][field] where X is col # and Y is filter #

for first column see #3 above, you can make special case for that one in your parser.

Even though i got it working for me, I am still interested to see the documentation when it is updated, thanks!

pucsoftware
Top achievements
Rank 1
 answered on 09 Nov 2012
1 answer
248 views
Hello All,

 I am try to bind kendo grid with json response.

View
var dataSource = new kendo.data.DataSource({              
 
                transport: {
                    read: {
                        url: baseurl + "/Vendor/getData",
                        type: "POST",
                        dataType: "json"
                    }
                }
            });
 
            $("#mygrid").kendoGrid({
                dataSource: dataSource,
                height: 280               
            });
<div id="mygrid">
            </div>

Controller
[HttpPost]
        public ActionResult getData([DataSourceRequest]DataSourceRequest request)
        {
            var vendorRegistrationTask = (IVendorRegistrationTask)new VendorTaskFactory<VendorRegistrationTask>().CreateObject();
            var dataitem = vendorRegistrationTask.getDocument(10);
            DataSourceResult result = dataitem.ToDataSourceResult(request);
             
            return Json(result ,JsonRequestBehavior.AllowGet);
        }

Thanks in an advance.
pucsoftware
Top achievements
Rank 1
 answered on 09 Nov 2012
0 answers
133 views
Hello,
I my application , i use a modalview  and  there is a listview insdie the modal view .  I need to open Popover when click that  listview item.  
 I can open  POPover  but problem is Popover is not  displayed . 

Thank you.
Poorna
Top achievements
Rank 1
 asked on 09 Nov 2012
1 answer
101 views
Hi,
We are experiencing a bug in our application using calendar on IPad. 
We have code in the "change" event. When pressing on a date gently - this code is executed correctly.
But if we delay the touch for a second longer - the whole page is refreshed. 

This happens in the demo site too - I browsed in the IPad to the calendar demo. I scrolled down so that the calender is centerd on the page. When pressing gently on different dates - they change accordingly. When pressing longer - the page is refrsehed and I lose my scrolled position (and the chosen date is highlighted).

Tested on Safari, IOs 5. 

Please help,
Thanks,
Tamar
Petur Subev
Telerik team
 answered on 09 Nov 2012
7 answers
1.9K+ views
Customer wants a popup when performing a batch inline edit on the grid for column X value to be checked and either cause a validation error or not depending on clicking Yes or No on a confirmation popup.  

Basically:  if x == 40 then ask "This could be conflicting, do you want to update any way? Yes or No"  
if yes then continue (allow them to save)
                        if no then set validation error  (for them to change it before saving)

I've tried using confirm() and alert() however there is a bug that causes the e.sender.editor in my Save event to become null after the alert/confirm popup occurs (I'm guessing timing, because this is inconsistent).  This looses all my grid updates (no more modified triangle).  I am not that savvy at debugging actual javascript, so I went down another path of trying to replace them with the Kendo UI Window.  Now my problem is that I need the script to pause for an answer from the Ok or the Cancel so that I can present the proper validation error (or not) in the grid.

If I setup an event for on "No", it triggers after the grid stops edit mode and I can't be sure which field was being edited since the names/id/class are all the same post edit mode.

Any ideas/suggestions?
Alexander Valchev
Telerik team
 answered on 09 Nov 2012
0 answers
121 views
Hello, I wanted to load the grid with data coming from server. I know how to do it on Ajax like datasource.Ajax().Read("Action", "Controller") but I don't want it to use ajax, I just want to use server binding. I found a Server() when looking in intellisense, I tried using Server().Read("Action", "Controller") but the grid is always empty..

Is it possible to do it using the above server binding not the one passing the model when loading the grid in Controller?

If it is, what am I missing?

Thank you and hoping that my question will be answered unlike those several threads that I created in the past that doesn't get answered at all. 
Wonderer
Top achievements
Rank 1
 asked on 09 Nov 2012
5 answers
145 views
Is it safe to initialize a panel bar multiple times?  For example, could I do this?

$('#panelBar').kendoPanelBar();
 
// ... later after dom update ...
 
$('#panelBar').kendoPanelBar();
Robert Bross
Top achievements
Rank 1
 answered on 09 Nov 2012
2 answers
472 views
Hello,

I am having some issues with the kendo Grid.

1. icons in the grid are not displaying filter icons next to header and next prev icons in the pagination
2. grid basic functionality not working like sorting, grouping etc.

Regards,
Ravi

code:

@{Html.Kendo().Grid((List<BNYM.EnSIS.Pricing.Contract.VendorPricingGridResponse>)ViewData["PricingGrid"])
.Name("PricingGrid")
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(25)
.Batch(true)
.ServerOperation(true)
.Model(q => q.Id(m => m.ProductID))
.Model(q => q.Id(m => m.CurrencyCode))

)

.Columns(columns =>

{
columns.Bound(m => m.Category).Title("Category").Width(90);
columns.Bound(m => m.ProductID).Title("ProductID").Width(140);
columns.Bound(m => m.CurrencyCode).Title("USD").Width(50);
})

.Resizable(resizing => resizing.Columns(true))
.Scrollable(scrolling => scrolling.Enabled(true).Height(600))
.Sortable(sorting => sorting.Enabled(true))
.Groupable(grouping => grouping.Enabled(true))
.Filterable(filtering => filtering.Enabled(true))
.Reorderable(reorder => reorder.Columns(true))
.Pageable(Pageable => Pageable.Enabled(true).PreviousNext(true).Input(true).PageSizes(true).Refresh(true))
.RowAction(row => row.HtmlAttributes.Add("data-id", row.DataItem.ProductID))
.RowAction(row => row.HtmlAttributes.Add("data-id", row.DataItem.CurrencyCode))
.Selectable(s => s.Mode(GridSelectionMode.Single).Enabled(true))

 
.Render();

}

Ravi
Top achievements
Rank 1
 answered on 09 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?