I am trying to format a jqgrid which has some dynamic columns which I create like this
JQGridColumn column1 = new JQGridColumn() {
DataField = "ID",
PrimaryKey = true
};
ErrorsJQGrid.Columns.Add(column1);
How do I format these columns to have a say ‘yellow background color’? I can specify a in the jqgrid columns definition, but since my columns are dynamically generated, I am not sure how it’s done from the codebehind.
Here is the link to the demos default formatter, custom formatter
JQGridColumn has the CssClass property which you can use to set custom CssClass for a column. Example:
In HTML
In code
Will this work in your scenario?
Cheers,
Rumen Stankov
Trirand Inc (jqGrid makers)