How can I change the column width?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jakeesgirl
    New Member
    • Oct 2007
    • 17

    How can I change the column width?

    I'm creating a C# program in Visual Studio. When I query the sql database, the results are put into a data grid view. However, the column widths are always too small when displayed. I have text that is not shown because the column width is not large enough. I tried going into Sql Server Management Studio Express and trying to modify the size property of the columns, but it won't let me change it (its grayed out). How can I fix this problem?
  • iburyak
    Recognized Expert Top Contributor
    • Nov 2006
    • 1016

    #2
    Why would you want changing size on the back end server when you need changing size of your grid cells.
    You can provide functionality to popup a full text when grid cell double-clicked.

    If you'll change backend column size to accommodate your grid size (which is unheard of) you will just truncate existing data in a database and have part of data instead of full set of data.

    To limit number of characters returned from a backend to a front end you can use Substring function.

    For more help describe your intentions in more detailed and it would be a wise posting it on .NET forum.

    Good Luck.

    Comment

    Working...