DrivenTooFar
Posts: 10
|
| Posted: 05/08/2007, 12:58 PM |
|
I am trying to get my editable grid to not insert rows if there are null values in it. For instance, I have 4 empty rows. Someone decides to enter information into 2 of the rows, leaving the other two empty. What it will do is insert all 4 rows, 2 with info, 2 with nulls. What I want to do is have it only insert the 2 with information. Does anyone know how to resolve this?
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 05/08/2007, 1:13 PM |
|
If the two empty rows are Inserted than they are not considered empty by the editableGrid.
Sometimes caused by calculated fields, hidden fields, and the likes.
If you have a multitable SQL as basis, then there might be a problem in the custom insert setting defaults
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 05/08/2007, 3:37 PM |
|
There is not a direct way of doing this within the CodeCharge events,
because it is an all or nothing.
However, you could manually modify the generated methods to accomplish what
you want.
Assuming you are using php, go to your pagename.php file.
Search for function UpdateGrid().
You can mnanually modify to check for valid field before the:
if ($this->UpdatedRows >= $RowNumber) {
Such as
if ($this->fcontrolname->Value == '') {
continue;
}
OR you could do it in the catual methods which are called, such as
InsertRow($RowNumber)
|
|
|
 |
DrivenTooFar
Posts: 10
|
| Posted: 05/14/2007, 7:11 AM |
|
Thank you for your responses with this problem. I now have a new problem. I am trying to get my Editable Grid to display the information that was entered earlier on a finished page. I am trying to get this to happen with a Request.Querystring with an ID but all it returns are the first enteries in the database. I can do this with a record and it works fine but it will only display one set of information instead of up to 4, which is why I chose the editable grid. Is there a way to solve this with either a reocrd or an editable grid? Thanks.
|
 |
 |
DrivenTooFar
Posts: 10
|
| Posted: 05/14/2007, 7:49 AM |
|
Nevermind, I'm going to use a grid on this one.
|
 |
 |
|