Re: Datagrid Help

2015-03-12 Thread Sri
1. Load data from the database into tArray.

2. Set the dgData of the data grid to tArray to display the data.
Make a back up of the initial data to tBackupArray.

3. After the user edits the data in the data grid, say, he clicks a button
Save
Write the dgData of the data grid to the database.

4. If the write is successful, put the dgData of the data grid into
tBackupArray.
If the write is unsuccessful, set the dgData of the data grid to
tBackupArray.

Regards,
Sri




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Datagrid-Help-tp4690006p4690012.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Datagrid Help

2015-03-12 Thread Jim Schaubeck
Sri,
Thank you for the response and I wish I would have explained a bit more.  I
need to update the database one cell at a time preferably on some sort of
closeField type of message.  I have multiple users updating the same
payroll grid at the same time.  If I save the entire grid at once, I would
erase changes made (at the same time) to other cells in the grid.

Your method is simple to code yes but I need more granularity in what
changes I save and when.  I would like to trigger a save to db when I see a
closeField type of message.  This is what I do when I roll my own
datagrid.  My home made datagrids never look as good or work as well when
scrolling as the LC Datagrid.

Thank you

On Thu, Mar 12, 2015 at 5:28 AM, Sri sri...@gmail.com wrote:

 1. Load data from the database into tArray.

 2. Set the dgData of the data grid to tArray to display the data.
 Make a back up of the initial data to tBackupArray.

 3. After the user edits the data in the data grid, say, he clicks a button
 Save
 Write the dgData of the data grid to the database.

 4. If the write is successful, put the dgData of the data grid into
 tBackupArray.
 If the write is unsuccessful, set the dgData of the data grid to
 tBackupArray.

 Regards,
 Sri




 --
 View this message in context:
 http://runtime-revolution.278305.n4.nabble.com/Datagrid-Help-tp4690006p4690012.html
 Sent from the Revolution - User mailing list archive at Nabble.com.

 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode




-- 
 

 jim schaubeck jschaub...@gmail.com
jischaub...@gmail.com714-321-4499
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Datagrid Help

2015-03-12 Thread Peter Haworth
Hi Jim,
It's pretty complicated to explain on the list but you can certainly do
that. Take a look at the Datagrid Manual section titled How Do I Open A
Table Cell For Editing.  It tells how how to grab the data after the user
has finished editing a cell and do whatever you need to do with it.

On Thu, Mar 12, 2015 at 3:30 PM Jim Schaubeck jimschaub...@yahoo.com
wrote:

 Sri,
 Thank you for the response and I wish I would have explained a bit more.  I
 need to update the database one cell at a time preferably on some sort of
 closeField type of message.  I have multiple users updating the same
 payroll grid at the same time.  If I save the entire grid at once, I would
 erase changes made (at the same time) to other cells in the grid.

 Your method is simple to code yes but I need more granularity in what
 changes I save and when.  I would like to trigger a save to db when I see a
 closeField type of message.  This is what I do when I roll my own
 datagrid.  My home made datagrids never look as good or work as well when
 scrolling as the LC Datagrid.

 Thank you

 On Thu, Mar 12, 2015 at 5:28 AM, Sri sri...@gmail.com wrote:

  1. Load data from the database into tArray.
 
  2. Set the dgData of the data grid to tArray to display the data.
  Make a back up of the initial data to tBackupArray.
 
  3. After the user edits the data in the data grid, say, he clicks a
 button
  Save
  Write the dgData of the data grid to the database.
 
  4. If the write is successful, put the dgData of the data grid into
  tBackupArray.
  If the write is unsuccessful, set the dgData of the data grid to
  tBackupArray.
 
  Regards,
  Sri
 
 
 
 
  --
  View this message in context:
  http://runtime-revolution.278305.n4.nabble.com/Datagrid-
 Help-tp4690006p4690012.html
  Sent from the Revolution - User mailing list archive at Nabble.com.
 
  ___
  use-livecode mailing list
  use-livecode@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your
  subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-livecode
 



 --
  
 
  jim schaubeck jschaub...@gmail.com
 jischaub...@gmail.com714-321-4499
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Datagrid Help

