Jul 9, 2010

what are grid events ?code for dropdown inside grid and binding dropdown

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

No comments:

Post a Comment