HI i just want to create dynamic drop down control in only some rows depend on the condition.
how to create that drop down control in this.
here i have written some code.
here need note down that other values in colums shold not be update (means fixed) and
can i use templated colmun in that column1 caz some of the values are fixed only some are with droup down control.
menas in cloumn1
row1column1 == fixed value
row2column1 == fixed value
row3column1 == templated dropdownlist.
row4cloumn1 == nothing that is null or empty string
row5column1 == fixed value
row6column1 == templated dopdownlist.
and so on.
here i have tried to write down some code.
if (condition)
{
drpMonthGrid.DataSource = CC.dtMonthList(); // I have create datatable to display each item in the droup down list.
// Specify DisplayMember as "Year" field of datatable
drpMonthGrid.DataBind();
drpMonthGrid.DataSource = CC.dtMonthList();
drpMonthGrid.DataSourceID = "Month";
drpMonthGrid.DisplayMember = "Month";
*/
//drpMonthGrid.SelectedValue = DateTime.Now.Month.ToString();
CellItem ciValue = (CellItem)tcValue.CellItems[e.Row.Index];
//ciValue.Controls.Add(drpMonthGrid);
e.Row.Cells.FromKey("Column1").Text = "<a href='Report1.aspx?ClientName=" + e.Row.Cells.FromKey("type").Value + "' target='_blank'>Remove</a>";
// here in below i just want to add that drop down control in the terms Column2.
}
please let me know the correct code.