Bind DropDownList t Datatable Column inside DataGrid Control
i got `DataGrid` Control that get its Data From `DataTable` inside this DataGrid i want to bound `DopDownList` Control with its related data in DataTable

 

    DropDownList commentDrop = (DropDownList)packageCommentDataGrid.FindControl("commentDrop");
           commentDrop.DataSource = dt;
            commentDrop.DataTextField = dt.Columns["CommentString"][0];
            commentDrop.DataValueField = dt.Columns["CommentP"][0];

and the ItemDataBound Event will be like this : 

    protected void packageCommentDataGrid_ItemDataBound(object sender, DataGridItemEventArgs e)
    {
        if (e.Item.ItemType==ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
        {
            DropDownList commentDrop = (DropDownList)e.Item.FindControl("commentDrop");
            
        }
    }

Thanks,

 
Bind DropDownList t Datatable Column inside DataGrid Control
===

i got `DataGrid` Control that get its Data From `DataTable` inside this DataGrid i want to bound `DopDownList` Control with its related data in DataTable

 

    DropDownList commentDrop = (DropDownList)packageCommentDataGrid.FindControl("commentDrop");
           commentDrop.DataSource = dt;
            commentDrop.DataTextField = dt.Columns["CommentString"][0];
            commentDrop.DataValueField = dt.Columns["CommentP"][0];

and the ItemDataBound Event will be like this : 

    protected void packageCommentDataGrid_ItemDataBound(object sender, DataGridItemEventArgs e)
    {
        if (e.Item.ItemType==ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
        {
            DropDownList commentDrop = (DropDownList)e.Item.FindControl("commentDrop");
            
        }
    }

Thanks,

 