DataGrid DataBind Source Detect?

B

bdwise

I have a datagrid and I want to change behavior if the datasource it
is binding to is a datatable or dataview. How can my datagrid know
what the control type is?
 
G

Giorgio Parmeggiani

Hi
I have a datagrid and I want to change behavior if the datasource it
is binding to is a datatable or dataview. How can my datagrid know
what the control type is?

if(dataGrid.DataSource is DataTable)
{
.... is datatable ...
}

if(dataGrid.DataSource is DataView)
{
.... is dataview ...
}

Ciao
Giorgio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top