Skip to content

如何获取点击模板列中控件所在的行号

在UltraWebGrid中,可以增加模板列。在该模板列中可以放入web控件。当在点时该web控件时,如何知道是点击了哪行上面的控件?

在web控件的点击事件中,可由以下方法得到该行的Index:

?View Code CSHARP
var rowIndex = ((CellItem)((Control)sender).NamingContainer).Cell.Row.Index;

Post a Comment

Your email is never published nor shared. Required fields are marked *