Adobe Dreamweaver Forums



Last 10 THreads :         Importing Iweb to Dreamweaver (Last Post : tllearner - Replies : 2 - Views : 3 )           »          How to I get an FLV Skin to display on external sites? (Last Post : QADesign - Replies : 0 - Views : 1 )           »          Spry menu bar with a different image for each item? (Last Post : bongalook - Replies : 0 - Views : 1 )           »          Live View doesn't reflect changes to script (Last Post : phillip914 - Replies : 0 - Views : 1 )           »          Table cell - text formatting question (Last Post : JRStaf4ord - Replies : 7 - Views : 8 )           »          Library documents do not accept SWF objects (Last Post : Murray *ACE* - Replies : 2 - Views : 3 )           »          Snippet Pod Problems (Last Post : Pat@ffic - Replies : 0 - Views : 1 )           »          CFGRID, please help (Last Post : The ScareCrow - Replies : 1 - Views : 2 )           »          How can I make an image to stay at the bottom of abrowser? (Last Post : Greg Lafrance - Replies : 1 - Views : 2 )           »          Change custom Vector class to new Vector class in player10 (Last Post : flexstone - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-04-2008, 09:02 AM
trisweb
 
Posts: n/a
Diggs:
Default DataGrid custom header renderer issues

I'm trying to create a DataGrid headerRenderer with a TextInput to filter the
grid from the column. The custom renderer simply has a label (with the column
header label) and then a text input, and it's all in AS, implementing IFactory,
etc. It's rendering just fine.

The issue is with the filtering - at first, I tried just adding the text box,
but as soon as I typed anything in it, the filtering logic (which must call
dataProvider.refresh() to refresh the dataGrid) caused the header to be
re-instantiated, thereby clearing the filter text input field. I later worked
around this by caching the TextInput objects elsewhere, and having the header
simply addChild on them.

However, the issue still gets in the way. The headerRenderer is reinstantiated
twice per call to refresh(), causing it to blink, and if the user types too
fast, it throws a RTE because the components haven't been instantiated yet.

Is there a way to stop this incessant re-initialization of the headerRenderer?
It doesn't seem necessary or efficient. If anyone knows or wants to help I
would be very grateful. Thanks!



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-04-2008, 09:02 AM
rtalton
 
Posts: n/a
Diggs:
Default Re: DataGrid custom header renderer issues

This may be caused by the TextInput event you are using to call the filtering
method. Are you call your filtering method from the TextInput's change event,
perhaps? If so, each character being typed will call the filter method. Call
your filtering method from the valueCommit event, and see if that helps.

Put a break on the first line of your filter method, debug the app, start
typing into the TextInput and watch what happens. If the filter method is
called multiple times this could be the problem.

Be sure you don't call the filter method until the typing is completed.

Reply With Quote
  #3 (permalink)  
Old 11-04-2008, 09:02 AM
trisweb
 
Posts: n/a
Diggs:
Default Re: DataGrid custom header renderer issues

That makes sense, but I had really wanted to attach it to the keyUp event so
that it would filter on each keystroke. Filtering on some submit action or once
the full input is complete is an acceptable compromise.

Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 10:37 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk