B
BJF
First time through on this, so I could use some help.
I'm having difficulty getting data from a stored procedure into a
DataGridView control in a Windows form. I'm using VS2005 and C#.
My test program has two DataGridView controls. One is populated via SQL
generated via drag/drop/property settings, and works like a charm. I'm
trying to do the same thing with the other, but using a stored procedure as
the source of the data. I know the stored procedure works, and it returns
the same data as the SQL in the first control. Nothing appears in the
control at runtime.
At design time, there are no columns automatically added to the control.
So, I tried to add them via the Columns collection. No column names
appeared in the DataPropertyName dropdown on the property sheet for my new
columns. I entered the field name for each of the new columns, but still no
luck.
Could someone provide a 'how to' on this, or maybe point me to where the
explanation is in the documentation?
Thanks in advance,
Ben
I'm having difficulty getting data from a stored procedure into a
DataGridView control in a Windows form. I'm using VS2005 and C#.
My test program has two DataGridView controls. One is populated via SQL
generated via drag/drop/property settings, and works like a charm. I'm
trying to do the same thing with the other, but using a stored procedure as
the source of the data. I know the stored procedure works, and it returns
the same data as the SQL in the first control. Nothing appears in the
control at runtime.
At design time, there are no columns automatically added to the control.
So, I tried to add them via the Columns collection. No column names
appeared in the DataPropertyName dropdown on the property sheet for my new
columns. I entered the field name for each of the new columns, but still no
luck.
Could someone provide a 'how to' on this, or maybe point me to where the
explanation is in the documentation?
Thanks in advance,
Ben