"Indent" field in gridview template.
I want to "indent" the text in a label control in a gridview template field, in variable amounts, based on the value in another hidden control in the same template field. (So, ident of targetText = X times value of indentLevel)
I can either add a field in front of the target field, and modify it's width, or add some blanks to the front of the text in the target field.
In either case, I've got to figure out where to perform the detailed field modification. It's strictly for display, and the level value will change, so don't want to store the indent itself in the database.
I was thinking of doing the field modifications in the _RowDataBound event, where I can access the rows as they are created.
My questions here is:
> Would this work, i.e., will the data be available at that time for modification, on a row by row basis?
> If this would work, how do I access the controls within the rows? I've got another operation that's occuring at this point, where I access the rows as objects. However, I don't know the synatax for getting and setting values of the label controls within the rows.
Any guidance on how to make this work (or information about why it won't work), would be appreciated. (My current fallback position would be to do something in SQL as part of the Select command for filling the gridview.)