Telerik Forums
Kendo UI for jQuery Forum
3 answers
375 views

Hi,

    I have a link in a column (using the "template" option) within a child grid, which on clicking will redirect to a new page. When I click the back button on the browser, I would like to have the grids in the state that they were in. I found an option for the main grid using setOptions and getOptions. But how do you manage the state of the child grid?

 

For example, if I have the second row of the main grid expanded which in turn has a child grid which is in the third page, when I return back, I want the second row of the main grid to be expanded and the child grid should be in the third page. Is this possible?

 

Thanks,

    Arun Kumar

Stefan
Telerik team
 answered on 18 Oct 2016
1 answer
177 views
Hello,

I'm trying to bind a multi dimensional data object to a kendo grid and am not having any success. My data looks something like this:

{
  "SalesSummary": {
      "ProNetSales": {
        "SubHeader": "Proj Net Sales",
        "Monday": 2800.00,
        "Tuesday": 3450.00,
        "Wednesday": 3100.00,
        "Thursday": 0,
        "Friday": 0,
        "Saturday": 0,
        "Sunday": 0,
        "WTD": 9350.00,
        "PTD": 54470.00
      },
      "ActualNetSales": {
        "SubHeader": "Actual Net Sales",
        "Monday": 2983.19,
        "Tuesday": 3728.17,
        "Wednesday": 3783.34,
        "Thursday": 0,
        "Friday": 0,
        "Saturday": 0,
        "Sunday": 0,
        "WTD": 10494.70,
        "PTD": 58022.00
      }
    },
"Transactions": {
      "Proj": {
        "SubHeader": "Proj",
        "Monday": 225.00,
        "Tuesday": 350.00,
        "Wednesday": 270.00,
        "Thursday": 0,
        "Friday": 0,
        "Saturday": 0,
        "Sunday": 0,
        "WTD": 845.00,
        "PTD": 4644.00
      },
      "Actual": {
        "SubHeader": "Actual",
        "Monday": 263.00,
        "Tuesday": 365.00,
        "Wednesday": 289.00,
        "Thursday": 0,
        "Friday": 0,
        "Saturday": 0,
        "Sunday": 0,
        "WTD": 917.00,
        "PTD": 4827.00
      }
    }
  }

So there are multiple dimensions with "SalesSummary" and "Transactions" as the top level dimension each having their own sub dimensions, each of which have the last layer which would be the row data that I'm trying to display. The reason I have the data structured this way is I actually need to display it on the page grouped by top level dimension, so "SalesSummary" then by the sub dimension within each top level. Is there a way to define a schema model to handle this when binding to a kendo grid? Or should I even be using a grid to display this type of data?

Best Regards,

Mike
Alex Hajigeorgieva
Telerik team
 answered on 18 Oct 2016
4 answers
491 views

We allow users to specify custom symbols as part of the number formats they see in our software. We are using Kendo's formatting capability to incorporate these symbols as part of our format strings. For example, we might have a format string like:

var format = "\\$0.00\\/\\h\\r;(\\$0.00\\/\\h\\r)";

kendo.toString(-1.7, format); // ($1.70/hr)

Note the use of backslashes to escape literal characters in the format string. This seems to work well, except when the ? character is used. Here's an example:

var format = "\\?\\x0";

kendo.toString(100, format); // returns "x?100", but I would expect "?x100"

This definitely seems like a bug. I can't find any documentation (http://docs.telerik.com/kendo-ui/framework/globalization/numberformatting) explaining why the '?' character should receive special treatment at all, let alone when escaped.

I've also posted this as a StackOverflow question:

http://stackoverflow.com/questions/39977914/kendo-format-string-puts-literal-in-the-wrong-place

 

Mike
Top achievements
Rank 1
 answered on 18 Oct 2016
4 answers
1.4K+ views
Hello, 

I have an autocomplete field which on selection adds a new row to my grid. The row appears on the grid, but when I click a button which has the sync() method, the grid does not send any data. I explored the datasource, and it has all its new records set to dirty=false as if the grid has been synced before. 

Here is how I add new row(s) to the grid:
var ds = $("#selected_locations").data("kendoGrid").dataSource;
var mod = ds.insert(0, {
   id: dataItem.id,
   Location: dataItem.Name,
   Reach: 10000
});
I have also tried using the method add, but I got the same results.

