Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Unable to display the data in dropdownlist in datagrid

Reply
Thread Tools

Unable to display the data in dropdownlist in datagrid

 
 
Thiyagarajan Natarajan
Guest
Posts: n/a
 
      10-12-2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to get selected values from dropdownlist, present in DataGrid. gopal.panda@gmail.com ASP .Net Datagrid Control 0 10-09-2005 06:00 PM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 ASP .Net 1 10-02-2005 05:07 PM
Unable to Display Data HartSA ASP General 6 01-10-2005 08:03 PM
how do i access a dropdownlists selected value in a datagrid edititemtemplate column from the selectedindexchanged event of another dropdownlist in a datagrid edititemtemplate column Dave M ASP .Net Datagrid Control 0 12-14-2004 11:53 AM
unable to display public text field of object in ArrayList in a bound DataGrid Gerd B. ASP .Net Datagrid Control 0 09-11-2003 07:55 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57