Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Hi,
I am a fresher. i have a problem related to DataGrid .
i have a data grid and i have to place a dropdown in the
datagrid.and i have to retrieve the values from the database
(sqlserver).please tell me any idea about the code.



Hi, I am a fresher. i have a problem related to DataGrid . i have a data grid and i have to place..

Answer / ignatius

put the code inCODEFILE

public DataSet PopulateDDList()
{
string sqlString ="select
emp_name,emp_id from emp_current where
emp_des='"+Des.PM+"'";/*ANY*/
SqlDataAdapter ad = new
SqlDataAdapter(sqlString,new log().db);
DataSet ds = new DataSet();
ad.Fill(ds);
return ds;
}

in the follwing aspx

<EditItemTemplate>

<asp:DropDownList id=DropDownList1 runat="server"
DataSource="<%#PopulateDDList()%>" DataTextField="emp_name"
DataValueField="emp_id">

</asp:DropDownList>

</EditItemTemplate>

Actually this is work well

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

Explain the use of dataadapter.

0 Answers  


how many session modes are available?some brief explnation

1 Answers  


What is custom events?

0 Answers  


Types of exceptions in dot net???

1 Answers   TCS,


How can I configure asp.net applications that are running on a remote machine?

0 Answers  


Can two different programming languages be mixed in a single ASMX file?

1 Answers   IBM, Patni, Wipro,


Best Institute in india for online training (Dotnet/java/Tibco/Dwh/etc.....)

4 Answers  


What is web api vs wcf?

0 Answers  


hi all, can we sort the data set without using the gridview sort method

1 Answers   CGI,


To call a Web service SOAP which transport protocol you use?

3 Answers   Siebel,


Describe how ASP.NET maintains process isolation for each Web application?

0 Answers   B-Ways TecnoSoft,


What is client side state management?

0 Answers  


Categories