Datagrid scrolling madness
Hi all.
I am trying to get a container to scroll when a datagrid is
scrolled.
Is there any easy way to do this.
I am aware of the h and v scrollposition properties but the
difference in how the datagrid scrolls causes the two items to
scroll out of synch.
Any help is greatly appreciatted
Hi, you can do this by percentage. Here's an example
(right-click to view source):
http://www.anaheimjobs.net/samples/linkscroll/
Hope you find it useful.
Similar Messages
-
Datagrid scrolls on change or click event - why?
Hi,
How do I stop my datagrid scrolling one line when I click on the top row?
This happens with change, itemClick, and itemDoubleClick.
It does not scroll on rows other than the top row.
private function columnClick(e.ListEvent):void
if e.columnIndex==0)
DataGrid id= "dg" change="columnClick(event)"
Any help would be much appeciated.
Ian.You can only accept invitations and send invitations from the Calendar app, with an MS Exchange account on the iPhone.
-
Spark DataGrid scrolling performance problems with debugger
So, i have a DataGrid using the latest SDK (4.5.1) with 500 rows of data and 14 columns. I'm not using any custom ItemRenderers at all; the data is just string and number properties of each data object in an ArrayCollection. When I try to scroll vertically, either by clicking on the scrollbar handle and dragging or by using the arrow buttons, the performance degrades so badly that the application appears to freeze up completely for a few seconds. (I'm on OS X, and I see the spinning beachball icon.) The app then remains so unresponsive as to be pretty much unusable.
The exception to this is when, rather than launching the app as a debug configuration, I just refresh the page so the swf can run without the debugger attached. Detached from the debugger, the performance is great, every time. This is, BTW, using the very latest build of Flash Builder 4.5 Pro; I just installed it last week.
I've tried eliminating various possible causes, and haven't had any luck. I made the data non-bindable, removed all the custom skins and css styling, and even removed event listeners from the DataGrid; none if it seems to make a difference.
Has anyone else noticed this issue? Is there a workaround? If the debugger is to blame (which seems likely), is there some setting that I can turn on or off that will help?
Thanks!
MichaelHi Michael!
Few days ago I've had the same issue.
My configuration:
Windows 2008 server (i'm working on remote desktop)
Flex SDK 4.5.1
Firefox 8.0 (on Explorer was ok).
Flashplayer version 10.2.153.1
It happened to me only that day (run without debugger, restart application didn't work), but it seems that when I log out from Windows and log in again the problem disappeared.
Best regards
Tom -
Hi guys,
I know this question's been asked before, but none of the
solutions work for me. Here's the situation...
I'm updating a datagrid regularly, and then setting it's
vertical scroll position = max vertical scroll position. Which is
fine for the most part.
However, when rows are more that one line long, it messes up,
and never shows the whole of the last row.
I've tried calling datagrid.validateNow(); before I do the
position setting, and also tried setting an updateComplete event
that will run the position update in a callLater();
Any ideas for other things to try?
Thanks!With DataGrid, the verticalScrollPosition can use the row
index. So try:
dg.verticalScrollPosition = dg.dataProvider.length;
Or something close to that.
Tracy -
I'm trying to create a contact search/selection component
that works somewhat like a combobox (more like SuperComboBox
http://blog.strikefish.com/blog/index.cfm/2008/3/21/Flex-Smart-Combo-aka-look-ahead-combo
See sample at
http://www.eval.rmc.psu.edu/dgt/DataGridTest.html
Source view is enabled.
Basically, after the user types a few characters of the last
name, a datagrid (separate component) is popped up and presents a
list of matching contacts. The component includes view edit add
buttons, too (which are not active in the included example).
This all works great except for a couple of problems with the
popped up datagrid. I've tried both the standard and advanced dg's
and the both act the same.
If the number of rows returned exceeds the area of the
datagrid (12 rows in the example), the datagrid, as expected,
displays a vertical scroll bar. The scrollbar/datagrid doesn't work
properly at that point, though. Clicking the down arrow or in the
scrollbar track or the down arrow DOES NOT scroll the data.
Grabbing the slider bar and dragging it down DOES scroll the data
down. However, when I do scroll down using the slider, clicking on
a row does not fire the itemClick event, and the grid scrolls up to
the first 12 lines and highlights a row in the first 12 rows. CLICK
does get fired but always returns a row between 1 and 12.
Now, ideally, the user is going to type 3 or 4 characters of
the last name and zero right in on the contact they're looking for
without the need for scrolling, but there are always the outliers
like 'Smith' that return a large number hits (the example uses PA
Legislators offices, so it's not quite representative of the
end-use data set). Regardless, the datagrid object doesn't appear
to work correctly when it's a component -- I'm not sure if it's a
bona fide bug, or the whether it's that the grid is a component,
contained in a canvas, or being popped up that's the problem. More
likely, my flex newbie self just doesn't have some vital attribute
set correctly, or I'm doing something else that's not correct.
Any insights would be greatly appreciated.
Thanks,
want-a-dw
Sample code included.
Windows XP SP2
Flex Builder 3.0.205647
Same results with these browsers/player versions.
Firefox 2.0.0.17, Flash Player 9.0.124.0 (and 9.0.115.0)
IE 6.0.2900.2180, Flash Player 9.0.124.0 (and 9.0.115.0)
Chrome 0.2.149.30, Flash Player 9.0.124.0> That is definitely incorrect behavior.
> Does this happen in a simple test app? I think I have an
example I can try with, I will post back what I find.
Yes. There is an example of the behavior at
http://www.eval.rmc.psu.edu/dgt/DataGridTest.html
and source code view is enabled. Thanks for your help. -
Datagrid scrolling problem when different items are in the same column
I have a datagrid which I am populating with different items (LinkButtons, Images, Labels). However when there are different types of items in the same column and when i try to scroll everything gets messed up (Images get overlapped with each other or the labels get overlapped with images).
I am overloading the "IDropInListItemRenderer" to create different types of items in each cell and I am overloding the "updateDisplayList" function
Any ideas as to why the items get messed up during scrolling? Is there some other preperty of IDropInListItemRenderer that should be overloaded?Hi Subeesh Arakkan,
Thanks. This is the exact problem that I have. Althought my overloaded functions are a little different and Im trying to resolve it. But htis is a good lead.
Thanks,
Prashanth -
DataGrid scroll positions resetting with dynamic dataprovider
Hi - I have a DataGrid that is backed by an ArrayCollection
that is fairly dynamic. Before doing my updates, i disable
autoupdating, and though my size is typically fixed at 100 items,
sometimes those items will be replaced. My problem is that a user
who has scrolled down the visible grid, will lose their scroll
position when i replace items. If i'm just doing updates on the
existing objects, it's fine, but the replace is causing the scrolls
(both horizontal and vertical) to reset. I've tried to isolate
where this is happening (whether set verticalScrollPosition or on
the bookmark) and i can't quite find it.
Anyone know how i can prevent this behavior? I've tried
capturing the scoll position before i begin my updates, and then
setting it back when finished, but it doesn't work.
Thanks.
./paulActually, I spoke too soon. I had a number of things I was
trying. And when i tried to clean up the other things that I
believed were extraneous (including an override of
makeColumnsAndRows), the vertical scroll resetting stopped working.
I've spent about 90 minutes trying to get back to where I was (wish
the builder was in IntelliJ!).
When it was working, I also tried to add horizontal scroll
capturing, and that didn't seem work either. I have 34 columns, the
first one is locked. When I captured my position, I saw it was 11.
Then i performed the update, and callLater my resetScroll position.
The first column i saw after the locked column is correct. However,
the scroll bar itself is fully left. On the next update I captured
a horizontal scroll of zero.
./paul -
Hi again,
Using Beta 3. I've got a datagrid control with a series of
data elements on it. When the user selects an item in the grid, I
have a canvas that I show over the bottom third of the grid that
gives details about the selected item. The problem is that I would
like the selected grid item to become the first
visible item in the grid. This is especially important in
those instances where the user selects an item that is in the
bottom third of the grid and which gets covered by the canvas when
they select that item.
So, is there any way to force scrolling of a DataGrid?
Thanks, JimUnfortunately, that doesn't work. According to help, "The
offset into the content from the top edge." It doesn't really have
anything to do with the selectedItem. Any other ideas?
Thanks, Jim -
Hi all,
My datagrid is edit mode, only for edit without selectable.
But when I click on the scroll bar, it would auto select the row in
scrolling position. And the cell focus would auto stay in the
selected row first column. Anyone has idea to solve it? Is the
datagrid has some setting need to be changed?
ThanksI don't know if I understand the problem correctly.
If you want the data to be sorted only on startup you should disable sorting (sortableColumns = false) and sort it manually upon initialization. Then, when you change a value of a combobox in a row, no sorting will occur.
Does this help?
Dany -
Datagrid scrolls unnecessarily when variableRowHeight=true
I have a custom component that includes a DataGrid component. I want to set variableRowHeight to true to avoid truncating data within a cell. When I do, the dataGrid shows only so many rows then the user must scroll to see the rest even though there is room in the container the dataGrid could use. It appears that the measured height of the dataGrid does not include the extra height required by the rows of variable height causing the scrollbars to appear unnecessarily.
I am doing this with the mxml shown below
I am using a custom skin to remove the column header
I am not using an itemRenderer and can't seem to get that to work
<s:DataGrid id="contentDataGrid" dataProvider="{transposedDP}" skinClass="widgets.Query.QueryDGHeaderSkin" resizableColumns="false" variableRowHeight="true" width="100%"> <s:columns> <s:ArrayList>
<s:GridColumn dataField="Value"/> </s:ArrayList> </s:columns> </s:DataGrid> <s:GridColumn dataField="Property"/>This is a common problem. Word-wrapping text can be in any dimension so you usually need to set the width of the text widgets accurately otherwise they will report some other height.
-
Hi,
I have a datagrid which allow scrolling, but I have also added a colour background based on the cell value however this does not work, i.e. when scrolling the cell colours remain even though the cell background colour should not be.
Thanks for any advice.Hi ,
Is it possible for you to share just the code snippet which deals with the color change for the datagrid ? We will investigate this at our end and get back to you.
Thanks and regards,
Sudeshna Sarkar
Adobe Flash Professional Team -
Smooth Scrolling made clear and easy
A new folio appeared in Bob Bringhurst's jewel app "DPS Tips", discussing all kinds of special content and interaction. In the Smooth Scrolling section it states that you cannot create Smooth Scrolling articles simply by "Adding" an article. This should be achieved by "Importing" Articles. And it specifically states that you can't create horizontally scrolling articles. This baffles me ! I know it can be a bit tricky, but when explained and understood carefully, there's no problem in using the "Add" button or even to create a horizontally scrolling article on the fly.
The tricky part is, how the InDesign file (an article's half) is 'born'. To be able to use the "Add" button to create a properly scrolling article, you must check that the Document Setup upon making a new file (or even later on) is set to the proper single-page size (in a 3:4 dimension) and with the desired orientation (landscape or portrait), before you hit the "Add" button. Because this is where the Folio Builder gets its information from about the dimension and orientation. Afterwards, you set the page's length with the Page Selection tool – but take care: ONLY the length ! DO NOT use the width or orientation properties with this tool, nor use the Height setting in the Document Setup, although these seem very obvious for this task. You can even correct a page afterwards, and get the "adding" right (and lengthen it properly) if it has been malformed and unaccepted by the Folio Builder before.
So, to conclude: start a scrolling page with a single page, normal size (1024x768), landscape or portrait, add it to the Folio, and then lengthen the page with the Page tool's Height setting. Don't forget to set the Smooth Scrolling option accordingly among the Article's properties in the Folio Builder panel. No big deal !That's indeed the culprit: when you have already set the elongated landscape page upon New Document. But it's still easy to correct that afterwards: switch it back to 768 in Document Settings (the cropped content becomes invisible but remains in place), aAdd the layout (it will become the landscape version), and stretch the page to the desired length with the Page tool's Height property.
Both methods can be difficult, depending on the way you prefer to work. Visual designers who already find it hard to keep track of a Package folder will shiver upon seeing the rigid hierarchy of a Folio folder; technical users won't mind preparing a folder stucture like that. Using ADPS requires many more unlogical steps than just this, like updating a design (not at folio or layout level, but only the whole Article) or discovering that one missing or extraneous orientation prevents the folio to be previewed.
So either way it is fishy...
But I'm glad that this aspect will be tackled by an update, soon ! -
I must be missing something, but my iPhone's driving me crazy: when I try to scroll up, down or sideways, the touch screen is so sensitive that I constantly, unintentionally open pages. Is there a trick to the scrolling process? An area of the screen in which I won't select stuff I don't want? A finger technique? Or is this the way the phone's designed, so that getting from an item at the top of a list to an item further down inevitably involves loading unwanted pages one after the other? This is not isolated to my phone, but is the same on my wife's phone. Can anyone help with advice on this matter?
FWIW, I've had my iPhone for about 2 weeks and I've had the same problem. It's finger technique. I'm getting better at it. Accidental selections are rare for me now. Scrolling requires a quick brush with the finger...no lingering allowed.
If you're like me, you'll eventually get the hang of it.
I've learned a few tricks. If it's a long list (like in Contacts or iPod), you can hold your finger on the letters on the right-hand side and scroll to a particular letter. Also, you can get back to the top of any list by tapping the menu bar at the top of the screen. -
Datagrid Scrolling Problem.. Does not fit into Parent Container..
Hi All,
I have a module and module contains only one datagrid. I am adding this module to tab navigator dynamically in the next index. I am using Text as Item renderer in the datagrid and the row height will change depending upon the data diplyed on the Text. When the data populate in datagrid the datagrid going beyond the containers layout. i.e height is not fit into parent container. I am using Canvas as parent container .. Please find the below attached pictures and you will get to know what is my problem?
Please help me to get out from this issue.. It is urgent..Thanks for quick reply
Here I am adding this module to canvas and the canvas is also dynamic . As you said "customize the measure() method in Text control and return the correct measuredHeight based on the explicitWidth." what is the relation between Text control height and datagrid? Datagird should take it's parent container width and heights. I am newbie to this Flex.. can you please explain it briefly. And if you have any Other way to do this please tell me .. it is very helpful to me.. Can you please post cusomized measure method if possible. please -
Datagrid scroll postition problem
Hi, I'm using a datagrid which is bound to a dataprovider
that updates regularly (with additional rows) I'm wondering why
this isn't causing the last row to be visible after I've updated
the provider...
datagrid1.verticalScrollPosition = maxScrollPosition;
Any ideas what i can do to fix this?My guess is that when the dataProvider is updated with new
items the maxScrollPosition is not yet updated to the new value.
validateNow brings DG upto date so that it is in a complete valid
state and hence it works.
Maybe you are looking for
-
Is there a way to make the multitrack behave as the edit window?
I have been using the 30 day trial and am on my last day. I find Audition great except for 2 things(both of which I probably just don't know how to use). 1.Is there a way to make a track shrink or enlarge with the mouse scroll as in edit. I find it r
-
Value of two combo box is not persistent on change of a third combo box
Hi All: I have flex page in which i have 3 combo boxes. I would be selecting first 2 combo box and when i select the third combo box , i would get the value of previous two combo selection and display data accordingly. My problme here is when i do a
-
Hi All, This issue is driving me crazy! I have checked internet settings(tools > manage add ons > disabled adobe add on so it will open directly to adobe reader rather than the IE viewer.) under Adobe (edit > preferences > internet > box for display
-
Cracked LCD in Macbook Pro Retina
I have dropped my Macbook pro retina 15" quite badly and the LCD is cracked (the glass & backlights are ok, the matrix is not). Does warranty apply to this case? Would AppleCare apply to this case?
-
Print orientation error when customizing paper size or default A4 size.
Hi, I had set my report print with landscape orientation, it works well in print preview and export to pdf file. but when I do print to printer, the page orientation was changed. I got the change rule about the issue, when you customizing page size,