16,012,223 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by mibi@4289 (Top 12 by date)
mibi@4289
16-Nov-11 5:07am
View
Deleted
Have executed the Stored procedure successfully?
mibi@4289
14-Nov-11 7:17am
View
"a" is repeated twice
mibi@4289
14-Nov-11 0:09am
View
Any Example data?
Brief the flow..
mibi@4289
23-Aug-11 3:14am
View
Why exception is occurred there?
Please clarify my doubt
mibi@4289
23-Aug-11 3:06am
View
I have done that also but again the same
ddl.DataSource = ds.Tables[0].DefaultView ;
In this line its shOWing exception
mibi@4289
23-Aug-11 2:55am
View
i am getting an exception as Object reference not set to an instance of an object. Please help me
protected void grv1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (grv1 .EditIndex == e.Row.RowIndex)
{
SqlConnection oconn = new SqlConnection(conn);
oconn.Open();
SqlDataAdapter oda = new SqlDataAdapter ("select*from Designation", oconn);
DropDownList ddl = (DropDownList)e.Row.Cells[2].FindControl("ddldesignation");
DataSet ds = new DataSet();
oda.Fill(ds,"temp");
ddl.DataSource = ds.Tables[0].DefaultView ;
ddl.DataTextField = "DESIGNAME";
ddl.DataValueField = "DESIGID";
ddl.DataBind();
//databind here
}
mibi@4289
23-Aug-11 2:43am
View
Thank you,i got the join query, but i need the coding for binding dropdownlist while editing
mibi@4289
23-Aug-11 2:40am
View
i want the coding for the above mentioned exercise. please help me out
mibi@4289
23-Aug-11 2:37am
View
string conn = ConfigurationManager.ConnectionStrings["connect"].ToString();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
FillGrid();
}
}
protected void grv1_RowEditing(object sender, GridViewEditEventArgs e)
{
grv1.EditIndex = e.NewEditIndex;
FillGrid();
void FillGrid()
{
SqlConnection oconn = new SqlConnection(conn);
oconn.Open();
SqlDataAdapter oda = new SqlDataAdapter("select E.EID,E.ENAME,D.DESIGNAME from Employee E Inner join Designation D on D.DesigID =E.DesigID", oconn);
DataSet ds = new DataSet ();
oda.Fill(ds,"temp");
grv1.DataSource = ds.Tables[0];
grv1.DataBind();
oconn.Close();
}
protected void grv1_RowDataBound(object sender, GridViewRowEventArgs e)
{
SqlDataReader ddr = null;
SqlConnection oconn = new SqlConnection(conn);
SqlCommand ocmd = new SqlCommand("select*from designation", oconn);
oconn.Open();
ddr = ocmd.ExecuteReader(CommandBehavior.CloseConnection);
DropDownList ddl = new DropDownList();
if (grv1.EditIndex == e.Row.RowIndex)
{
ddl = (DropDownList)e.Row.Cells[2].FindControl("ddldesignation");
ddl.DataSource = ddr;
ddl.DataTextField = "DesigName";
ddl.DataValueField = "DesigId";
ddl.DataBind();
}
mibi@4289
23-Aug-11 2:27am
View
i got this exercise in my interview. i couldn't do it using dropdownlist.
i am trying it but not getting.. Please help in this.
mibi@4289
23-Aug-11 2:26am
View
i couldn't bind the dropdownlist on click of Edit link. Please help me out..
mibi@4289
23-Aug-11 2:24am
View
Deleted
how should i bind a dropdownlist while editing and updating?
Show More