Hi,
I have a datagrid that when the user enter a code, on the closefieldeditor I query the database to retrieve the name and the price. This work fine.
Now I need a massive data enter, so I have a lot of codes and I want add manually to the datagrid and call the closefieldeditor for each line that I add.
My question is: How can I send "closefieldeditor" to the cell? Make sense?
A read the documentation and forums but I don't find any solution.
Salut,
Josep M
datagrid: send closefieldeditor
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: datagrid: send closefieldeditor
Hi.
Can't you trap, say, "mouseUp", get the target, and send "closeFieldEditor"?
A dataGrid sends just about eight million messages when you even go near it, but it does send the regular ones as well.
Craig Newman
Can't you trap, say, "mouseUp", get the target, and send "closeFieldEditor"?
A dataGrid sends just about eight million messages when you even go near it, but it does send the regular ones as well.
Craig Newman
Re: datagrid: send closefieldeditor
Hi Josep,
I'm not quite sure what you want to do but it sounds like you have a one time task to load a lot of data into the datagrid - is that right?
You could use 1 SELECT statement to get all the codes, their names and prices you want to load into the datagrid, then set the dgText of the datagrid to what comes back from the SELECT, no need to use the closeFieldEditor handler.
Sorry if I'm misunderstanding what you need, if so let me know and I'll try to come up with a different solution.
Pete
I'm not quite sure what you want to do but it sounds like you have a one time task to load a lot of data into the datagrid - is that right?
You could use 1 SELECT statement to get all the codes, their names and prices you want to load into the datagrid, then set the dgText of the datagrid to what comes back from the SELECT, no need to use the closeFieldEditor handler.
Sorry if I'm misunderstanding what you need, if so let me know and I'll try to come up with a different solution.
Pete
Re: datagrid: send closefieldeditor
Hi,
Thanks for the answers.
Yes. I have a massive code bar data entry, where only I get the codes for. My first idea was call the closefieldeditor but I don't found the way to do that so for each code I add by script a row, so I can't trap the "mouseup" nor the target.
The solution was, as Pete say, perform the queries and prepare an array and dispatch "AddData" to the datagrid with the array.
Now I need improve the speed of addData so is a little slow. Now I add row by row, and I will try to create an array with all the rows and pass to the datagrid.
Salut,
Josep M
Thanks for the answers.
Yes. I have a massive code bar data entry, where only I get the codes for. My first idea was call the closefieldeditor but I don't found the way to do that so for each code I add by script a row, so I can't trap the "mouseup" nor the target.
The solution was, as Pete say, perform the queries and prepare an array and dispatch "AddData" to the datagrid with the array.
Now I need improve the speed of addData so is a little slow. Now I add row by row, and I will try to create an array with all the rows and pass to the datagrid.
Salut,
Josep M