Replies
David,
We need more details to be able to look into this. Are you able to provide a sample like Mike P requested earlier in this thread that we can use to look into what is happening?
Nicholas,
For copying and pasting, is there a reason why you only want to allow single selection rather than allowing the user to select multiple cells?
If you really want single selection, you can set SelectTypeCell to Single and SelectTypeRow to None:
this.ultraGrid1.DisplayLayout.Override.SelectTypeCell = SelectType.Single; this.ultraGrid1.DisplayLayout.Override.SelectTypeRow = SelectType.None;
To have a cell be selected on mouse click, set the CellClickAction to CellSelect:
this.ultraGrid1.DisplayLayout.Override.CellClickAction = CellClickAction.CellSelect;
Note that if you don't set this to CellSelect the default is to enter edit mode and the editor will already provide a context menu to copy the value. If you do this you would also want to set AllowUpdate to false to prevent updates from being made to the data:
this.ultraGrid1.DisplayLayout.Override.AllowUpdate = DefaultableBoolean.False;
For the copy and paste, you can set AllowMultiCellOperations to Copy to allow copying the selection with CTRL+C when a cell (or multiple) is selected.
this.ultraGrid1.DisplayLayout.Override.AllowMultiCellOperations = AllowMultiCellOperation.Copy;
If you don't use the editors, you will need to add your own context menu to the grid to get a copy option and you can refer to Using the WinGrid ClickCell Event to Show a Context Menu for details on showing a context menu. If the cell is selected when the context menu is shown, you can use the PerformAction method of the grid to have the grid copy the cell value to the clipboard:
this.ultraGrid1.DisplayLayout.Override.AllowMultiCellOperations = AllowMultiCellOperation.Copy;
Let me know if you have any questions.
David,
To get the behavior that you are looking for you should be able to just set the DataSource of the grid to your DataSet and set the ShowExpansionIndicator on the Override to be CheckOnDisplay rather than CheckOnExpand which is the default.
David,
What specifically is meant by the UltraGrid is ignoring the parent rows without children? Do you mean that the parent rows themselves don't show in the grid or do you mean that they are showing the expansion indicator even though there are no children.
If it is the expansion indicator, set the ShowExpansionIndicator on the Override to be CheckOnDisplay rather than CheckOnExpand which is the default.
If you are referring to the rows simply not being present, this would be unexpected and you should make sure that those rows exist in the list that you are binding the UltraGrid to. Or make sure they aren't being filtered out by a query to get your data before binding to the UltraGrid. If they do exist in the list and aren't showing in the UltraGrid, please provide an example that we can take a look at to see what is happening.
Let me know if you have any questions with this matter.
I recommend submitting this as a new thread with an example that demonstrates the issue so that we may look into what is happening. Also be sure that you are testing the latest version of the windows forms toolset as the relevant bug fix for this thread was in 2013 which is a few years before Windows Server 2016 was released.
Vignesh,
You can see the dependencies for any widget in the API documentation, the link that you are referencing will need both the igGrid and the igCombo:
Note that you could also use the combined scripts and there are more details in JavaScript Files in Ignite UI.
George,
In the code provided there are two handlers for the jQuery .ready method and the are called in the order they are on the page so the one that is building the grid is being called before the one that is creating the $.ig.ComboEditorProviderCustom.
I recommend moving the logic to define $.ig.ComboEditorProviderCustom out of the .ready handler like it is in the example that Vasya provided earlier in this thread as well as the example in the Working with igCombo editor provider.