2015-03-12 Thread Sri
As Peter points out
http://lessons.runrev.com/m/datagrid/l/7337-how-do-i-save-changes-the-user-makes-in-an-editor-field-to-an-external-data-source
explains how you can
i) override EditFieldText with only one parameter, in which case it won't
automatically save and refresh the data grid, but you'll have to
ii) edit closeFieldEditor to write to the database and, if successful,
update dgData and then set it, which will refresh datagrid.

But, wouldn't the problem remain, that other users simultaneously updating a
(different) cell of the datagrid would lose their edits as soon as you save
one edited cell and refresh the datagrid (by setting the dgData)?

Each user editing a copy of the datagrid would likely resolve this problem. 

Regards,
Sri



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Datagrid-Help-tp4690006p4690066.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Datagrid Help

2015-03-11 Thread Jim Schaubeck
Folks,
I would like to use the Datagrid to allow users to:

1) Display data like a spreadsheet
2) Let the user edit the data
if the data is changed I would like to update a remote database with
that cells update
If the database update was successful, I would update the data in the
Datagrid
If the database update was *not* successful, I would like to return to
the old value.

Pretty straight forward

I can build my own data grid but it seems cleaner to use the Datagrid in
LC...I just *CAN NOT* figure this thing out.

I've built my own data grid in the past and I am very familiar with the
database side...just not able to get the Datagrid thing going.

I've been through the lessons so I must be just missing something

Thank you!
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Datagrid Help

2015-03-11 Thread dunbarx
Hi.

DG's are mysterious. But perhaps you can give some examples of what you are
up against?

Craig Newman



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Datagrid-Help-tp4690006p4690007.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: DataGrid Help - Registering the product

2013-05-18 Thread John Dixon
I think that it would be best if you contact the author...'zyrip the slug'... 
If you don't have an email for him then support at runrev should be able to 
supply you with it...

 From: nig...@amglighthouse.co.za
 Subject: RE:DataGrid Help - Registering the product
 Date: Sat, 18 May 2013 11:06:20 +0200
 To: use-livecode@lists.runrev.com
 
 I'm SO ANGRY... I purchased DataGrid helper and found that I cant register it 
 on V5.5.4 (Personnel). When doing some research on the product, no where did 
 it mention that it can't be used on the personnel version. OR have I got it 
 wrong!
 
  
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
  
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: DataGrid Help - Registering the product

2013-05-18 Thread zryip theSlug
Dear Nigel,

I'm going to contact you off-list and we will explore this together.



On Sat, May 18, 2013 at 11:06 AM, Nigel Soden nig...@amglighthouse.co.zawrote:

 I'm SO ANGRY... I purchased DataGrid helper and found that I cant register
 it on V5.5.4 (Personnel). When doing some research on the product, no where
 did it mention that it can't be used on the personnel version. OR have I
 got it wrong!




 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode




Best Regards,
-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Datagrid help - change value in form

2013-01-17 Thread Robert Sneidar
I think you have to get the array corresponding to the row, change the value 
for the key corresponding to the cell, then set it back again. 

put the dgDataOfIndex [ pIndex ] of group DataGrid into pDataA
put This is new data into pDataA[ newdata ]
set the dgDataOfIndex [ pIndex ] of group DataGrid to pDataA

You can substitute Index with Row if that is what you are working with. 
Bob


On Jan 16, 2013, at 7:38 PM, Gerry Orkin wrote:

 Hi all
 
 I've only just got my head around datagrids (and I'm loving them), but I 
 can't find an easy way to update a field in a specific row in a form. I know 
 which row needs to change, but I don't have that row highlighted. As far as I 
 can see all the examples in the documentation assume you have the row 
 highlighted.
 
 Your help appreciated :)
 
 Gerry
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Datagrid help - change value in form

2013-01-16 Thread Gerry Orkin
Hi all

I've only just got my head around datagrids (and I'm loving them), but I can't 
find an easy way to update a field in a specific row in a form. I know which 
row needs to change, but I don't have that row highlighted. As far as I can see 
all the examples in the documentation assume you have the row highlighted.

Your help appreciated :)

Gerry
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode