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
What's the difference between viewstate and sessionstate?
How does asp net store session ids by default?
What is Web API Routing?
What are app services?
What is scope of an application variable in asp.net?
Why session management is required?
how to debug web services on consumer side?
What are the benefits of Razor View?
If we remove web.config or machine.config from the application then, is this application will works?
What is asp net_sessionid?
How to reduce the width of textbox in editcommandcolumn of datagrid?
What is difference between cookies and cache?
Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?
What are user controls?
Is LINQ performance wise better or using sqlcommand?