Hi,
I am using Infragistics 4 v 11.1 WHDG. In WHDGs parent grid i am using five colums and inside child band i am binding 12 columns. The parent grid columns are appearing fine however child grid columns are not appearing perfect because of less width of WHDG. They all are getting shrink.
My question is can we include a scrollbar only for child band grid and can scroll through all the columns by giving all the columns its proper width?
Thanks,
Mits
Hello Mits,
I’ve been looking into your issue and came up with the following possible solution.
Set the default column width property for the child bands in the RowIslandCreated event of the grid for example in the following way:
protected void whdg_RowIslandCreated(object sender, RowIslandEventArgs e)
{
e.RowIsland.DefaultColumnWidth = new Unit(200, UnitType.Pixel);
}
This will force the horizontal scroll bar for the child bands to show and their width will be set. Also if you set the height of the child band in this same event( For example with: e.RowIsland.Band.Height = 100; ) it will force the vertical scrollbar to show.
Please keep in mind that if you haven’t set the width/height for the child columns the grid automatically will try to fit all the columns in the parent container.
Please refer to the sample attached.
If you need further assistance don’t hesitate to ask.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Hi Maya,
Thanks for the quick response. This is working fine. However i have one concern. Can we do this when we set width of the column as per our requirement? By setting fix width of column the problem is for some column it will be very big size and for some column it will be small size. For the small column its text is getting cut.
So again my question is can we add horizontal scrollbar in any other way so that we can set the custom width of the column instead of fix width.
Upon setting a fixed width for the child bands in the mark-up the horizontal scrollbar should show automatically. I’m attaching another sample in which the size of the child bands is set. You don’t need to set default width in that case it’s needed only if you auto generated them because otherwise they will shrink to fit the parent container.
I'm just following up to see if you need further assistance regarding this issue. If you still have any concerns or questions I will be glad to help.
I tried this but however in this only vertical scrollbar is coming automatically. Horizontal scrollbar is not coming by itself when we set the custom width of column. I am using the same properties which you are using however not sure why in my page its not coming.
I’m following up to see if you still need assistance. Did you manage to solve your issue?