更新时间:2023-10-05 09:14:28
如果你没有DataKey
,然后你需要将密钥存储在Row内某处的HiddenField
或BoundField
或其他什么。
然后在 GridView.RowUpdating事件 [ ^ ],找到该字段并检索该值。之后使用键
或Id
对您的数据库运行查询。
If you don't haveDataKey
, then you need to store the Key somewhere inside the Row either in aHiddenField
orBoundField
or something.
Then inside GridView.RowUpdating Event[^], find that field and retrieve the value. After that run a Query on your Database using thatKey
orId
.