[flexcoders] Re: Validating items in DataGrids

2009-05-14 Thread Amy
--- In flexcoders@yahoogroups.com, foobone9 foobo...@... wrote: I would just create a custom item renderer who examines its own data and if it finds something it doesn't like it draws a red bordering using the drawing API in updateDisplayList. It might be simpler to use this:

Re: [flexcoders] Re: Validating items in DataGrids

2009-05-14 Thread nhid
Hi I also need to show the applicable error message to each of the error cell. So I use a renderer that extends Label since there's a errorString attribute for label. However, I keep getting dumped (application freezes) when I add in errorString. Any idea why? * package* { *import*

[flexcoders] Re: Validating items in DataGrids

2009-05-13 Thread foobone9
I would just create a custom item renderer who examines its own data and if it finds something it doesn't like it draws a red bordering using the drawing API in updateDisplayList. --- In flexcoders@yahoogroups.com, nhid nhi...@... wrote: Hi, I am also working on this problem, does anyone

Re: [flexcoders] Re: Validating items in DataGrids

2009-05-13 Thread nhid
Hi, I am also working on this problem, does anyone has an idea how to draw the red border when validation failed on a field in the datagrid? Thanks for any help. Nhi On Fri, May 8, 2009 at 2:50 PM, Ravi Suda sudaraviku...@yahoo.com wrote: John, I am working on a similar requirement. I want

[flexcoders] Re: Validating items in DataGrids

2009-05-08 Thread Ravi Suda
John, I am working on a similar requirement. I want to show the mandatory fields in datagrid as a validation error(red border). Could you provide your custom item renderer that you created. Thanks in Advance Ravi --- In flexcoders@yahoogroups.com, j_lentzz jele...@... wrote: True.

Re: [flexcoders] Re: Validating items in DataGrids

2007-09-19 Thread Roman Protsiuk
I remember I did it like this: public class FilesDataGridColumnEditor extends TextInput { public function SomeDataGridEditor() { _validator.source = this; _validator.triggerEvent = change; _validator.required = true; _validator.property = text; }

[flexcoders] Re: Validating items in DataGrids

2007-09-19 Thread j_lentzz
I'm doing something like that right now for the individual cells. I've integrated a validator into the cell object. However, I need to be able to validate the complete datagrid when the save button is pressed. If the user never moves to a cell, I can't use the itemEditEnd to validate, I need to

Re: [flexcoders] Re: Validating items in DataGrids

2007-09-19 Thread Roman Protsiuk
Then all you need is dataProvider. Validate items held in there. And change some property of the item that indicates whether it's valid or not. Then item renderer easily can draw something bad basing on that info. R. On 9/19/07, j_lentzz [EMAIL PROTECTED] wrote: I'm doing something like that

[flexcoders] Re: Validating items in DataGrids

2007-09-19 Thread j_lentzz
True. Good idea. I've already coded the method to increment a counter to display number of failed items. I'll modify the item renderer too and see what appears. Thanks, John --- In flexcoders@yahoogroups.com, Roman Protsiuk [EMAIL PROTECTED] wrote: Then all you need is dataProvider.

[flexcoders] Re: Validating items in DataGrids

2007-09-18 Thread merelypixels
seems to me that no mucking about with itemEditors is necessary... extract the data you need from your dataProvider and then validate that data directly before sending it on. If you want the little red validation things, you should probably validate on a field by field basis using the dataGrids