vendredi 7 juillet 2017

Checkbox in webgrid

I have a webgrid that display data from the db, I want to add a column that displays a checkbox. Unfortunately the data is a string and would like to set it checked if the data matches a string,

gridColumns.Add(Grid.Column(columnName: "Position", header: "isProvider", format:@<text><input type="checkbox" checked:"(@item.job == 'Provider')" disabled="disabled" /></text>));

but this is not working, how can I implement this?

Thank you

Aucun commentaire:

Enregistrer un commentaire