DataGridView Column Cell Style Formatting

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2007
Posts: 1
Reputation: solo17 is an unknown quantity at this point 
Solved Threads: 0
solo17 solo17 is offline Offline
Newbie Poster

DataGridView Column Cell Style Formatting

 
0
  #1
Jul 17th, 2007
I just have a general question regarding column formatting using the DataGridView. I've connected to a database and bound a datatable into an object that I've instantiated of type DataSet. I've proceeded to create new DataColumns and add them to the DataSet before I populate the cells in any of the newly created columns. Once I've populated the entire DataSet, I use the DataGridView to display the table and its values. However, for particular columns I need to standardize the level of precision to 3 decimal places. I've been able to do this for the columns of the DataTable that I imported initially, but I haven't been able to do that for the DataColumns that I've created and added to the DataSet. The way I've done it is to create a new DataGridViewCellStyle and change the DefaultCellStyle for each column to the new formatting. Any help on this would be much appreciated
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC