We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Cell padding and spacing

I'm trying to figure out how I can specify the cell padding and cell spacing properties, like you would with a regular HTML table. What I refer to as the cell padding is the amount of padded space within the cell to the cell border. What I refer to as cell spacing is the amount of space between the cells. If I set the BorderMargins property, I seem to get an appearance like the cell padding property - but not as I expect. As I increase the margins, the text within the cells is eventually hidden as the size of the margin is increased. I believe the expected behavior should be to increase the size of the cell so that the contents remain visible, no matter what margin size is specified. I'd also like to know how to cell the spacing between the cells. I cannot seem to find this property or documentation referring to it. Thanks!

3 Replies

AS Arun Srinivasan Syncfusion Team July 23, 2003 07:40 AM

Hi Paul, Did you try using the TextMargins Property? Arun


PL Paul Laudeman July 23, 2003 08:17 AM

Hi Arun, Thanks for your reply. I missed the TextMargins property the first time around but when I tried it, I still had the same problem. Please see attached for a sample (screenshot included) -- hopefully I'm missing something simple! > Hi Paul, > > Did you try using the TextMargins Property? > Arun


AD Administrator Syncfusion Team July 23, 2003 05:21 PM

In your sample, if you increase the size the rowheight of row 2, you will see the text with the extra space around it. It is the extra space that is causing the text to be clipped as it is drawn. if you add this line, the row height will auto size initially. this.gridControl1.RowHeights.ResizeToFit(GridRangeInfo.Col(2));

Loader.
Live Chat Icon For mobile
Up arrow icon