I need to make more room for columns in my grid, so I am trying to change from big buttons for edit, delete, update and cancel to icons. I can get all of the icons to show right with a little CSS
plus the column def of:
The problem is all four of the buttons show when the grid is not in edit more (inline) and only the update and cancel show when in the edit mode, but they show with the text. Meaning the CSS is working, but the column def isn't doing anything during edit mode.
How do I setup one set of command columns for edit mode and one set for non-edit mode.
What I currently have can be seen here:
http://jsfiddle.net/randyallen/Kfdmh/1/
A little better, no save button while not in edit mode:
http://jsfiddle.net/randyallen/Kfdmh/2/
Also is there a way of getting rid of the row level save / cancel button and just use the toolbar at the top of the grid?
Thanks
Randy
/* Grid Buttons, remove background and change icon */ span.k-delete { background: url("../images/Delete.gif") center center; } span.k-edit { background: url("../images/Edit2.png") center center; } span.k-update { background: url("../images/save.gif") center center; } span.k-cancel { background: url("../images/cancel.png") center center; } .k-grid .k-button-icontext .k-icon { margin: 0; vertical-align: middle; } .k-grid tbody .k-button { min-width: 22px; width: 22px; background:none; border:0px; }
plus the column def of:
{
command: [{ name: "edit", text: "" }, { name: "destroy", text: "" }, { name: "update", text: "" }, { name: "cancel", text: ""}], title: "", width: 100 }
The problem is all four of the buttons show when the grid is not in edit more (inline) and only the update and cancel show when in the edit mode, but they show with the text. Meaning the CSS is working, but the column def isn't doing anything during edit mode.
How do I setup one set of command columns for edit mode and one set for non-edit mode.
What I currently have can be seen here:
http://jsfiddle.net/randyallen/Kfdmh/1/
A little better, no save button while not in edit mode:
http://jsfiddle.net/randyallen/Kfdmh/2/
Also is there a way of getting rid of the row level save / cancel button and just use the toolbar at the top of the grid?
Thanks
Randy