Telerik Forums
Kendo UI for jQuery Forum
1 answer
133 views
01.<div data-bind="kendoGrid: {
02.    data: $root.Reports,
03.    groupable: true,
04.    scrollable: true,
05.    filterable: true,
06.    sortable: true,
07.    pageable: {
08.        pageSize: 10,
09.        pageSizes: true
10.    },
11.    columns: [
12.                    { field: 'ReportNumber', title : 'Report Number'},
13.                    { field: 'CreateDate', type:'date', template: function(dataItem) { return '<span>' + ConvertDate(dataItem.CreateDate, 'MM/DD/YYYY') + '</span>';}, title: 'Create Date'}
14.                    { command: { text: 'View', click: $root.ShowReport }, title:' ', width: 80}
15.    ]
16.    }">
17.</div>


01.function  ConvertDate(value, format) {
02.            var valueUnwrapped = ko.utils.unwrapObservable(value);
03.            var pattern = format || 'mmmm d, yyyy';
04.            if (valueUnwrapped == undefined || valueUnwrapped == null) {
05.                return '';
06.            } else {
07.                var date = moment(valueUnwrapped);
08.                var str = moment(date).format(pattern);
09.                return str;
10.            }
11.        }
Hi,

I am using knockout-kendo.js 

In the underlying data source for the grid the "CreateDate" is just a string like this: /Date(1368388119000)/
I have been able to display the date in the grid using the template as shown in the code above. But when I try to use the filter on the Create Date field it throws a javascript error  : Uncaught TypeError: Object /Date(1368388119000)/ has no method 'getTime'

What is the proper way to bind the date in this format so that the filtering works with it?

Jayesh Goyani
Top achievements
Rank 2
 answered on 18 May 2013
1 answer
265 views
Hi,

When a user is scrolling through many items in a grid that we have set up to use virtualization, I need to know when the grid is going back and requesting data because I have a few searching, sorting and filtering controls around the grid that I would like to also be disabled also when the grid pulls down more data.  Unfortunately, the requestStart and requestEnd events are not fired on the DataSource when this occurs.

Is there a possible workaround for this and/or could this be submitted as a bug please because I think it should fire these events when scrolling a virtualized grid.
Dimiter Madjarov
Telerik team
 answered on 18 May 2013
1 answer
399 views
I have a Grid defined as:
$("#FloorPlanGrid").kendoGrid({
        dataSource: floorPlanSource,
        toolbar: ['create'],
        columns: [
            {field: 'CompanyName', title: 'Company Name', editor: flooringDropDown},
            {field: 'AccountNumber', title: 'Account Number'},
            {field: 'CompanySubType', title: 'Sub Type'},
            {field: 'Active', title: 'Active'},
            {field: 'CreditAvailable', title: 'Credit Available'},
            {field: 'DFINumber', title: 'DFI Number'},
            {field: 'ClosedDate', title: 'Closed Date'},
            { command: ['edit', 'destroy'] }
        ],
        editable: 'inline',
        //edit: function (e) {
        //  debugger;
        //}
    });
With a custom editor for the company name defined as:
function flooringDropDown(container, options) {
    $("<input required data-text-field='Text' data-value-field='Value' data-bind='value: " + options.field + "'/>")
        .appendTo(container)
        .kendoDropDownList({
            autoBind: false,
            dataSource: {
                transport: {
                    read: window.PaymentOutsideOptionsUrl
                }
            },
            select: function(e) {
                var item = this.dataItem(e.item.index());
                 
                if (item) {
                    console.log(item.SubType);
                    debugger;
                }
            }
        }
    );
}
Where the debugger line is in the select event, I would like to set the value of the CompanySubType to item.SubType. I have verified that I can get the SubType, but I cannot for the life of me figure out how to set the value of the CompanySubType column. Could someone demonstrate how to set this value?

Jason
Dimiter Madjarov
Telerik team
 answered on 18 May 2013
5 answers
222 views
Hi,

How do I access the properties of the stock chart's navigator? I can access the chart's options like so:                    

var chart =  $("#stock-chart").data("kendoStockChart");
var chartOptions = chart.options;

but I am not having any luck with the navigator. I would like to add series and access other properties programmatically.

Thanks,
Tonih
T. Tsonev
Telerik team
 answered on 18 May 2013
1 answer
2.5K+ views
I'm evaluating the Kendo UI grid for possible use in a rails applications. Is there any way to customize the validation error messages for a column?

The validation seems to be working, but I still get the standard error messages:

schema: {
                        model: {
                            id: "id",
                            fields: {
                                name: { editable: true, validation: {required: true, message: "Brand name is required."}},
                                brand_code: {
                                    editable: true,
                                    validation: {pattern: "^[A-Z]{4}$", message: "Brand Code must be 4 upper case characters."}
                                },
                                brand_type: {editable: true, validation: { required: true }}
                            }
                        },
                        errors: "error"
                    }
Dimiter Madjarov
Telerik team
 answered on 18 May 2013
1 answer
388 views
I have a Kendo Grid with Inline Editing and the following for example:

.Editable(editable => editable.Mode(GridEditMode.InLine))

columns.Template(@<text></text>).ClientTemplate("<input type='checkbox' #= ActionAssign ? checked='checked':'' # class='chkbx5' />").Title("Assign").Width(100);

How can I only show the template checkbox only when in edit mode but when now like True/False etc. as a label or something.  If that is too difficult then just disabling the checkbox.  I am having a hard time finding some basic functionality type examples online.

Thanks
Sean
Dimiter Madjarov
Telerik team
 answered on 18 May 2013
1 answer
59 views
print options for Pop up windown
Vladimir Iliev
Telerik team
 answered on 18 May 2013
1 answer
274 views
Do kendo charts have linear-interpolation or anything similar? Any examples if present?
Iliana Dyankova
Telerik team
 answered on 18 May 2013
1 answer
176 views
I have a mobile tabstrip which has 5 tabs.  All the tabs except one will show a different view.  The last tab (more), I would like to show a custom slide up menu.  To get this to work, I tied to bind a data-click event to that one tab, which does not work.  I tried binding the even in my scripts, that did not work.  I tried the data-select event, but that even only fires once for the same tab, so I can't use that event since I can't hit the same tab again to hide my menu.  I am also using MVVM.  Is there anyway to bind an event to a single tab.  

Thanks,
Joe
Petyo
Telerik team
 answered on 18 May 2013
3 answers
126 views
Hi there,

I have an unusual use case where we have two tables (Table A and Table B) sharing a single datasource. Both tables has different number of columns which can be editable, e.g. Table A has columns 1-5 editable, while Table B only has column 2 being editable.

Form my understanding, whether a column is editable or not is controlled via the datasource's model. Is there any undocumented configurations where we could define the editable columns when we are defining the Grid? If not, will you be considering it for future updates?

Currently, my workaround is to define a custom editor for these columns, where my editor essentially blocks editing.

Thank you!
Nikolay Rusev
Telerik team
 answered on 17 May 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
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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?