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
How would you implement inheritance using c#?
Can anyone please tell me that the question posted on this website are Sufficient for the interview with 2+ year experience in .net
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?
What type of code, client-side or server-side, is found in a code-behind file of a Web page?
Where is asp.net session stored?
What is difference between datalist and gridview?
How can we create custom controls in asp net?
What’s the use of “GLOBAL.ASAX” file?
How to add DateTime Control in normal DataGrid Server Control?
Explain the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc
What is preprocessor in .net and type, where it use?
Explain about Application and Session Events ?
Write the different features of a Thread and a Process?
Is post back property in asp net?
Define authentication and authorization.