ousoonerjoe
Programmer
Does anyone have a good way to covert a DataRow and a DataGridViewRow back and forth? Depending on the direction of data, is the direction needed and I'm just getting irritated with the bulky IF statements and conversions.
Problem is I have a grid that may or may not have a DataSource loaded at the time of data entry. Various options will insert a row to the grid with predefined values. If the DataSource is loaded, then a DataRow is needed to import to the DataTable. If not, then a DataGridViewRow is needed to add to the DataGridView.
Any suggestions are welcome.
--------------------------------------------------
“Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month.” --Wernher von Braun
--------------------------------------------------
Problem is I have a grid that may or may not have a DataSource loaded at the time of data entry. Various options will insert a row to the grid with predefined values. If the DataSource is loaded, then a DataRow is needed to import to the DataTable. If not, then a DataGridViewRow is needed to add to the DataGridView.
Any suggestions are welcome.
--------------------------------------------------
“Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month.” --Wernher von Braun
--------------------------------------------------