This is a migrated thread and some comments may be shown as answers.

Button in cell doesn't work

2 Answers 139 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Damir
Top achievements
Rank 1
Damir asked on 15 Mar 2012, 04:02 PM
Hi,

I use at the moment the grid from Q1 Beta. I use the editing inline method for the grid and I would like use a button (passButton) in each row, after "edit cancel" cell. But I don't see a button, only "..."! When i click edit, I see a button.... It is a bug or...????

$("#grid").kendoGrid({
                        dataSource: dataSource,
                        navigatable: true,
                        pageable: true,
                        sortable: true,
                        height: 400,
                        filterable: false,
                        toolbar: [
                                  { name: "create", text: "<?php echo $this->translate("Add Account"); ?>" }
                              ],
                        columns: [
                            { field: "Company", width: "120px", title: "<?php echo $this->translate("Company"); ?>" },
                            { field: "Name", width: "120px", title: "<?php echo $this->translate("Name"); ?>" },
                            { field: "Email", width: "200px", title: "<?php echo $this->translate("Email"); ?>" },
                            { field: "AccountID", width: "150px", title: "<?php echo $this->translate("Account ID"); ?>" },
                            { field: "Active", width: "60px", title: "<?php echo $this->translate("Active"); ?>" },
                            { field: "Date", width: "110px", title: "<?php echo $this->translate("Expired"); ?>", template: '#= kendo.toString(Date,"dd.MM.yyyy") #' },
                            { command: [
                                        {name: "edit"},
                                        {name: "destroy"}
                                       ]
                            },
                            { field: "PassButton", width: "60px", title: "<?php echo $this->translate("Send"); ?>", template: "<input type='button' class='k-button k-button-send' value='' onclick='myFunction(\"#=AccountID#\")'/>" }
                        ],
                        editable: "inline"
                    });

Best regards
Damir

2 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 19 Mar 2012, 02:46 PM
Hi Damir,

I tried to reproduce the described behaviour, but to no avail. Could you please specify what browser you are using? There is a text-overflow bug in Firefox 7, which will cause such problem, but it was fixed in the next versions.

Using your code sample I experienced other problem - there was a JavaScript error when entering in edit mode. That might be caused because the field that contains your custom button is editable. The solution would be to to prevent the editing of the field in the dataSource schema configuration.

For convenience I am attaching the sample page that I used to test your case. Please check it and let me know if I missed something.

Thank you in advance.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Damir
Top achievements
Rank 1
answered on 20 Mar 2012, 07:39 AM
Hi Aleaxander,

thank you for your example. I use Firefox 11 and now, the button works find.... I put only the line

PassButton: { editable: false }

in the scheme and then works....

Best regards
Damir
Tags
Grid
Asked by
Damir
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Damir
Top achievements
Rank 1
Share this question
or