autosize DataGrid column

T

Tim Wallace

I'm using Visual Studio 2003. Is there a way one can cause columns in a
DataGrid to autosize? Also, is there a way to cause the last column to take
up the remaining space between the end of the column and the right edge of
the DataGrid? And finally, is there a way to remove the row that permits a
user to add data? I looked in the Help, but was unable to discern the
answers to the aforementioned questions.

Tim
 
N

Nicholas Paldino [.NET/C# MVP]

Tim,

I don't think there is a way to perform the sizing operations you
specified. If anything, you would have to perform all of the calculations
yourself, and then apply it to the size.

As for removing the final row that permists a user to add data, bind to
a DataView on your table, setting the AllowNew property on the view to
false.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top