GridViewColumn will be auto-sized by default or not?Set the Width of GridViewColumn column
if I don't set Width, the column
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Sahil Jani196 reputationPosted Apr 7, 2011, 12:12 AM EDT
There is one option in property panel that "AutoSizeColumnMode" = "Fill".
Means, it will be auto-sized and fill with your full DataGridView Box.
If you found this answer satisfy your need then marked as ACCEPT ANSWER.
Karthikeyan AnbarasanRank #71 · 25.5K reputationPosted Apr 7, 2011, 12:33 AM EDT
1. Set the Gridview to corresponding datasource propery.
2. Click on the Smart tag and choose edit columns, a fileds dialog will open.
3. Select the address column and Click on Convert this filed to template column,
4. Click ok.
5. Right click the Gridview , choose edit template, choose edit address.
6. Gridview will be changed in edit mode, then
7. under the Item template ,there wil be one Label control, delete that and place one textbox control and set multi-line property to true
8. This text box will have a smart tag, click on that you will see one editdatabindings .
9. A new dialog box will be opened and
10. In that, there is one drop dowm list next to Bound to label, select the corresponding Column [say address in your case]. 11. Say ok and run the page.