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

Define static function?

745


What is viewstate information stored?

833


Difference between web user control and web custom control?

672


What is the importance of Global.asax in ASP.NET?

761


What does asp in asp.net stand for?

726


Explain the main differences between asp and asp.net?

718


How to find last error which occurred?

751


To get the values in two different controls to match which control you use it?

781


Explain the disadvantages of viewstate?

757


What is windows active directory authentication?

768


Why we are using mvc instead of asp.net? : Asp.Net MVC

696


What is query string? What are its advantages and limitations?

730


Can I tap into other windows livetm services?

749


What is _viewstart?

688


What is a 1x1 pixel?

710