Hi Eric,
According to what I understand you have a datagridview in a usercontrol and you are not able to bind the dataset in the derived form to this datagridview.
Make the control in usercontrol available to derived form by making that control public like,
public DataGridView CommonGridView
{
get
{
return _gridView;
}
}
This needs to be written in the base class.
Then the datagridview will be available in the derived class.You can now add the datasource and all by doing something like this,
private void FormatUserGrid()
{
DataView dv = new DataView();
dv.Table = _loginDs.Tables[0];//The dataset _loginDs is assigned to a dataview
DataGridViewTextBoxColumn uname = new DataGridViewTextBoxColumn();
uname.HeaderText = "user";
uname.Name = "username";
uname.DataPropertyName = "username";
dataGridViewUserControl1.CommonGridView.Columns.Add(uname);
//DataGridViewUserControl1 is the UserControl made
dataGridViewUserControl1.CommonGridView.DataSource = dv;
}
To get the events for the datagridview they need to be added as public in the usercontrol and use them at the derived form.
Cheers..
_____________________________
http://techisolutions.blogspot.com/