这个时候你需要找控件
protected void gvDetail_DataBinding(object sender, EventArgs e)
{
ASPxGridView gvDetail = sender as ASPxGridView;
if (gvDetail != null)
{
int i = Convert.ToInt32(gvDetail.GetMasterRowKeyValue());
gvDetail.DataSource = 数据源(根据i取出的)
gvDetail.KeyFieldName = "主键";
}
}
DataTable dt = 你封装的类.取数据方法();
grideview.DataSource = dt;
grideview.DataBind();