Issue
I'm using Xamarin.Forms.Datagrid to display my data in grid format. I'm just wondering is there a way of editing specific cells in the datagrid?
foreach (DataGridViewRow OrderRow in dgvItemDetails.Rows)
{
if (OrderRow.Cells[1].Value.ToString() ==
DcoNumScanned.ToString() && OrderRow.Cells[2].Value.ToString()
== _ItemCode)
{
OrderRow.Cells[4].Value =
(Convert.ToDouble(OrderRow.Cells[4].Value) -
Convert.ToDouble(_uomQty));
break;
}
}
The above is just an example that I have.
Thanks for any help.
Solution
let's say your DataGrid is bound to a List<Widget>
foreach(var w in widgets)
{
if (w.ID == DcoNumScanned.ToString() && w.Code == _ItemCode)
{
w.Price -= Convert.ToDouble(_uomQty));
break;
}
}
Answered By - Jason
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.