Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1570
How to set Height, Width, Text Align of header, item cells and footer?
posted

Hi,

I want to set different width as per the column text. For e.g. for first column it should be 10 for second it should be 5 like this way. I can able to do this with use of Width property of boundfield however this is changing the width of only header not item. Also i want to change the alignment of text to center.

Can anyone help me out in this?

Thanks,

Mit

  • 29417
    Verified Answer
    Offline posted

    Hello mits281,

     

    Where are you trying to change the Width property?

     In the mark up when you set the Width property to a bound data field it should automatically apply it for the whole column not just the header.

    For changing the alignment of the text you could overwrite the css class for the item.

    In your case you should overwrite :

    tbody.igg_Item>tr>td

    {

                    background-color:White;

                    border-top:solid 1px #D8D8D8;

                    padding:5px 8px 5px 8px;

                    overflow: hidden;

                    height: 20px;

                    text-align:center;

                    vertical-align:middle;

    }

     

    For more information about styling please refer to:

    http://community.infragistics.com/blogs/engineering/archive/2010/08/25/webdatagrid-css-styling-guide.aspx

     

    Best Regars,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://ko.infragistics.com/support