Flash :: Delete All Rows In A DataGrid?

Dec 28, 2011

I need to delete all existing rows from a data grid, i have tried using this but doesn't work[code]...

View 3 Replies


Similar Posts:


Actionscript 3 :: Delete Multiple Rows (using Named Parameters) In Adobe AIR

Jan 31, 2011

I am trying to delete multiple rows in the sqlite table in my Adobe AIR app (runtime 2.5).

Here is the statement, using the "IN" operator:

"DELETE FROM mylist WHERE tdId IN (tdId1, tdId2, tdId3, ...)";

Where tdId1, tdId2, etc. will be determined at runtime based on which row(s) the user chooses to delete. The user can delete arbitrary number of rows.

I've tried something like:

//delete statement text
"DELETE FROM mylist WHERE tdId IN :tdId";
//delete statement parameters: take 1.

[Code].....

It would seem too much of trouble to chain these deletes with a callback. So I guess I am using my last resort: building the sql at runtime. Conclusion: Cached statements can't be used in these kind of situations...

View 2 Replies

Flex :: Calculate The Sum Of A Datagrid's Rows?

Jun 6, 2010

I have this datagrid which has columns with a NumericStepper as an itemEditor where the user can change the number of items he wants to buy. How can I calculate the sum of all cells when the user updates datagrid's values?

EDIT 1

My datagrid is about colors and sizes of a product. The columns are generated dynamically from this function

