what are grid events ?code for dropdown inside grid and
binding dropdown syntax

Answer Posted / om shivaya namaha

two ways are their to bind the data in the Grid:-
GridID_ItemDatabound()
{
textbox txt =new textbox();
dataset ds=new dataset();
ds=bind data from DataBase;
txt=(textbox)e.item.findcontrol("ddl");
txt.datasource=ds;
txt.databind();
}

like that we can bind data to dropdown list through
ItemCommand also

ItemDatabound will fire when ever we are binding the data to
datagrid it will iterate for each row and each Item

ItemCommand will fire when ever we click on any control in
the datagrid then it will fire but it will refer to the
current row in a datagrid


Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you implement inheritance using c#?

569


Can anyone please tell me that the question posted on this website are Sufficient for the interview with 2+ year experience in .net

1497


We Only Know The Total Number Of Feet In The Farmyard. Write A Program that will compute the total number of rabbits and chickens in the farmyard. Assume number of feet in the farmyard are 40. how many rabbits and chickens are?

431


What type of code, client-side or server-side, is found in a code-behind file of a Web page?

579


Where is asp.net session stored?

473






What is difference between datalist and gridview?

573


How can we create custom controls in asp net?

531


What’s the use of “GLOBAL.ASAX” file?

594


How to add DateTime Control in normal DataGrid Server Control?

578


Explain the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

507


What is preprocessor in .net and type, where it use?

653


Explain about Application and Session Events ?

631


Write the different features of a Thread and a Process?

621


Is post back property in asp net?

522


Define authentication and authorization.

615