هذا الكود حولته لفيبي وما اشتغل
protected void gridMaster_RowDataBound(object sender, GridViewRowEventArgs e
)
{
sourceProducts.SelectParameters[0].DefaultValue = gridMaster.DataKeys[e.Row.DataItemIndex].Value.ToString();
object data = sourceProducts.Select(DataSourceSelectArguments.Empty);
//' e.Row.Cells[1].Visible = false;
//Bind the grid.
checkBoxList.DataSource = data;
checkBoxList.DataTextField = "ProductName";
checkBoxList.DataValueField = "UnitPrice";
checkBoxList.DataBind();
RadioButtonList a = (RadioButtonList)e.Row.Cells[1].FindControl("RadioButtonList1");
sourceProducts.SelectParameters[0].DefaultValue = gridMaster.DataKeys[e.Row.DataItemIndex].Value.ToString();
object w = sourceProducts.Select(DataSourceSelectArguments.Empty);
a.DataSource =w ;
a.DataTextField = "QuantityPerUnit";
a.DataValueField = "Unitprice";
a.DataBind();
} Protected Sub grvquistn_RowDataBound(ByVal sender As Object, ByVal a As GridViewRowEventArgs)
''Protected Sub grvquistn_RowDataBound(ByVal grvquistnevet As SqlDataSource)
If a.Row.RowType = DataControlRowType.DataRow Then
SQlQ2.SelectParameters(0).DefaultValue = grvquistn.DataKeys(a.Row.DataItemIndex).Value.ToString()
Dim data As Object = SQlQ2.Select(DataSourceSelectArguments.Empty)
checkBoxList.DataSource = data
checkBoxList.DataTextField = "QuestionId"
checkBoxList.DataValueField = "QuestionId"
checkBoxList.DataBind()
End If
End Sub