Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asp.net DetailsView - multiple columns?

By default, DetailsView supports 2 columns. I'd like to add a third column. Is this possible using DetailsView? Creating a table within each field doesn't do what I'd like as the third column won't be properly aligned.

I know I can use other controls such as DataList, but having the typed asp:HyperLinkField / asp:CheckBoxField / etc of DetailsView and corresponding properties is extremely convenient.

Does the best of both worlds (the flexibility of DataList and the built-in shorthand objects of DetailsView) exist?

like image 308
Mike Avatar asked May 25 '26 02:05

Mike


1 Answers

If you want a custom template & layout, you should use FormView, as it will behave and have the same events as the detailsView.

Take a look at MSDN and Using the FormView's Templates

like image 61
Muhammad Akhtar Avatar answered May 26 '26 15:05

Muhammad Akhtar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!