Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Thiyagarajan Natarajan #1
Unable to display the data in dropdownlist in datagrid
Hi all,
I am unable to display the data in dropdown list in datagrid control.
can anybody help me please?
my ItemDataBound code is here.....
private void dgResearchCalls_ItemDataBound_1(object sender, System.Web.UI.
WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.
AlternatingItem)
{
e.Item.Cells[0].Text = "<a tabindex='-1' class='" + e.Item.CssClass +
"'href='../AppPages/AddEditCustomer.Aspx?CustomerID=" + e.Item.Cells[0].Text
+ "'><img style='cursor:hand' border=0 alt='Edit Company' src=..
/images/edit_icon.gif></a>";
e.Item.Cells[1].Text = e.Item.Cells[1].Text.ToString();
e.Item.Cells[2].Text= e.Item.Cells[2].Text.ToString();
DropDownList ddlst=(DropDownList)e.Item.Cells[3].FindControl("ddlstContact2")
;
ddlst.DataSource=DataHelper.GetddlstContacts();
ddlst.DataTextField="ContactName";
ddlst.DataValueField="ContactName";
ddlst.DataBind();
e.Item.Cells[4].Text = e.Item.Cells[4].Text.ToString();
e.Item.Cells[5].Text=e.Item.Cells[5].Text.ToString();
e.Item.Cells[6].Text=e.Item.Cells[6].Text.ToString();
}
}
this is my code...........
advanced thanks for all
Thiyagarajan Natarajan Guest
-
DataGrid does not display XML data
Hello, and thanks for reading this... I am having a problem displaying XMLList data in a DataGrid. The data is coming from a Tree control, which is... -
Unable to get selected values from dropdownlist, present in DataGrid.
Hi, I am unable to get the values from a dropdownlist which is present in Editable Template Column of the datagrid. I am using C# as backend code.... -
How to get the data display value in Datagrid?
Hi all My datagrid design Item_no, Item_name, Size 1 ABC S 2 BCD M *Item_no is Button Column -
unable to display public text field of object in ArrayList in a bound DataGrid
I have a very simple public class X, whose fields are all public. I create an ArrayList that contains a series of instances of X. Then I bind a... -
datagrid doesn't display my data
Hello. I am new to this asp.net thingy. I have created my dataset, adaptor and connection. my data contains some data for sure since i have...



Reply With Quote