Here is the grid declaration:
$("#selected_locations").kendoGrid({
                    dataSource: {
                        schema: {
                            model: {
                                id: "id",
                                fields: {
                                    Location: {
                                        type: "string",
                                        editable: false
                                    },
                                    Reach: {
                                        type: "number",
                                        editable: false
                                    }
                                }
                            }
                        },
                        type: "json",
                        transport: {
                            read: {
                                url:"createCampaignData.php",
                                dataType: "json",
                                type: "GET",
                                contentType: "application/json; charset=utf-8",
                                data: {
                                    funct: "getGeoLocGrid",
                                    model: "geoLocation",
                                    form: <?php if(isset($id)) echo $id; else echo '0'; ?>
                                }
                            },
                            destroy: {
                                type: "POST",
                                data: {
                                    operation: "delete"
                                }
                            },
                            create: {
                                type: "POST",
                                data: {operation: "create"},
                                cache: false
                            }
                        },
                        autoSync: false,
                        batch: true
                         
                    },
                    columns: [
                        {
                            field:"Location"
                        },
                        {
                            field: "Reach",
                            format: "{0:n0}"
                        },
                        {
                            title: "Action",
                            command: "destroy"
                        }],
                    editable: true,
                    scrollable: true,
                    sortable: false,
                    filterable: false,
                    pageable: false
                });


I also tried to set the flag dirty manually but this causes some other problems, the datasource is disconnected from the grid. 

var newData = ds.data();
newData[0].dirty = true;
ds.data(newData);

This returns an error:
  1. Uncaught TypeError: Cannot read property 'data' of undefined
    1. p.extend.setup
    2. p.extend.update
    3. o.extend._promise
    4. f.extend.Deferred
    5. o.extend._promise
    6. o.extend._send
    7. o.extend.sync
    8. (anonymous function)
    9. f.event.dispatch
    10. f.event.add.h.handle.i

Rosen
Telerik team
 answered on 18 Oct 2016
13 answers
211 views

Once one file has been uploaded using the Upload control, the hove style of the control remains and it doesn't change.

For example, if the button is blue and the hover state is light-blue, it remains light-blue after the file-dialog box is opened. i.e. It maintains the hover light-blue color.

Dimiter Madjarov
Telerik team
 answered on 18 Oct 2016
1 answer
510 views

I have a kendo grid running with a command button

 

When I click the button, its appears to not be pulling the closest 'tr' but instead a random 'tr' and then the closest 'tr'

Code:

function showServiceDetails(e){
    e.preventDefault();

    var dataItem = this.dataItem($(e.currentTarget).closest("tr"));

    alert(dataItem.layerSource);

}

I'm not getting the correct rows 'layerSource' instead I get another one, then the correct one???

 

Odd

I've attached a pic of the data

Any insights would be SOO helpful right now.

Cedric

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 17 Oct 2016
2 answers
1.1K+ views

Could someone please provide some guidance why am I seeing the pages list displayed differently in local (bullets) vs Demo (drop-up list).

Thank you!

 

 

 

Diana
Top achievements
Rank 1
 answered on 17 Oct 2016
5 answers
136 views

Hi, 

Is there a breakdown of all the KendoUI packages somewhere and what is needed for each component to work?
I'd like to know (for example) all the packages required when implementing the KendoGrid (eg, grid, toolbar, pdf, etc). So that my web pages only have to download the minimum about of data to function.

Thanks and Kind Regards, 
Grant

 

Kiril Nikolov
Telerik team
 answered on 17 Oct 2016
4 answers
1.2K+ views
Hello,

I have the following issue:

My data for a row looks like this (simplified):

{ Name: 'name', Statuses: [ {Name: 'StatusA', Value: 'ValueA'} , {Name:'StatusB', Value: 'ValueB'}] }

So on each row data I have a list of name-value collection for statuses.
I have a number of columns (one for each status) named with the status name: StatusA, StatusB, etc.

In the column template I want to put the value of the status depending on the column name.
I can access data.Statuses in the template and get the status values, but the template is not aware for which column is being rendered.

Is there any way to access the column name in the template or send it as a parameter?

Any help is appreciated!
Ketul
Top achievements
Rank 1
 answered on 17 Oct 2016
1 answer
84 views

Our users are experiencing an issue that I was able to recreate on Kendo demo page (https://demos.telerik.com/kendo-ui/spreadsheet/index)

All actions occur in the cells (not the function line):
1 - Within a cell, begin typing a function (for example:    = average  ), the dropdown appears and the function can be chosen
2 - Go to any other cell, type any letter and press Tab (not Enter).  A function from the dropdown list is auto-populated & replaces the letter (or word).  Type two words in a cell and hit tab - the second word is replaced by the function name; the same happens  when a number then a word/letter is typed in a cell. 

It does not happen when only a number is entered or a number is the last character typed in a cell.  It also does not happen when Enter is hit instead of Tab.

Thanks

 

 

Alex Hajigeorgieva
Telerik team
 answered on 17 Oct 2016
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
Application
Map
Drag and Drop
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?