r1xliquid
Posts: 41
|
| Posted: 04/19/2007, 8:39 AM |
|
All,
I am trying to dynamically change the error message that shows when no records are returned to a grid.
I have placed a label inside of the HTML templateBlock "NoRecords" but no matter what i do the label is not visible. I have a default value set for the Label.
Has anyone had success doing this?
any help would be appreciated!
Brian
|
 |
 |
ducati996guy
Posts: 46
|
| Posted: 04/21/2007, 3:35 PM |
|
Are you sure there is an error being generated?
in the codecharge help, there is an example for custom errors. Doesnt require custom label just lets you put your own error in place of any that are generated.
If OrderForm.Errors.Count > 0 Then
OrderForm.Errors.Clear
OrderForm.Errors.AddError "This order cannot be processed. Please fix it."
End If
Hope this helps.
David
_________________
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
- Albert Einstein (1879-1955)
www.CustomerCommunity.com.au
|
 |
 |
r1xliquid
Posts: 41
|
| Posted: 04/23/2007, 6:33 AM |
|
Well, i am aware of the .addError property, but this isnt quite what i am looking for. That property is used when validating a search, inserting, updating, deleting... etc.
What i am refering to, is the table row that codeCharge displays when there are No Records returned from the DB. You can easily change the static HTML text to read whatever you want, but what if you want it to read:
1) "No records returned" (after a valid search)
OR
2) "Please enter search criteria" (for another situation)
Inserting a label inside the NoRecords block is not working for me.
|
 |
 |
CCT
Posts: 44
|
| Posted: 04/24/2007, 3:15 AM |
|
You could try inserting grid attribute (introduced in 3.1) there and setting it's value dynamically.
_________________
Get more CodeCharge Studio builders at http://codechargetools.com |
 |
 |
Wkempees
|
| Posted: 04/24/2007, 4:48 AM |
|
Using Internationalization, you could just change the text to be
displayed in the Project Explorer->Resources->EN.txt
Walter
|
|
|
 |
|