hi, i have a datagrid and created cloumn headers(4 nos) on that, when i map the values form dataset to datagrid , new column headers (4 nos) are created again and the values are populated on respective columns. now my datagrid contains 8 column headers (duplication), the first 4 columns doesn'i hvae any values which is already created in datagrid. but another 4 coulms having values which is created by dataset . how to avoid this,
my requirement is when i map the values from dataset to datagrid ony the values has to populate on respective cloumns and it won't be affect the column headers
help me ,
thanks in advance,
regards, Sankar.K
|
| Author: Kiran 18 Nov 2006 | Member Level: Gold | Rating: Points: 2 |
i think that u r not setting the autogenarated coloumns =false try it
|
| Author: Roopesh Babu Valluru 18 Nov 2006 | Member Level: Gold | Rating: Points: 2 |
y u do all those.... just drag a datagrid and dont set any columns....if u set the datasource as datasetname and datamember property as the table name...then automatically it takes the headers equal to the column numbers in database table....
hope u understand
all the best.........
|
| Author: Mohammed Abdul Shameem 18 Nov 2006 | Member Level: Silver | Rating: Points: 2 |
hi, go to the Datagrid properties and set "autogenerated columns=false"
|
| Author: DotNetGuts (DNG) 18 Nov 2006 | Member Level: Diamond | Rating: Points: 2 |
Select Datagrid. Its column collection property and UNCHECK the "Create column automatically at run time " property.
|
| Author: bujji 18 Nov 2006 | Member Level: Gold | Rating: Points: 2 |
Hai SetAutogenerateColumns =False for Datagrid Property
|