Sigma Php Ajax framework, Ajax Components, GUI Builder
February 09, 2012, 11:41:52 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Proper way to use the grid  (Read 860 times)
Norb
Newbie
*
Posts: 2


View Profile
« on: June 25, 2010, 09:18:54 AM »

I am finding the grid very flexible, but I think that there are some things that I am doing wrong.

My first problem is that there seems to be a limit to the size of things to save.  I have a rather large database and when I try to save too many rows, the getUpdatedRecords returns nothing.

Here is what I am doing, perhaps there is a better way to do it.

I am using the grid like excel.  I use the renderer property of the grid for calculations based on other cells.

column A: 5
column B: 11
column C: A+B: 16

So I have a renderer for column C, that shows the proper output.  Problem is that since it's a renderer, it does not mark the row dirty.  In the renderer I save the record, record['C'] = A+B, I cannot call the proper update function here because that fails.

So although column C = A+B, I still have a field for C in mysql and I need to save the result in there.  But I also need to see the calculation in the grid.  So the renderer works as I expect.  I think code my own save that goes and marks every row in my grid dirty 'forEachRow setCellValue' and then saves the grid.  This works for smaller datasets, but when it gets too large the getUpdatedRecords comes back empty.

So my question is: is this the way I should be doing this type of functionality?  Is there a way to fix the getUpdatedRecords even with a rather large number of columns?

Logged
steven
Moderator
Hero Member
*****
Posts: 546



View Profile
« Reply #1 on: July 01, 2010, 04:44:14 AM »

I believe you should use a formular field instead of renderer to do it.
Because renderer is something to show data to end user, which will not be post to server side.
see http://www.sigmawidgets.com/products/sigma_grid2/demos/example_formular.html
Logged

Sigma AJAX Data Grid - Easy to Integrate with PHP, ASP Classic, ASP.NET & Java
Sigma PHP Ajax Framework - WYSIWYG GUI Builder With Tree, Grid, Treegrid, Dialog, Tab & More Component
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!