- I am using an editor template for editing a certain view model object. The add/edit window that pops up is way too narrow and has a horizontal scroll bar. If I wrap a <div> around my fieldset and put width on it, the width is ignored. Currently the form is not usable because it is so narrow. How can I specify the width of my editor template? The following also has no effect:
-
.Editable( editing => editing
.Mode( GridEditMode.PopUp )
.DisplayDeleteConfirmation( true )
.Window( window => window.Width( 500 ) ))
-
- When I click the "Add" button, the title of the window still states "Edit". How do I dynamically change this based on the mode?
- I need to have a "Details" button in my master grid which will open a modal popup that displays all the details of the selected row. How is this accomplished with the Kendo grid?
- Edit, Add & Delete buttons only have text. In the Telerik version we could specify to display text, text + image or image only. Where has this functionality gone? I need to only display icons on the buttons.
- In the editor template, the "Update" button does not fire off the specified controller method. It simply closes the window.
- The filter icon does not show up and filtering is not possible
I have looked through the limited documentation and examples and have not been able to answer these questions but if I missed an example I am happy to have that pointed out so I can take a look.
Thanks for your help!
10 Answers, 1 is accepted
- Editor Template popup window does not apply any width settings and is much too narrow.
- Dynamically changing the caption of the popup window from "Edit" to "Add"
- Only display icons on Delete, Update and Add buttons intead of icons + text.
- Filtering not working (filter icon does not show up on column headers)3
Any help with these is greatly appreciated.
Thanks!
To your questions:
- Setting the Window options is currently not supported when using Ajax binding. The width could be set in the edit event. For example:
function
edit(e) {
e.container.width(1000);
}
- The same event can be used to find the text and replace it depending on whether the item is new - e.model.isNew().
- Currently setting the button type is not supported in Kendo. The buttons could be customized only with code.
- I am not sure if this is causing the problem but the filter icons will not be shown if the images are missing. Could you verify that the folder for the theme is included in the same folder as the CSS file? If the problem persists, please send a small sample that replicates this behavior so I can investigate further.
Regards,
Daniel
the Telerik team
Setting the window width like you described works perfectly, thanks! Now if I could only get it centered on the form.
I was able to find the "Update" button and change the text to insert but I have not been able to stumble upon the id of the window and how to change the title. Could you give me the ID or how to access the window title?
The theme folders are in the same directory as the .css files. If it was just the image that was missing wouldn't I still be able to click in the right corner to get the filtering dialog to pop up? I can't do that, no matter where I click it only sorts so I don't think it is just a missing image. I could be wrong though!
Thanks so much for all your help!
Thank you for clarifying that you are using a legacy theme. It seems there was problem with the styles in the telerik.common.css file that is already fixed. Please find the attached file which should resolve it.
Regarding the title, a specific ID is not used for the Window but you can find the title by using the event argument container field which is the Window content element.
function
edit(e) {
if
(e.model.isNew() ) {
e.container.siblings(
".k-window-titlebar"
).find(
".k-window-title"
).text(
"titleText"
);
}
}
Regards,
Daniel
the Telerik team
Thank you for bringing this problem to our attention. I reproduced it on my side. We will look into it and I will write again once the it has been resolved.
Kind regards,Daniel
the Telerik team
The updated .css did fix my filtering icon issue and the code you supplied works on updating the title text of the editor window.
Thanks again!
How did you find the Update button and renamed it?
I wanted to change the name of the Update button to "Insert" in the Add mode. But could not do it. Could you please explain how you acheived that. Also the code which is given for changing the title also didn't work for me.
Thanks,
Praseeda.