| | |
DataGridView Column Cell Style Formatting
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2007
Posts: 1
Reputation:
Solved Threads: 0
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
![]() |
Similar Threads
- Collapsible table sorting problem (JavaScript / DHTML / AJAX)
- javascript works in IE but not working in firefox (JavaScript / DHTML / AJAX)
- can anyone make this tree table sort correctly? (JavaScript / DHTML / AJAX)
- How can i make perticular row or perticular cell of a JTable as Editable dynamically (Java)
- HOWTO: Run a Query on a Database using ODBC and return all Results into a DGV Object (C#)
- Many problems using ASP and Excel (ASP)
- Burned by mutability (Python)
- how many posts do you make a day (average) (DaniWeb Community Feedback)
- Suggestions for my web hosting news site? (Growing an Online Community)
Other Threads in the C# Forum
- Previous Thread: c# publish problem
- Next Thread: Custom UserControls Throwing Events Up the Hierarchy
| Thread Tools | Search this Thread |
.net access ado.net algorithm array backup barchart bitmap box broadcast buttons c# check checkbox client clock color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing dynamiccreation encryption enum event excel file form format forms function gdi+ hospitalmanagementsystems httpwebrequest image index input install interface java label list listbox mandelbrot math microsystems mouseclick mysql operator password path photoshop picturebox pixelinversion post programming property radians regex remote remoting richtextbox running... serialization server sleep soap socket sql sqlserver stack statistics stream string table text textbox thread time timer update usercontrol validation visualstudio webbrowser windows winforms wpf write xml





