views:

530

answers:

2

Is there an easy way to combine two columns in a datagridview? Hide the two and use their data together in a new one perhaps?

Data is coming in from a database.

+1  A: 

Hi, yes there is way if you aren't using binding then you just do it like this

foreach( DataRow dr in dt.Rows )
{
 DataGridView1.Rows.Add( new object [] { (int)dr["first_col"] + (int)dr["first_col"] } );
}

if you are using binding create Computed Column in the table an bind it to column. If i am no very clear ask and i will try to explain

Best Regards, Iordan

IordanTanev
Sounds good - I'll give it a shot, thank you.
scrot
A: 

i need the javascript date picker