You don't have to display the value, but you obviously will need to be able to access it, as you seem to have indicated. You can apply it as an id attribute value of an element in the row for example or you can use a hidden form field. Or, if you are working with the HTML5 doctype, you can use custom data attributes
Hidden form fields go poduce some extra space on although they are hidden. I was hoping not to have this space. How can I apply it as an id attribute? I mean, how do I specify the id attribute of a column?
Hidden form fields should not affect layout. You cannot add id attributes to WebGrid columns. The API doesn't allow it. You can add a span to one of the columns in the format parameter and apply an id to that.