7 Answers, 1 is accepted
We do not have a runnable example of a Grid with custom DropDownList editor in "popup" editing mode, but you can combine the following online demos to obtain one:
http://demos.telerik.com/php-ui/grid/editing-popup
http://demos.telerik.com/kendo-ui/grid/editing-custom
Please mind that the save event handler should be adapted for the "popup" editing mode, as the e.values object is available in "incell" (the default) editing mode only.
The file with all necessary adjustments is attached.
I hope this helps.
Regards,
Dimiter Topalov
Telerik by Progress
Hello Dimiter,
I saw your answer (for information I am new in PHP, JS and KENDO) finding alone the solution will be for me a long way. I found a little BUG in your example editing-custom I would have liked not to fall on it, I lost some hours to understand. I attach a correction of the algorithm.
01.
for
(
$index
= 0,
$count
=
count
(
$data
);
$index
<
$count
;
$index
++)
02.
{
03.
$categoryId
=
$data
[
$index
][
'CategoryID'
];
04.
$NotFound
= true;
//Case not found
05.
foreach
(
$categories
[
'data'
]
as
$category
)
06.
{
07.
if
(
$category
[
'CategoryID'
] ==
$categoryId
)
08.
{
09.
$data
[
$index
][
'Category'
] =
$category
;
10.
$NotFound
= false;
// Found
11.
break
;
12.
}
13.
}
14.
if
(
$NotFound
)
15.
{
16.
$data
[
$index
][
'Category'
] = [
"CategoryID"
=>
$data
[
$index
][
'CategoryID'
],
17.
"CategoryName"
=>null];
//Fill with a line of the same CategoryID and CategoryName null
18.
}
19.
}
Thanks!
Hi,
I'm talking about the downloadable version " telerik.ui.for.php.2016.3.1028.trial / wrappers / php / grid / editing-custom.php" because I just found a second bug. When adding a new record.
see you.
Thank you for sharing your observations, but can you please describe the mentioned bugs in further details?
More specifically, what is the expected behavior, and how the observed one differs from it, so we can inspect the demos, and either fix them (if we confirm the behavior is faulty), or provide an explanation (if we feel the current behavior is actually intended and expected).
Thank you in advance.
Regards,
Dimiter Topalov
Telerik by Progress
Hello Dimiter,
When adding a new record. There is an error in the console : I attach the file error.htm
To correct, I have added a new field in the DataSourceSchemaModel "CategoryID"
And at line 34 of your program I added the condition :
if (($type != 'categories') && ($type != 'create'))
I hope this will help you in your improvement.
greeting.
Thank you very much for bringing this issue to our attention, and providing a solution. We will update the demos accordingly, and the working version will be available in a future release of Kendo UI.
I have updated your Telerik Points as a token of gratitude for helping us improve the quality of our product.
Regards,
Dimiter Topalov
Telerik by Progress