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
Will the asp.net validators run in server side or client side?
What is the Difference between MVC And MVP design pattrens
Explain different types of Caching techniques in ASP.NET?
What are the best practices to follow to secure connection strings in an ASP.NET web application?
Explain the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc
Is it possible to create web application with both webforms and mvc?
What is the difference between system.stringbuilder and system.string
Mention the namespace that is used to include .net data provider for sql server in .net code?
Explain exception handling in .net.
What is a 401 redirect?
Where is session data stored in asp net?
What types of data validation events are commonly seen in the client-side form validation?
What is enableviewstate in asp net?
Why we use content place holder in asp.net?
Write a code for passing ArrayList in Web API?