im using a DataGrid and i kept "Auto" for DataGridTextColumn
but 2nd column data is very near to 3rd column data..
it seems like both are combined....so i would like to give some padding 10px right to columns...
so that some difference will be there between each columns ...
can anyone help me ?
Loading
RanjithKumar chiguruvadaPosted Apr 17, 2012, 5:26 AM
Issac AbrahamPosted Apr 11, 2012, 3:32 AM
but i asked for datagrid in wpf....
anyways i resolved it for myself...
thank u all....
answer is
set the value of padding in datagridtextcolumn element style for textbox
SenthilkumarPosted Apr 10, 2012, 7:28 AM
There are many ways.
I suggest you to try this.
1) write the css class to the grid control. When it renders it will be in plain table format. Assign the css name to the grid
2) You can set the inline style to the appropriate control either in client/server side.
Keyur NarkhiPosted Apr 9, 2012, 4:54 AM
You can give something like that
CSS
.rowmyGrid td
{
padding: 15px 3px 5px 10px;
}
thanks
Jignesh TrivediPosted Apr 9, 2012, 4:06 AM
you can achive same thing using CSS style
example,
.myGrid
{
border: solid 1px Tan;
}
.myGrid td
{
margin: 3px 3px 3px 3px;
}
hope this help.