How can i make the text inside a DataGrid's column align right? (default is align left)
For your information, my DataGrid is mapped to a DataSource which is DistributeDataSet.
Therefore I did not defined any tablestyle to the DataGrid in the design layout.
So how can I use coding to set some of the columns in DataGrid agliment to right?
please guide thank you.
Last edited by albertlse; Jul 17th, 2003 at 09:04 PM.
For your information, my DataGrid is mapped to a DataSource which is DistributeDataSet.
Therefore I did not defined any tablestyle to the DataGrid in the design layout.
So how can I use coding to set some of the columns in DataGrid agliment to right?
please guide, thank you.
the code i posted actually allow you to do that, for example if "Line_No" in the MappingName is actually col1 then the property that we set will only apply to that col and not all the col
To follow the path:
look to the master,
follow the master,
walk with the master,
see through the master,
become the master.-ZEN
I still cannot managed to do it. I followed ur guide but still fail...
For your information, in the design layout, my DataGrid does not has any columns.
My DataGrid's DataSource is mapped to a DataSet.
So when the DataGrid is loaded, the DataGrid does not has any columns.
The DataGrid will only display the columns once the DataSet is filled.
hi
can you please verify that the mapping name property of the DataGridTextBoxColumn is same as the datatable column in the dataset your are trying to map to?
if all else fail, maybe you can post the code where you bind the datagrid to the dataset and we will see whats wrong from there
To follow the path:
look to the master,
follow the master,
walk with the master,
see through the master,
become the master.-ZEN