jQWidgets Forums
jQuery UI Widgets › Forums › Grid › disable particular column with different color
Tagged: datagrid control, grid, javascript grid, jquery grid
This topic contains 10 replies, has 2 voices, and was last updated by apj 9 years, 11 months ago.
-
Author
-
hi,
My grid have 10 columns but only 2 columns are editable here i want show the difference editable and non-editable columns can you please give jsfiddle example.Hi apj,
Same approach as in this demo: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/disableeditingofrows.htm?arctic can be applied to your scenario.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comhi am looking for columns not row
Hi apj,
As I wrote, the same approach can be applied to your scenario. The sample demonstrates how to disable editing Per Cell or All Cells. I would suggest you to look at it and its code.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comvar cellsrenderer = function (row, column, value, defaultHtml) {
if (row == 0 || row == 2 || row == 5) {
var element = $(defaultHtml);
element.css(‘color’, ‘#999’);
return element[0].outerHTML;
}
return defaultHtml;
}In this function have only row number and column name.
how can i get the column property using column name??
I need to differentiate column color using column editable property if it is true ‘gray’ and false normal colorHi apj,
You have “column” parameter. It’s your second param and you can use it
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comyes .In that column parameter have only the column names .
how can i get the column properties using column name??
how can i find column editable true or false using parameter column??Hi apj,
You don’t have the column name, you have the column’s datafield. To get properties of a column based on its datafield, use – getcolumnproperty.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi
Can you check the below url and give advice to disable particular column if the column gave editable true it should be different color.
Here “Firstname” column editable “true” so should be different color.like all the editable “true ”
column should be different color ,editable false column should be different color.
http://jsfiddle.net/NFVL5/697/Hi apj,
The solution is: http://jsfiddle.net/jqwidgets/ubdoL5nj/
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comthanks a lot now working fine
-
AuthorPosts
You must be logged in to reply to this topic.