I'm working on a design the involves multiple record types in the same GridView. I can merge all the fields from all the record types into one record layout in the GridView datasource, if needed, and separate the record types after. The remaining trick is presenting different formats for different records.
I've gotten a basic understanding of how to use the Databinder.Eval method in such a scenario to test the record type and show/hide controls base on the result.
I would like to know if it would be possible to extend this approach to build a custom user control that:
1) could be inserted into the Template within the GridView Column
2) would still be able to access and take action based on the record type, via DataBinder.Eval
3) would be able to run javascript (if it came to that) prior to render, in order to customize itself (position and visibility of fields) based on record type.
Particularly helpful would be brief descriptions of key techniques by which 2) and 3) would be implemented.
I can probably implement the features of my app without going to these lengths, and I respect that the approach above could generate performance issues. However, knowing that the approach above is possible, and knowing the general path for implementing it (steps 2 and 3), would open up both my understanding how the pieces in ASP.NET work together, and also the design possibilities.
Thanks!
I've gotten a basic understanding of how to use the Databinder.Eval method in such a scenario to test the record type and show/hide controls base on the result.
I would like to know if it would be possible to extend this approach to build a custom user control that:
1) could be inserted into the Template within the GridView Column
2) would still be able to access and take action based on the record type, via DataBinder.Eval
3) would be able to run javascript (if it came to that) prior to render, in order to customize itself (position and visibility of fields) based on record type.
Particularly helpful would be brief descriptions of key techniques by which 2) and 3) would be implemented.
I can probably implement the features of my app without going to these lengths, and I respect that the approach above could generate performance issues. However, knowing that the approach above is possible, and knowing the general path for implementing it (steps 2 and 3), would open up both my understanding how the pieces in ASP.NET work together, and also the design possibilities.
Thanks!