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

Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?

617


I’m having some trouble with cas. How can I diagnose my problem?

594


A Web Service Can Only Be Written In .net. Is it True??

642


When should I use server transfer and response redirect?

516


What are ASHX files?

603






What are the different web pages?

497


How you can access the properties and controls of master pages from content pages?

513


What are the steps involved to fill a dataset?

556


Differentiate between client-side and server-side validations in web pages.

564


How many types of cookies are available in asp?

583


What is dynamic web page with example?

528


if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....

1604


Explain the various authentication mechanisms in asp.net.

493


What is an axd file?

594


What are sql joins?

572