Click here to Skip to main content
14,459,557 members
Rate this:
Please Sign up or sign in to vote.
See more:
hey guys.........

My data visible through detailsview using bound flied but i want proper format of detailsview so i want to add table inside details view

what can i do?
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You need to use template fields. A TemplateField object enables you to specify templates that contain markup and controls to customize the layout and behavior of a column in a DetailsView control. Using an ItemTemplate, you can specify the layout to be used when the DetailsView displays data in a column.

Refer: MSDN: Template Field[^]
   
Comments
shinebudy 25-Jul-12 7:49am
   
when i take bound filed inside template filed it returns error;
Sandeep Mewara 25-Jul-12 10:30am
   
It's either bound field or template field. Not one inside another.

Following datagrid sample for template field should explain you:
MSDN: Using TemplateFields in the GridView Control[^]
MSDN: Creating a Custom Column in a GridView Web Server Control[^]
shinebudy 25-Jul-12 8:05am
   
what can i do?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100