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.
Related
I need to drag column from one TableView and drop it into another TableView. Something like reorder but between two tables. In docs there is example just for rows.
I have a combobox, on which I have to choose one option. That option determines which values should be shown on the comboboxes of a grid. The values to show on the grid's comboboxes are on a table. Right now, I'm showing all of them, but I need to filter it down.
The user must choose a value on combobox #1, and the comboboxes inside the grid (#2) should only show the related values. So far, I haven't been able to accomplish this.
Thanks in advance!
Refresh your drop down list as follows:
&l_field.ClearDropDownList();
/* select values required by sql */
&l_sql = CreateSql("...");
While &l_sql.Fetch(&l_key, &l_descr)
&l_field.AddDropDownItem(&l_key, &l_descr);
End-While;
We can use the hide property to display/hide column, but still it occupies column space
I want to collapse it same like we do in wpf, so if we don't want to see the column we can use the space for other columns.
Any solution?
Are you using Textboxes inside a List repeater to generate the table? That's what we were doing and we had the same problem you describe.
The solution was to switch to using a true Table. Columns in an RDLC table will collapse OK.
If you are using a Table are you setting the visibility of the column itself? Ensure you are setting the visibility of the entire column, not just the field.
I have a really weird issue. I have a Gridview, which I bind to a Dataview programtically. My Gridview has 11 columns. Sorting works fine as long as I do not remove any columns programtically.
In certain cases I remove 2 of the columns from the Gridview. Still not a problem. All the data is properly displayed however the problem occurs when I sort one of the columns. I sort the Dataview and bind to the Gridview again. Data from two of my columns just vanishes. Both of these columns are based on ItemTemplates. The columns are still displayed but just empty cells.
Any ideas? Thanks.
Instead of removing the columns, hide them. The bound item's indexes are confused by removing the columns from the grid only and not the DataSource.
A better solution would be not to ever render those columns at all if you are always hiding them. If there are conditions to which they are removed, then hide them. CSS is an easy way to do that.
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.