Hi
I have placed a binding source and a datagridview onto a form. What I am trying to do is, selecting multiple lines and then process them. for example setting a field in the selected rows to the same value.
In the old adm world it was num-selected-row and fetch-selected-row.
How can I do that?
Architect 10.2B SP04
Kind regards
Thomas Rothlisberger
Hi Thomas,
Welcome to data binding! Actually this scenario is easier with binding.
The idea is to bind the datagridview to a prodataset. Make sure TRACKING-CHANGES is set to true while the user makes changes.
The dataset automatically collects all the changes and you can process them independently of the user interface, e.g. on an AppServer.
I have no experience with the microsoft datagridview as we always use the UltraGrid. By using the ErrorProvider you can even display individual validation messages for each line in the Grid.
HTH
-peter
Hi Peter
Unfortunatelly it doesn't help me. BTW, my datagridview is bound to a dataset.
what I have done so far is creating a method for a button.
Method private void toolstripbutton_click (....
def var iirows as int no-undo.
iirows = brwDataGridview:SelectedRows:count.
do ii = 1 to iirows:
/* fetch row and do something */
end.
end Method.
Oops now I see that I misunderstood your question .
Message was edited by: Peter van Dam
What I am trying to say is that you should process the dataset rather than the grid.
If processing means to modify data, than yes, you are right.
But if the user needs to select a number of records and drag then somewhere else, it's a UI thing and you first need to know which 5 out of 100 rows are selected in the grid. Or how do you handle these things?