Telerik Forums
Kendo UI for jQuery Forum
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
203 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
505 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
132 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
82 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
4 answers
538 views

Can anyone help me how to filter a grid by entering a value in an input.

I want that because when the page loads show me all the records in the grid,

and I just want to show me the rows filtered with the input. That's possible?

I saw this example http://demos.telerik.com/kendo-ui/grid/toolbar-template

but in that example the grid brings me all records and i just want to show me the records only when i put a value on a text field.

I will wait for your answers.

Boyan Dimitrov
Telerik team
 answered on 17 Oct 2016
5 answers
3.1K+ views
Hello,

I'm using templates to display the items and the selected value on a DropDownList.

I assign the optionLabel using a string. I do it this way because I don't know the object structure upfront (it is defined at runtime).

My challenge now is that the required validation is not working on this scenario. Please take a look to this JSBin: http://jsbin.com/eLaQaFaP/2/. It reproduces the issue I'm getting on my app.

Thanks for your help.
Kiril Nikolov
Telerik team
 answered on 17 Oct 2016
2 answers
98 views

- When I've created a new bar chart with 2 consecutive values. The  ratio of bar chart columns are seem to be wrong.

For example: The 2 values is 6 and 7:

 var blogComments = [ {
                "blog": "My blog",
                "day": "1",
                "value": 6,
                "userColor": "#ffd600"
            }, {
                "blog": "My blog",
                "day": "2",
                "value": 7,
                "userColor": "#ffd600"
            },  ];

You can't see example in the link: http://dojo.telerik.com/@hakm/uRIvU

- In fact, it's happend in case of having 2 consecutive values. Therefore; if you have more than two values but only having 2 consecutive values.

For instance: 7,7,7,8,8 => Having 5 values but only 2 consecutive numbers, namely 6 and 7

  var blogComments = [ {
                "blog": "My blog",
                "day": "1",
                "value": 7,
                "userColor": "#ffd600"
            }, {
                "blog": "My blog",
                "day": "2",
                "value": 7,
                "userColor": "#ffd600"
            }, {
                "blog": "My blog",
                "day": "1",
                "value": 7,
                "userColor": "#ffd600"
            }, {
                "blog": "My blog",
                "day": "2",
                "value": 8,
                "userColor": "#ffd600"
            }, {
                "blog": "My blog",
                "day": "1",
                "value": 8,
                "userColor": "#ffd600"
            }  ];

You can see it in the link: http://dojo.telerik.com/@hakm/evucuG

 

- It's only happend when having only 2 consecutive values.

- So what is wrong with it? someone can show me a solution? I can't find any solution in the case :(

ha
Top achievements
Rank 1
 answered on 14 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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?