Generate dynamically columns in datagrid
Posted: Fri Sep 30, 2011 6:06 am
Hi Guys,
I am working on project using table field to display data so I now want to use datagrid instead.
The problem is there are any way to generate dynamically columns of datagrid by specific arrays. For example:
1. I have drop box have 2 options to select: option1,option2
2. I want only 1 datagrid to display records. If user select option1 the columns of datagrid now is ID,Name and Age. Otherwise, datagrid now is ID and Name
Could you guys please give me some solutions with this problems?
So appreciated !
Regards,
Quang
I am working on project using table field to display data so I now want to use datagrid instead.
The problem is there are any way to generate dynamically columns of datagrid by specific arrays. For example:
1. I have drop box have 2 options to select: option1,option2
2. I want only 1 datagrid to display records. If user select option1 the columns of datagrid now is ID,Name and Age. Otherwise, datagrid now is ID and Name
Could you guys please give me some solutions with this problems?
So appreciated !
Regards,
Quang