I like to get the values with the right type (not strings) from GridDateTimeColumn and GridNumericColumn.
| GridColumnCollection columns = e.Item.OwnerTableView.Columns; |
| foreach (GridColumn column in columns) |
| { |
| if (column is GridDateTimeColumn) |
| { |
| if (startdatetime.Equals(column.UniqueName)) |
| { |
| // How do i get the value as a DateTime? |
| } |
| else |
| { |
| throw new Exception( |
| String.Format("No implementation for column.UniqueName: {0} (UpdateResourceTimeOff) ", |
| column.UniqueName)); |
| } |
| } |
| else if (column is GridNumericColumn) |
| { |
| if ("someTextString".Equals(column.UniqueName)) |
| { |
| // How do i get the double value |
| } |
| else |
| { |
| throw new Exception( |
| String.Format("No implementation for column.UniqueName: {0} (UpdateResourceTimeOff) ", |
| column.UniqueName)); |
| } |
| } |