Audsimous
asked on
REfreshing a datagrid attached to a command
Here's the buig thing.
I want to attached dynamic filters to a datagrid.
As the user modifies those filters, I change the sql command of the command attached to the grid.
But the grid wont refresh...
How do I refresh it ???
I tried to execute the command, but i receive an error tellin me the object is open...
I want to attached dynamic filters to a datagrid.
As the user modifies those filters, I change the sql command of the command attached to the grid.
But the grid wont refresh...
How do I refresh it ???
I tried to execute the command, but i receive an error tellin me the object is open...
ASKER
not using an adodc object... directly attached to a dataenvironnement
ASKER
not using an adodc object... directly attached to a dataenvironnement
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
not using an adodc object... directly attached to a dataenvironnement
ASKER
Still does'nt work... :
If cboRegionMemo <> "Toutes" Then
If Right(strCritere, 6) <> " WHERE" Then strCritere = strCritere & " AND "
strCritere = strCritere & " region = '" & cboRegionMemo & "' "
End If
If Right(strCritere, 6) <> " WHERE" Then dataServices.Commands(2).C ommandText = dataServices.Commands(2).C ommandText & strCritere
'REfresh
dataServices.Commands(2).C ommandText = dataServices.Commands(2).C ommandText & " ORDER BY interne"
dgServices.DataMember = "cmdMemos"
dataServices.rscmdMemos.Re query
Set dgServices.DataSource = dataServices
--------------------------
Plz fix
If cboRegionMemo <> "Toutes" Then
If Right(strCritere, 6) <> " WHERE" Then strCritere = strCritere & " AND "
strCritere = strCritere & " region = '" & cboRegionMemo & "' "
End If
If Right(strCritere, 6) <> " WHERE" Then dataServices.Commands(2).C
'REfresh
dataServices.Commands(2).C
dgServices.DataMember = "cmdMemos"
dataServices.rscmdMemos.Re
Set dgServices.DataSource = dataServices
--------------------------
Plz fix
ASKER
Finally... thx!
adodc1.recordsource and then
Adodc1.Refresh