How to do grid column resizing at run time.

Posted on 2009-02-13
Last Modified: 2013-11-07

we are facing one issue regarding grid column resizing in 3.5.
At run time, we want to re-size the column.
Please suggest on the same.

Thank in advance,
Question by:techprocess
    LVL 4

    Expert Comment

    You can set the column size in event OnRowCreated.

        <asp:GridView runat="server" ID="Grid1" AutoGenerateColumns="false" OnRowCreated="RowCreated">
        <asp:BoundField DataField="c1" />
        <asp:BoundField DataField="c2" />
            protected void RowCreated(object sender, GridViewRowEventArgs e)
                e.Row.Cells[0].Width = 800;

    Open in new window

    LVL 3

    Accepted Solution

    thanks for suggestion, we have resolved the problem by following the javascript suggested on the following link

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Flash ( has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    This video discusses moving either the default database or any database to a new volume.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now