GridView Row Styling

S

siamesedream

I have a GridView that I use for bulk editing. I override the CreateRow
method and logically OR each row's state with DataControlRowState.Edit.
Doing this, however, means that each row is rendered using the
EditRowStyle, which is undesirable in my situation. I would like to
preserve the RowStyle and AlternatingRowStyle rendering.

I have tried to override the InitializeRow method and assign the rows
style to the GridViews RowStyle or AlternatingRowStyle, depending on
the row's DataItemIndex, however, the row doesn't have an accesser to
set the TableRowStyle, only it's css class or style collection. Further
the style collection can't be set which makes things difficult. Any
advice on how to cleanly set a rows style
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top