I have a Grid bound to a Data View, which works find and data is bound to the grid:
protected void BindItemsGrid()
{
DataView myDv = _myDv;
dgvOrders.DataSource = myDv;
//I have one cell within the grid that I want the user to be able
//to edit. When the user has finished editing the value the just entered will
//be shown in a message box (eventually this will update value in database)
int testToShowthisIsCounting = 0;
foreach(Cell cell in dataRowTemplate1.Cells)
{
//create the eventHandler
cell.EditLeft += new EditLeftEventHandler(InputOrder_EditLeft);
testToShowthisIsCounting = testToShowthisIsCounting + 1;
}
//show the value of testToShowthisIsCounting, this works and shows the number of cells
MessageBox.Show(“test:” + testToShowthisIsCounting .ToString());
}
private void InputOrder_EditLeft(object sender, EventArgs e)
{
Xceed.Grid.Cell cell = (Xceed.Grid.Cell)sender;
string inputValue = cell.Value.ToString();
MessageBox.Show(“you input:” + inputValue );
}
The testToShowthisIsCounting shows the value equal to the number of cells on the grid however when i they to update a value in the cell it does not show the inputValue, ie InputOrder_EditLeft does not seem to be firing?
Any ideas where I’m going wrong???
Thanks
Imported from legacy forums. Posted by ric (had 2381 views)