solo17 0 Newbie Poster

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.