Telerik Forums
Kendo UI for jQuery Forum
3 answers
76 views
I can't seem to find a way to find my old answered posts in this forum. Is there a way?
Alex
Telerik team
 answered on 12 Jul 2013
3 answers
235 views
I'm looking to use Kendo to enhance an existing PHP web app at the company I work for. Currently all of the data in the app is extracted from a MySQL database, processed and setup as an array, then output as an HTML table.

I'd like to use Kendo as a 'drop-in' replacement for the tables, which means all the data will come from PHP arrays. I've read the docco and got started using the PHP Wrapper, and the following code:
$dataSource = new \Kendo\Data\DataSource();
$dataSource->data($my_array)

Most things are working great, and I'm very impressed. However there's one problem - dates aren't sortable. This is a pretty killer issue for the web app, given that it has a lot of inventory and sales information.

I think the problem is the format of the dates - currently they are 'raw' dates in d/MM/yyy format (no leading  0 on days). But I have also experimented with injecting them them as dd/MM/yyyy, yyyy-mm-dd, and unix time stamps (second since the epoch, otherwise know as date('u') in PHP). But no matter what I do, the dates always sort as if they are just numbers.

Does anyone know what date format is acceptable to Kendo UI's PHP Wrapper, when coming from a PHP array?

I've succesfully used format({0:c}) to represent currency information, and I've read that format({0:d}) can accomplish something with dates, but I've had no luck. I've also tried format({0:d/MM/yyyy}) and a handful of others, but it doesn't change the data.

Does the ->format() function have any relationship to sorting? Or does it just change the visual output of the columns? 

I'm aware that I can hook Kendo up to the data sources directly (and that this is a preferred option), but as I said I'm attempting to use this as a 'drop-in' replacement for tables right now. It's not worth the effort of rewriting so much of the app at this stage, I'm just evaluating. Further, both Easy UI and dHTMLxGrid are capable of taking a PHP array that includes a date and treating it correctly, so I'd be very surprised if Kendo couldn't.

I would have thought this was a pretty common use case, but I can't find anything specific to this example in the docs, tutorials, API etc. Can anyone assist?

Regards,
Sam Miller
Alexander Valchev
Telerik team
 answered on 12 Jul 2013
1 answer
240 views
Hi, 
when I resize the kendoGrid header columns , the background color (or borders) of the content table don't stretch ! I have attached two images which can explain better what I mean.
Regards,
Atiyeh
Dimo
Telerik team
 answered on 12 Jul 2013
1 answer
171 views
Hi,

Is there any example on how to use data from data source in php create update, insert, delete ect?
Sebastian
Telerik team
 answered on 12 Jul 2013
1 answer
1.4K+ views
I have a grid bound to an MVC Model.

I need to create a custom footer where in every cell I place custom html.

Is this possible?
Dimo
Telerik team
 answered on 12 Jul 2013
1 answer
237 views
Hi,

I am new to Kendo UI and are trying out the demo on iPad to check compatibility.

http://demos.kendoui.com/web/grid/virtualization-remote-data.html

I noticed that whilst the grid scrolls, it does not show horizontal / vertical scroll bars in either Safari or Chrome on iOS (6.1.3).  Is this something due to be fixed?

Thanks,
Ben
Alexander Valchev
Telerik team
 answered on 12 Jul 2013
5 answers
415 views
I am using MVVM to display data from a webapi datasource over JSON.

The requirements of my application are such that i have complex screens with a heirarchical data structure and a combination of UI elements that manage the data.  Many of these constructs have a parent/child relationship, with a parent object and a nested collection (such as a list of addresses).  These collections are typically presented in a KendoUI Grid.

The server requires that I track each field that changes for each entity, no matter it's level of nesting.  I need to know the overall state of the entity/object (Added by client, Modified, Unchanged or Deleted) as well as what fields have changed if the status is Modified.  I've come up with a system that uses recursion to setup the MVVM change event to be bound to a function that adds the fields names to a 'ChangedFields' list throughout the data structure that is obtained from the server, this is working well.  I have also implemented an 'ObjectState' property on each object to track the overall state of the object.

In order to perform 'soft deletes' on the client I set the 'ObjectState' property to 'Deleted' (which is an int value of 3) and then need to hide it off the grid.  In order to do that, I've been using RowTemplates and setting the style to 'display:none' on the rows that are soft deleted.  Once the data is sent to the server, any items marked for delete are actually deleted from the database and I have to refresh the screen with the new data for the viewmodel.

The use of RowTemplates has a lot of downsides:
  1. The HTML output of the table doesn't align properly
  2. Many of the fields in the 'Columns' setup of the grid are ignored
  3. Custom editors are difficult to implement
  4. The entire scheme requires me to reload the viewmodel and call 'bind' again
