Add Columns in DataGrid : Flex - apache-flex

Merged with Add Total Columns in DataGrid.
I have one Datagrid in Flex. In datagrid there are 4 columns like mark1,mark2,mark3,Total. When i enter mark1,mark2,mark3 that time i want to update total.
How can i do this??
Please help me

Related

How to remove the extra column in DevExpress GridControl using WPF?

Basically my requirement is to remove the extra column in DevExpress GridControl using WPF. I have a GridControl which contains three columns, while the GridControl shows three columns perfectly the rest of GridContol area is shows as an extra column. I want to remove that extra column, so is there any solution?
Any help is appreciated!
Use the TableView.AutoWidth property:
<dxg:GridControl>
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="ID"/>
<dxg:GridColumn FieldName="Name"/>
<dxg:GridColumn FieldName="Age"/>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True"/>
</dxg:GridControl.View>
</dxg:GridControl>
Related help-article: Columns Layout and Width

Drag and drop column data to another column

In Flex, using AdvancedDataGrid, I'm trying to achieve a drag and drop of one row's column data to another row's column or the same row but different column. Is this even possible? I've been googling for hours and all I can find are drag and drop whole columns just to rearrange their view order.
You have two options to make columns draggable.
First is to make all the columns draggable in the DataGrid. You can do this using the draggableColumns property on the DataGrid class. Set its value to true.
The second is to set the draggable property on the DataGridColumn class.
In both cases, you would drag the columns using the column header.
If you want to be able to drag a single cell, there is no way to do this that I know of.

how to make a particular column of datagrid in flex as non sortable?

I am trying to make only one of the columns of a datagrid as sortable using flex 3. but using sortableColumns all the columns change their property...any solution??
You can use the sortable flag on the DataGridColumn:
http://livedocs.adobe.com/flex/3/langref/mx/controls/dataGridClasses/DataGridColumn.html#sortable
I'm unclear what you mean by a column changing it's property. Sorting shouldn't change the display field of the column; although it may change the value that is displayed in the column. Sorting a single column should always change the values of other columns. That is the nature of the dataGrid.
You need to disable the sortable option to the DataGrid, and enable it for the DataGridColumn you want.
Once you'll do it, Only the specific column you enabled will be sortable.

Get content of a single cell from a DataGrid in Flex 3

I want to select information in a single cell from my DataGrid in Flex 3.
Specifically, I'm displaying three phone numbers per line and the user needs to be able to select one of those numbers, from any row, but not the whole row.
While similar to this, I am displaying the DataGrid to the user. The answer for that question was to manipulate the dataProvider, how can I know what cell I've selected in order to do that?
Check this.

How to get the values of a selected row in the Advanced DataGrid control in Flex?

How to get the values of a selected row in the Advanced DataGrid control in Flex ?
thanks
'SelectedCells' property will help you here.
You can learn more on this at
'http://livedocs.adobe.com/flex/3/langref/mx/controls/AdvancedDataGrid.html#eventSummary'
Click any cell in the row to select the row. After the selection, selectedCells contains a single Object:
[{rowIndex:selectedRowIndex, columnIndex: -1}]
Hope that helps.
Ashine.

Resources