private function getColumn(dataField:String, headerText:String,editable:Boolean) : DataGridColumn
{
var column:DataGridColumn = new DataGridColumn(dataField);

[Code]....

the row.size28 is generated dynamically. So it could be row.size29,row.size30 etc.

How can I loop through all my cells without knowing their data.property?

View 1 Replies

Flex :: Order Of Rows In A Datagrid?

Jun 26, 2010

I have a datagrid and it lists several rows as

seqno | NAME | COMPANY
1 | BOB | D&T
2 | Jenny | M&Y
3 | Jane | D&T

It is possible to have buttons as [MOVE UP] and [MOVE DOWN] so that when I select a row in a datagrid and press one of those button that the order changes and the seqno updates accordingly.

Meaning if I select Jane and press the [MOVE UP] button, the new order would be;

seqno | NAME | COMPANY
1 | BOB | D&T
2 | Jane | D&T
3 | Jenny | M&Y

View 2 Replies

Flex :: Limit Rows Of Datagrid In It?

Jul 26, 2011

I have a data grid consisting of 3 columns & many rows, i want to show only the first 20 rows to user. Is there any way i can show only the first 20 rows in my datagrid.After by clicking button 'next', next 20 rows should display and so on...

View 1 Replies

Flex :: Numbered Rows In Datagrid?

Aug 31, 2011

I am creating an app where users input their investment info into a datagrid on each row one row at a time. As they move along new rows are dynamically generated so they can input new investments. As the user moves and puts in new info I want a column to display what row the user is on (or better said what number investment he is on). how to create the function:

private function rowCount():void
{
myDG.dataProvider=tasks;

[Code]....

View 1 Replies

ActionScript 2.0 :: Add Or Remove Rows To A Datagrid?

Nov 23, 2008

which is great because it shows how to add columns to a datagrid, but how do you add and remove rows to the datagrid?I'm trying to I'm trying to come up with a Character Generator for our Tabletop Wargame (see hereand rows to appear when you say click on a Weapon like Fist and then onto another weapon (Fist only works atm as a demo).ie how could i format it so it was like a table (because at the moment the Fist stats are formatted with spacebar spaces), and how could i make it so that when you choose your 1st weapon it appears 1st in the table (say a Bow), and when you click your 2nd weapon it appears 2nd in the table (say a Sword), etc...

View 8 Replies

Flex :: Swapping Columns And Rows Of DataGrid Possible?

Jul 22, 2009

I have a 1 row, many column flex datagrid. I would like to turn the dataGrid on its side, so that the column headers become a single column running down and v.v. Is there a way to do that in the DataGrid? Or am I stuck manipulating the data presented to the grid?

I have an object like:
x=y
b=u
o=p
u=e
w=p

And I'd like a control that is visually similar to that. Currently the datagrid displays the object as:
x b o u w
y u p e p
Which is too horizontal for my case.

View 2 Replies

Flex :: Transposing Set Of Rows As Column In DataGrid

Aug 26, 2009

I have an array like the following one
public var sal:Array=[
{empNo:1001, sal:1000, exp:400},
{empNo:1002, sal:3000, exp:240},
{empNo:1003, sal:1000, exp:452},
{empNo:1004, sal:5000, exp:348},
......
{empNo:1550, sal:2000, exp:330},
];

I need to show data using a 3 row flex data grid where the first row will display empNo, the second row will display corresponding salary(field sal), and the third row will display Expenditure (field exp).

View 2 Replies

Flex :: DataGrid - Allow Headers For Different Groups Of Rows

Oct 27, 2009

I am trying to extend the DataGrid to allow headers for different groups of rows. However, I cannot figure out which method to extend from DataGrid that would allow me to accomplish this. I do not want the headers to be included in the dataProvider, only the rows. I want to specify indexes to insert the headers at using a property of the custom datagrid.
Here is a quick photoshop showing what I am trying to do:
Is there any custom component already built that will do this?

View 2 Replies

Php :: Displaying Rows - Extracted From A Database - One By One In A DataGrid

Oct 29, 2009

I have a table (session) in a database which has almost 72,000 rows. I extract those rows with the help php+mysql but when the result is returned to the HTTPService, i need to wait for some 32 seconds before the all the rows start appearing in the DataGrid at once.

Question Is there any way by which DataGrid may start displaying data one by one while the application may extract next rows in parallel. Or that the DataGrid may show data in chunks of hundreds. Like when application starts, it may show first 400 enteries in DataGrid, then the next 400 hundred are extracted until all the 72,000 rows are extracted? Or can i involve threading such that one thread may be responsible for displaying data in datagrid while the other, executing in parallel may be responsible for extracting next data from database?

[Code]....

View 1 Replies

Flex :: Show Row Index For DataGrid Rows?

Nov 24, 2009

Is it possible to dynamically show row index for DataGrid rows ?

I have a static ArrayCollection which is set to be DataGrid's data provider and I would like to always have row numbering for each populated row (e.g. in a column called "#").

View 1 Replies

Flex :: DataGrid - How To Color Empy Rows

Jan 4, 2010

My problem is that empy rows (if there are more rows that dataSource items then there are empy rows) look identical to rows binded to dataSource items which are empy (see the difference?). The only way to know the difference is to hover over them with the mouse, and if they are empty there's no color change, otherwise there's the blue background of the selection.. I want to change the color or in some way hide empty rows, those that are not bound to a dataSource item.

View 2 Replies

Flex :: Format Rows Of Datagrid Differently?

Aug 29, 2011

I am using the following itemrenderer in one of the column of my datagrid. However I want to format each row of the datagrid differently. The column consists of numbers but some need to be formatted as Numbers while others as currency etc. Also note that I have an additional column which consists of 0 and 1 where 0 means that it should be formatted as Number and 1 means that it should be formatted as Currency.

<?xml version="1.0" encoding="utf-8"?>
<s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[Code].....

how I can implement such a function, am trying to use dataGridListData.label in a function in the itemrenderer but it gives error.

View 2 Replies

Flex :: Disabling Few Rows In Spark Datagrid?

Sep 1, 2011

Is there a way in spark datagrid to disable some rows programmatically, in flex 3, it could be done using the function mouseEventToItemRenderer this way:

override protected function mouseEventToItemRenderer (
event: MouseEvent): IListItemRenderer {
var listItem: IListItemRenderer;// = super.mouseEventToItemRenderer(event);

[Code]....

And then I implement the function disabledRow to return true or false depending on some condition, the condition that will specify if the selected item will be renderered or not. Is there a way in spark datagrid to do the same?

View 2 Replies

Flex :: Display Total Sum Of Rows In Datagrid?

Sep 28, 2011

I have an AdvanceDataGrid. How can I show the total of each column at the bottom. I am able to calculate the total, and tried displaying them on labels below each column by giving width as column width. But they are not getting aligned properly below each column.[code]Is there a way by which I can assign total to the grid itself instead of using seperate labels below.

View 1 Replies

ActionScript 3.0 :: DataGrid Locked Rows Background Color?

Sep 18, 2009

I've got a reporting system that uses Flex Visualization charts for the GUI. The first row of a report is the header and the second is a summary row that sums all the data in that column for the data rows. The summary row is locked so that when you scroll down it stays at the top. In Flex 2.X I was able to change the background color of this locked summary row by overriding drawRowBackground and setting the color for the row with index 0. I upgraded to Flex 3.4 and now this no longer works. It appears to iterate over lockedRows separate from other rows, so drawRowBackground is called with a row index of 0 twice and the first data row ends up getting colored.

How are you supposed to change the background color of lockedRows in 3.4, or am I misusing this component and there is another way to achieve my goal here?

edit: mods I think maybe I misunderstood the name of this forum and this post actually belongs under ActionScript 3.

View 3 Replies

Flex :: Making Advanced DataGrid Height Of Rows?

Nov 17, 2009

I have an ADG along with some other components in a VBox. The number of rows of items in the ADG is variable. I want the height of the ADG to be however tall it needs to be to show all the rows without scrolling. This is because I want the containing VBox to handle all the scrolling. The reason being, is because sometimes there is a horizontal scroll bar on the VBox, in this case you have to scroll all the way to the right to reveal the scroll bar for the ADG before you can scroll the ADG.

View 1 Replies

Actionscript 3 :: Show ItemRenderer In Specific DataGrid Rows?

Dec 23, 2009

I have a DataGrid populated via an Array. The last column in the DataGrid uses an ItemRenderer (Button). I want to show the Button in certain rows but not in others (leave those empty). I've looked everywhere for an example or even a clue how to do this (tried labelFunction on DG, etc.) but can't find anything about it.

View 3 Replies

Flex :: Datagrid Multiple Rows Single File

May 20, 2010

I have a flex datagrid with 3 columns. The first column contains the image name(unique key). The other two columns have username and size details. I want to split the username into lastname, firstname, address and some other stuff. Can we have multiple rows in the grid for one image? Tried multi-line, it works but we need to keep adding spaces and its cumbersome. Since each row in the flex datagrid is represented by one index in the XMLList which is enumerated, is there a way to have more than one row assigned to one image and shown in the grid? something like this.

View 1 Replies

Flex :: Click On A Row In A DataGrid And Highlight All Related Rows?

Jul 1, 2010

how I can select a row in a datagrid in flex and have it highlight that row plus any related rows.Let me give you can example:Let's say that I have a datagrid. In the grid I have two columns for each row. One column has what type of car they own, and the other column has the owners name. Let's say that an owner has two cars. So you have a datagrid that looks like this (4 rows, 2 columns):if you click on the Camery row, the Jaguar row and the Camery row are both highlighted.I have a datagrid that has items, and has related items to its parent.

View 2 Replies

Flex :: Moving Single Rows In A DataGrid In Flashbuilder4?

Jan 16, 2011

Is it possible to have "Move-Up / Move-Down" buttons that can move a selected row in a dataGrid and move it to a different row in the database?

Where can I get more info or an example of this and what would this type of operation be called?

View 1 Replies

Actionscript 3 :: Deleting Selected Rows From A DataGrid In Flex

Feb 28, 2011

I added a checkbox in a DataGrid using ItemRenderer. I have pasted the code I am using below.

<mx:DataGrid id="dgEmployeeInfo" dataProvider="{resultArray}" x="131" y="95" editable="false">

[Code]...

View 1 Replies

Flex :: Drag And Drop Rows Using Only The First Column Of The DataGrid?

May 2, 2011

I need to allow drag and drop in my DataGrid, but I have a lot of item renderer and item editor that makes conflicts with events when dragging.

So, I want to restrict the activation of drag and drop in the first column ?

View 1 Replies

Flex :: Validate Certain DataGrid Rows Made With ItemRenderer?

Jun 15, 2011

I have a DataGrid which uses an itemRenderer to display the items in a DataGridColumn. The ItemRenderer is created in actionscript and contains the following code:

public class PromptingColumnRenderer extends Label {
public function PromptingColumnRenderer()
{

[Code].....

In this DataGrid column, I require number validation on only the data with the type="NUMBER" field set. The problem is, when I try to declare a NumberValidator within my PromptingColumnRenderer actionscript code, the view recycles the renderer, and the NumberValidator attempts to validate non-numeric rows. What is the best way to validate only the rows with the type="NUMBER" field set?

View 1 Replies

Xml :: DataGrid ItemRenderer Error - Button Appear Only On Certain Rows Of The Column

Aug 25, 2011

I am populating 3 columns of my datagrid using a simple XML file. The last column is supposed to be an itemrenderer, basically a Button. However the button should appear only on certain rows of the 3rd column of the datagrid depending on the value from the XML file, which is either "true" or "false". So basically I want to set the Visible property of the button in the itemrenderer to true or false.

[Code]...

View 2 Replies

Actionscript 3 :: Variable Height For Rows Of DataGrid In Flex?

Oct 28, 2011

i am creating a popup of a textarea though which i am storing my notes in a data grid. The Code for the data grid is given below.

Now when i add the note IT fits in one of the rows. Now all the rows have same size. I want to make the size variable so that the text fits in each row. For big text notes the height of rows should be greater so that no scroll needed. similarly when the data is small then the height should be small

<mx:AdvancedDataGrid x="0" y="231" width="872" height="273" fontSize="12" id="dgRecentNotes" horizontalGridLineColor="#01030B" dataProvider="{patientProfile.notes}" horizontalGridLines="true" variableRowHeight="true">

[Code].....

View 1 Replies

Actionscript 3 :: Flex Datagrid Control With Expanding Rows?

Jun 11, 2009

I'm looking for a DataGrid with expandable rows implementation in Flex. I don't want to use Advanced DataGrid control because it's too slow and too complex.The desired behavior is like this: when you click a row, a panel opens between the rows with some details and the rest of the rows are moved down, and when you click again the panel is closed and the rows are back to normal. If you click the other row, the one that was expanded collapses and the row you clicked is expanded.

View 3 Replies

Flex :: Select - Datagrid Dynamically Adding Rows Via Checkboxex

Dec 9, 2009

Does anybody know how to add a new row to a datagrid via a checkbox.

example:

checkbox 1 : label (PS2)
checkbox 2 : label (PS3)
checkbox 3 : label (PSP)

By selecting one or all of these checkboxes i what to add a new Datagrid row.

Datagrid

Console price
row1 PS2 $20,
row2 PS3 $30,
row3 PSP $15,

View 1 Replies

Actionscript 3 :: Insert A Line After A Certain Number Of Rows In Datagrid In Flex?

Feb 16, 2011

Is there a way to insert a horizontal line after a certain number of rows, which may be variable depending upon a property in data provider of a datagrid?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved