I'll explain what happens in the video I attached. Allow custom in both scenarios causes issues.
As you can see first I have a combo box that lives outside the data grid. This combo box has virtualization on and allow custom="false". When the application first loads, I pull 1200 records and store it in an object. The combo box only takes the first 100 records (because i don't want to load everything) out of 1200 and displays it in the combo box. After that you can keep scrolling and it will load more as you scroll. Let's say when it first loads the default data customer ID is 012-000001. Since that is in the list of 1-100 records initially, it will load this value. If the default data is 012-000200, it will not be set and my validation message comes up. This is because Allow Custom is false. It believes that 012-000200, is not in that list, yet I have 1200 records. So as you can see in the video when it first loaded, it did not set the customer account because it was over the first 100 records it pulls. If I select say 012-000003 which is under 100 it works and doesn't blank out. Then I go to select 012-000180 which is in that entire list of 1-1200 records but because its not in the "initial" load of 100, it blanks it out because its thinking its not a legit number in that list, which it is essentially.
The issue with the grid is that I have an autocomplete inside the grid and allow custom is false. I don't have virtualization on in the grid right now because its not supported in batch mode yet. If I type in a legit number and select from the autocomplete list, and start clicking in other rows on that column it highlights them green as if there was a change and blanks out the other rows in that column, even if there is data there currently it will blank it out. I'm not sure why it does that, i'm not even typing in anything i'm just clicking on that row/column.
A third issue i found interesting is that. I have code to enter the cell to edit by doing 1 click only. This works if I have an autocomplete on Delivery location column but not on the service location column, or the location type field (dropdown list). The name field is a "read only" field. So its almost like anything to the right of that column doesn't go completely into the field, you have to double click. I attached a separate video for this as well as my grid code. The combobox code I posted already was outside the grid in the "header" area.
Handler when clicking on a cell in the grid to enter the cell on one click.
public async Task CellSelectHandler(CellSelectEventArgs<FDIChemicalOrderLine> args)
{
// get selected cell index
var CellIndexes = await GridInstance.GetSelectedRowCellIndexes();
//get the row and cell index
// double rowIndex = args.RowIndex;
double oldRowIndex = CurrentEditRowIndex;
CurrentEditRowIndex = args.RowIndex;
var CurrentEditCellIndex = (int)CellIndexes[0].Item2;
//get the available fields
var fields = await GridInstance.GetColumnFieldNames();
// edit the selected cell using the cell index and column name
if (CurrentEditCellIndex != 0)
await GridInstance.EditCell(CurrentEditRowIndex, fields[CurrentEditCellIndex]);
}
Attachment:
CellOneClickIssue_ee68399a.zip