Click here to Skip to main content
15,912,837 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: URI Format Not Supported. Pin
Meetu Choudhary11-Sep-09 2:46
Meetu Choudhary11-Sep-09 2:46 
Questiondropdownlist in datagrid Pin
m@dhu10-Sep-09 21:31
m@dhu10-Sep-09 21:31 
AnswerRe: dropdownlist in datagrid Pin
Christian Graus10-Sep-09 21:44
protectorChristian Graus10-Sep-09 21:44 
AnswerRe: dropdownlist in datagrid Pin
Christian Graus10-Sep-09 21:59
protectorChristian Graus10-Sep-09 21:59 
GeneralRe: dropdownlist in datagrid Pin
m@dhu10-Sep-09 22:07
m@dhu10-Sep-09 22:07 
GeneralRe: dropdownlist in datagrid Pin
Christian Graus10-Sep-09 22:22
protectorChristian Graus10-Sep-09 22:22 
GeneralRe: dropdownlist in datagrid Pin
m@dhu10-Sep-09 22:35
m@dhu10-Sep-09 22:35 
GeneralRe: dropdownlist in datagrid Pin
Christian Graus10-Sep-09 22:39
protectorChristian Graus10-Sep-09 22:39 
madhukk wrote:
DataGid1.EditItemIndex = e.Item.ItemIndex;
BindData();


But, this just binds the grid to the same data source it had to start with. How is that supposed to help fill any drop down list ?


madhukk wrote:
protected void DataGid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{


string sql = "select dept from dptmnt";
DataSet ds = new DataSet();
SqlCommand cmd = new SqlCommand(sql, cnn);
cmd.Connection.Open();
SqlDataReader dr = cmd.ExecuteReader();


if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DropDownList DropDownList1 = (DropDownList)((DataGridItem)e.Item).FindControl("DropDownList1");
ListItem li = new ListItem();
DropDownList1.Items.Add(li);
DropDownList1.DataSource = dr;
DropDownList1.DataValueField = "dept";
DropDownList1.DataTextField = "dept";
DropDownList1.DataBind();
cmd.Connection.Close();

}


I have the same questions about this mess as I did in my first post.

Christian Graus

Driven to the arms of OSX by Vista.

Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

GeneralRe: dropdownlist in datagrid Pin
m@dhu10-Sep-09 22:44
m@dhu10-Sep-09 22:44 
GeneralRe: dropdownlist in datagrid Pin
Christian Graus10-Sep-09 22:48
protectorChristian Graus10-Sep-09 22:48 
GeneralRe: dropdownlist in datagrid Pin
m@dhu10-Sep-09 22:56
m@dhu10-Sep-09 22:56 
GeneralRe: dropdownlist in datagrid Pin
Christian Graus11-Sep-09 0:54
protectorChristian Graus11-Sep-09 0:54 
QuestionHow to get Mac Address. ?? Pin
Priyagdpl10-Sep-09 21:07
Priyagdpl10-Sep-09 21:07 
AnswerRe: How to get Mac Address. ?? Pin
Manas Bhardwaj10-Sep-09 21:40
professionalManas Bhardwaj10-Sep-09 21:40 
AnswerRe: How to get Mac Address. ?? Pin
Abhishek Sur10-Sep-09 22:24
professionalAbhishek Sur10-Sep-09 22:24 
QuestionFrench language support in aspx page Pin
GauravKP10-Sep-09 20:51
professionalGauravKP10-Sep-09 20:51 
AnswerRe: French language support in aspx page Pin
Christian Graus10-Sep-09 20:54
protectorChristian Graus10-Sep-09 20:54 
Questionbreak point not working Pin
myinstincts10-Sep-09 20:25
myinstincts10-Sep-09 20:25 
AnswerRe: break point not working Pin
N a v a n e e t h10-Sep-09 20:52
N a v a n e e t h10-Sep-09 20:52 
GeneralRe: break point not working Pin
myinstincts10-Sep-09 20:57
myinstincts10-Sep-09 20:57 
GeneralRe: break point not working Pin
Christian Graus10-Sep-09 21:00
protectorChristian Graus10-Sep-09 21:00 
AnswerRe: break point not working Pin
mr_muskurahat10-Sep-09 21:03
mr_muskurahat10-Sep-09 21:03 
AnswerRe: break point not working Pin
Abhishek Sur10-Sep-09 22:20
professionalAbhishek Sur10-Sep-09 22:20 
QuestionUpdate panel in asp.net Pin
anushh10-Sep-09 20:00
anushh10-Sep-09 20:00 
AnswerRe: Update panel in asp.net Pin
N a v a n e e t h10-Sep-09 20:08
N a v a n e e t h10-Sep-09 20:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.