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 to handle errors in Web API?
What is asp.net localization?
What are the versions of garbage collection?
How is it possible for .NET to support many languages?
What is session authentication?
How does a content page different from a master page?
In a page I have gridview with options of select and delete using hyperlink when I am selecting any one of then it has to open another page how can it?
What are the different types of validation controls in asp.net?
Define xmlvalidatingreader class.
Is asp.net and .net are same or different?
Define common type system?
What is syntax code to send email from an asp.net application?
Can I have a unique key as foreign key?
What is asp.net and ado net?
Define resource files.