Attached is application using grid.I have few questions on this.
1.How can i enable single cell select in the grid.Now entire row is getting selected if we click anywhere in the grid.
2.Clicking on upper left corner header selects all the rows in the grid.But when i click on the child rows upper left corner header,the rows are not selectd ,why?
3.Does Infragistics support Excel style of copying the cell values,i.e Selecting the cells and dragging fills the remaining cells with same value as selected cells.
4.Cut,Undo,Redo not working properly.
5.After copying a row valus and we try to paste it on multiple rows ,paste is not performing operation propery.
the copied data is pasted only on the first selected row and other slected rows remain unchanged.
6.How to delete the rows manaually using code.
7.I am trying to add rowst o grid in add button click event,but rows are not gettinhg added.Why is it so.
8.Difference between using ValueList and ultradropdown button.
vinuthak said:1.How can i enable single cell select in the grid.Now entire row is getting selected if we click anywhere in the grid.
The entire row is not selected, it's just active.
FAQ:How do I turn off the ActiveRowAppearance so that the active row in the grid does not appear selected.
vinuthak said:2.Clicking on upper left corner header selects all the rows in the grid.But when i click on the child rows upper left corner header,the rows are not selectd ,why?
Your code is doing this:
this.ultraGrid1.Selected.Rows.AddRange(this.ultraGrid1.Rows.GetFilteredInNonGroupByRows());
So you are always selecting the root-level rows collection. You need to get the correct collection from the UIElements.
RowsCollection rows = rowSelectorHeaderUIElement.GetContext(typeof(RowsCollection)) as RowsCollection; this.ultraGrid1.Selected.Rows.AddRange(rows.GetFilteredInNonGroupByRows());
vinuthak said:3.Does Infragistics support Excel style of copying the cell values,i.e Selecting the cells and dragging fills the remaining cells with same value as selected cells.
There's no built-in Fill Down feature in the grid, but you can implement it yourself by simply setting the Value of the selected cells.
vinuthak said:4.Cut,Undo,Redo not working properly.
What's wrong with it?
vinuthak said: 5.After copying a row valus and we try to paste it on multiple rows ,paste is not performing operation propery. the copied data is pasted only on the first selected row and other slected rows remain unchanged.
If you copy one row, then you can only paste one row. The grid won't copy the same row into multiple rows. You would have to code this yourself.
vinuthak said:6.How to delete the rows manaually using code.
You could remove the rows from the data source or you could select the rows in the grid and call grid.DeleteSelected.
vinuthak said:7.I am trying to add rowst o grid in add button click event,but rows are not gettinhg added.Why is it so.
You Add button is adding rows to a collection. A collection is generally not a good class to use for DataBinding, since it's an IList and IList does not support all of the proper notifications that you need when binding. Primarily, the problem here is that an IList does not notify bound controls when new items are added to the list. So the grid has no way of knowing that anything was added.
I see that your code is setting the DataSource on the grid, but this does nothing, because you are setting the DataSource to the same DataSource the grid is already using.
The best solution would be to use a better data source like an IBindingList. I recommend using the BindingList class instead of CollectionBase.
Another option is to refresh the grid by calling grid.Rows.Refresh(ReloadData).
vinuthak said:8.Difference between using ValueList and ultradropdown button.
A ValueList provides a list in a grid cell. UltraDropDownButton is not related to the grid at all, it's a standalone button control which allows you to drop down a control.
1.When i click on the row 5 child row header to select all the child rows and click on delete i get the message attached
why is it so .
2.Also if i copy a row to another and then say Undo nothing seems to happen .why is it so.
v9.1 is no longer being updated, so I downloaded your sample and updated it to v9.2.
I ran the sample and selected a row using the RowSelector. I pressed CTRL+C to copy the row. I then selected another row in the grid and pressed CTRL+V to paste. This worked fine. Then I pressed CTRL+Z to undo and this also works fine.
Mike ,
1.I am using Infragistics version 9.1.20091.1000.
I am using this code to delete rows in the grid.
ultraGrid1.DeleteSelectedRows(
true);
2.I am setting AllowMultiCellOperation in the grid InitializeLayout
e.Layout.Override.AllowMultiCellOperations = AllowMultiCellOperation.All;
e.Layout.Override.CellClickAction =
CellClickAction.CellSelect;
i am using this code to Copy,Paste and Undo.
this
.ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.Copy);
But still i am not able to understand why undo is not working after i copy and paste a row .
You can refer to the application i have attached in my previous mail.
1) Either this is a bug in your code where you are deleting the rows yourself, or else this is a bug in the grid that was fixed a very long time ago. What version of the grid are you using?
2) I'm not sure what you mean by this. How are you copying the row? How are you attempting to trigger the Undo? I tried this out with the grid's built-in functionality using the AllowMultiCellOperation property and it seems to work okay for me. Make sure you set AllowMultiCellOperation to include allowing the Undo operation.