Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DetailsView use DynamicField instead of BoundField

Status
Not open for further replies.

229257

Programmer
Apr 23, 2002
54
GB
Hi,

When adding a DetailsView and configuring the datasource Visual Studio automatically generates fields for each column in the datasource which is great.

Here's the but...

We would like to alter this so Visual Studio uses a DynamicField instead without having to alter the ASP mark up.
E.g. used by default
<asp:BoundField DataField="CompanyNumber" HeaderText="CompanyNumber"
SortExpression="CompanyNumber" />

E.g. what we'd like to use by default without changing the ASP markup
<asp:DynamicField DataField="CompanyNumber" HeaderText="CompanyNumber" SortExpression="CompanyNumber" />

The reason we want to enforce developers to use DynamicFields is because our system will automatically add multilanguage support and apply all the validation required for this field.

Any suggestions would be greatly appreciated.

229257
 
Any suggestions would be greatly appreciated.
Don't use the datasource controls, write a DAL yourself to return your data. Datasource controls are very limited and cannot be debugged.

As for the DynamicField issue, I would look in the options of VS, there might be a way to set the default to be a dynamicfield instead of a boundfield.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top