The following fiddle shows the problem with grid alignment and the entire 'soft delete' structure in general: http://jsfiddle.net/cn172/XBY3f/72/

  1. How do I fix the grid alignment issue?
  2. How can I reload data into the viewmodel without calling 'bind' again?  Calling 'bind' again is working in this fiddle, but in my more complex app I am getting errors from  Kendo internals, something related to binding events from what I can tell.  I have trouble getting the grids to reload also.
Alexander Valchev
Telerik team
 answered on 12 Jul 2013
1 answer
217 views
Let's say employees are choosing health insurance plans, and as part of that process, they can ask the application to show how many of a particular kind of doctor can be found in their general location. They want the application to rank the results in descending order (most to least) while continuing to show the locations (by zipcode) where these doctors can be found.

At first the grid would be displayed without any grouping; the employee trying to decide between health insurance plans would drag the plan name column header up to the grouping panel, in order to produce the listing shown below.  NOTE: At present the insurance plans are being sorted alphabetically  when the grid is grouped by Plan-Name:

Gold
Platinum
Silver

Can the grid be made to sort as shown here, i.e. by SUM(DOCTORS) DESCENDING?


PLAN-NAME.................ZIPCODE....................DOCTORS
Platinum
................................................10045.........................................7
................................................10047.........................................12
................................................10050.........................................3
                           TOTAL DOCTORS.........................................22


Gold
................................................10044.........................................4
................................................10048.........................................2
................................................10052.........................................3
                           TOTAL DOCTORS.........................................9


Silver
................................................10041.........................................2
................................................10042.........................................2
................................................10055.........................................1
                           TOTAL DOCTORS........................................5
Petur Subev
Telerik team
 answered on 12 Jul 2013
2 answers
353 views
Hi,

I am using a grids with fixed height and a footer row that shows the number of elements. When the data is loaded, the footer row is displayed "outside" the grid (directly below the grid) and will move into the grid when loading is finished.

With that effect, all my grids are displayed a bit larger first, and will be "re-sized" to the height I specified when the data is loaded. That doesn't look nice.

Is there any way to change this behavior? I would like to have the footer row at its final location from the beginning.

This is how I create my grid on the cshtml page:

@(Html.Kendo().Grid<WebSAT.Models.ServiceModel>()
    .Columns(c =>
    {
        c.Bound(m => m.Id)
            .Filterable(false)
            .Groupable(false)
            .Title(Resources.Id)
            .HeaderTemplate("<strong>" + Resources.Id + "</strong></div>");
        c.Bound(m => m.Name)
            .Filterable(false)
            .Groupable(false)
            .Title(Resources.Name)
            .HeaderTemplate("<strong>" + Resources.Name + "</strong>");
        c.Bound(m => m.Type)
            .Filterable(true)
            .Groupable(true)
            .Title(Resources.Type)
            .HeaderTemplate("<strong>" + Resources.Type + "</strong>");
        c.Bound(m => m.DisabledText)
            .Filterable(true)
            .Groupable(true)
            .Title(Resources.Disabled)
            .HeaderTemplate("<strong>" + Resources.Disabled + "</strong>")
            .ClientFooterTemplate("<strong>" + Resources.GridFooterCount + " #=count#" + "</strong>");
    })
    .DataSource(ds => ds
        .Ajax().ServerOperation(false)
        .Model(m => m.Id(s => s.Id))
        .Sort(sort => {
            sort.Add(p => p.Name).Ascending();
        })                
        .Aggregates(aggregates => {
            aggregates.Add(m => m.DisabledText).Count(); })
        .Read(r => r.Action("GetAllServices", "Home")))
    .Events(e => e
            .Change("gServices_Change")
            .DataBound("gServices_DataBound"))
    .Filterable(filterable => filterable
        .Extra(false))
    .HtmlAttributes(new { style = "height:385px;" })
    .Name("gServices")
    .Groupable()                   
    .Selectable()
    .Sortable()
    .Scrollable(scrolling => scrolling.Height("auto")))

Regards
Sven
Sven
Top achievements
Rank 1
 answered on 12 Jul 2013
3 answers
102 views
I am new to kendo UI and have started to migrate a desktop web site for a client into a mobile app.

I have a aspx page that is being loaded into a remote view.

in the non mobile world i would submit the page back to itself and get the submitted form values and continue.

But I have been told in the mobile would I shouldn't really start using postbacks as it would/could cause issue, so is a Data source what I need to use as I need to query a mysql db to get the price for the given values from the form?

I cant find any easy answers as I am NOT using MVC and dont want to......

Anyone got any pointers on how I might do this?
Alexander Valchev
Telerik team
 answered on 12 Jul 2013
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
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
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
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?