or
Hello,
I have a grid connected to a DataTable.
The grid and datatable both have three columns and three rows.
I want to make a cell in column A uneditable based on a value in a cell in column B
(both cells are in the same row).
I know that I can use BeginningEdit event to cancel an edit attempt in a cell,
however I was wondering if I can reach the same result using XAML trigers
and perhaps just a small relevant class.
Thanks,
Erez


| private void ShowSelectedRecordsInChart() |
| { |
| DataTable table = new DataTable(); |
| DataColumn col = new DataColumn("Shuttle", typeof(double)); |
| table.Columns.Add(col); |
| try |
| { |
| foreach (DataRecord item in this.datagrdV02.Records) |
| { |
| DataRow row = table.NewRow(); |
| row["Shuttle"] = ((DataRow)item.Data)["Shuttle"]; |
| table.Rows.Add(row); |
| } |
| } |
| catch (Exception ex) |
| { |
| MessageBox.Show(ex.Message); |
| } |
| } |
row[
"Shuttle"] = ((DataRow)item.Data)["Shuttle"];