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

Will the asp.net validators run in server side or client side?

650


What is the Difference between MVC And MVP design pattrens

2211


Explain different types of Caching techniques in ASP.NET?

556


What are the best practices to follow to secure connection strings in an ASP.NET web application?

562


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

524






Is it possible to create web application with both webforms and mvc?

542


What is the difference between system.stringbuilder and system.string

271


Mention the namespace that is used to include .net data provider for sql server in .net code?

509


Explain exception handling in .net.

618


What is a 401 redirect?

518


Where is session data stored in asp net?

517


What types of data validation events are commonly seen in the client-side form validation?

571


What is enableviewstate in asp net?

534


Why we use content place holder in asp.net?

505


Write a code for passing ArrayList in Web API?

1065