M
mateo
Hello i have two tables (Groups and Users) bound each one to a
BindingSource like this
this._bindingEntrepriseGrp.DataSource = MyDataSource;
this._bindingEntrepriseGrp.DataMember = "CustomerGroups";
this._bindingEntrepriseUsr.DataSource = this._bindingEntrepriseGrp;
this._bindingEntrepriseUsr.DataMember = "CustomerGroups_CustomerUsers";
I'm bouding the second one (Users) with a relation to the first one
named "CustomerGroups_CustomerUsers"
Now the groups are shown in a TreeView that i populate myself
recursively keeping in the Tag of each TreeNode the corresponding
DataRow. Users are shown in a DataGridView. when the selected TreeNode
change i must show all users belonging to this group in the
DataGridView. I tried something like this
this._bindingEntrepriseGrp.Position =
this._bindingEntrepriseGrp.IndexOf(dr);
where dr is the DataRow stored in the Tag property of the
selectedTreeNode but nothing happen??
What is wrong ?
Also, Is there a way of addind manually sone rows to the DataGridView
(cause i must show all child groups of the selected group in the the
grid)??
Thanks in advance
mateo
BindingSource like this
this._bindingEntrepriseGrp.DataSource = MyDataSource;
this._bindingEntrepriseGrp.DataMember = "CustomerGroups";
this._bindingEntrepriseUsr.DataSource = this._bindingEntrepriseGrp;
this._bindingEntrepriseUsr.DataMember = "CustomerGroups_CustomerUsers";
I'm bouding the second one (Users) with a relation to the first one
named "CustomerGroups_CustomerUsers"
Now the groups are shown in a TreeView that i populate myself
recursively keeping in the Tag of each TreeNode the corresponding
DataRow. Users are shown in a DataGridView. when the selected TreeNode
change i must show all users belonging to this group in the
DataGridView. I tried something like this
this._bindingEntrepriseGrp.Position =
this._bindingEntrepriseGrp.IndexOf(dr);
where dr is the DataRow stored in the Tag property of the
selectedTreeNode but nothing happen??
What is wrong ?
Also, Is there a way of addind manually sone rows to the DataGridView
(cause i must show all child groups of the selected group in the the
grid)??
Thanks in advance
mateo