我在同一個gridview單元格中有很多控件。我正在使用下面的代碼。但我希望它們被垂直顯示而不是水平顯示,因爲使用下面的代碼將它們分配在同一行中。任何幫助?Gridview:同一行單元格中的許多控件
RadioButton rd1 = new RadioButton();
rd1.Text = "Test1";
RadioButton rd2 = new RadioButton();
rd2.Text = "Test2";
grdRSM.Rows[0].Cells[2].Controls.Add(rd1);
grdRSM.Rows[0].Cells[2].Controls.Add(rd2);
你需要什麼就不清楚了。請提供更多詳細信息 – sachin
使用上面的代碼,它將我的單選按鈕添加到同一個單元格和同一'行'中。但我希望單選按鈕出現在不同的'行' – user1292656