Do you have the GridView auto-creating the columns based on the DataSource?
If so, that is where your problem is. .Net will add in code to automatically figure out the width of the item being bound to the column and then associate a width based on that item. It is best, if you know what the columns are, to define the column information (such as width, height, etc) and then bind it. It will speed up your gridview displaying information and you will get the outcome you are expecting. If you dont know what the columns will be ahead of time, then define templates for the data and then before you bind the data, load the template information into the gridview and then bind it. In either case, to limit a columns width or a rows height, you will need to define the column or row information before binding occurs, otherwise it will auto-size in all directions to get the information to fit on one single-row line. One limitation is that if the gridview would extend past the edge of the page (when auto-assigning columns), it will spread the excess across all columns and reduce their visible widths to fit on one page-width. On Apr 26, 1:33 am, json <[email protected]> wrote: > Hi > I have a grid view .Css is set for that grid . I have 3 column , name > mobile and id , width for that grid 200px . But when i load data to > that grid , if name is long say 100 charters in db , the grid grows . > I need to wrap the name so that the grid size don't increase . > Thanks > JAYASON > > -- > Subscription > settings:http://groups.google.com/group/dotnetdevelopment/subscribe?hl=en
