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

Inline editable grid DropDownList editor

2 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jan Kaare
Top achievements
Rank 2
Jan Kaare asked on 18 Apr 2013, 08:29 PM
Is there an existing complete code example for a PHP wrapper based inline editable grid with a DropDownList editor? For which the DropDownList values are populated from json data.

2 Answers, 1 is accepted

Sort by
0
Jan Kaare
Top achievements
Rank 2
answered on 19 Apr 2013, 11:58 AM
For this PHP wrapper based inline editable grid (for the users' shop opening hours data) with this DropDownList editor, it all now operates correctly whenever the dropdown options’ Id (OpeningName) is used for the grid column.

However, when the dropdown options’ text (OpeningTxt) is used for the grid column, the following 2 strange things are experienced:

1: When new record is added, the record is created in database but it’s not displayed in grid before the web page and the grid is refreshed.

2: When editing record, the record is updated in database but it’s not changed in grid before the web page and the grid is refreshed.

Within the PHP wrapper code the following is set:

$GridColumn->editor("GridEditorDropDownList");
$GridColumn->template("#= OpeningTxt#");

Within the javascript code the following function is set:

function GridEditorDropDownList(container, options) {
$('<input required data-text-field="OpeningTxt" data-value-field="OpeningName" data-bind="value:' + options.field + '"/>')
    .appendTo(container)
    .kendoDropDownList({
        autoBind: false,
        dataSource: {
            type: "json",
            transport: {
                read: "ajax.php?a=GetGridDropDownOptions"
            }
         }
    });
}
0
Alexander Valchev
Telerik team
answered on 22 Apr 2013, 10:50 AM
Hi Jan,

Regarding your first question, I am afraid that such example is not available at present, but the useage of the custom editor is simple. Please see the corresponding documentation:

With regard to your second post, I already replied in the support ticket that you submitted on the same subject. In order to avoid further duplication, I kindly ask you to continue our conversation in only one of the support communication channels. 

Thank you in advance for the understanding.

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!
Tags
Grid
Asked by
Jan Kaare
Top achievements
Rank 2
Answers by
Jan Kaare
Top achievements
Rank 2
Alexander Valchev
Telerik team
Share this question
or