protected void DataGrid1_ItemDataBound(object sender, DataGridItemEventArgs e)
{
try
{
if(e.Item.ItemType!=ListItemType.Header && e.Item.ItemType!=ListItemType.Footer)
{
DropdownList ddlGrid=(DropDownList) e.Item.Cells[cell Number where your control is];
//here write your binding code to bind dropdown list, you can get the data in the same row using //e.Item.Cells[0] or by mentioning the cell number wherever you want.
}
}
the item databound event is called after binding each row. if you are passing some argument while binding the data you can do it by writing your code within this method
Regards
Sreetharan S.T
The purpose of Smart Navigation property to maintain the scroll
position of pages across postbacks.Supposing we have a very long page
with lots of controls. A user is in the middle of the page and triggers
an event (say click event), which causes the page to postback. Then the
page will be reloaded and the position would go to the top.
This could be particularly annoying if the user has to scroll down long
and repetitively.
To avoid this, ASP.NET provides the SmartNavigation property for the
page which takes care of the scroll position.
SmartNavigation also avoids the flickering of the page when the page is
reloaded.
It can be enabled by simply setting its value to true in the page
directive, as follows:-
<%Page smartNavigation="True" %>
Alternatively, it can be specified as a global setting in the
web.config as follows:-
<configuration>
<system.web>
<pages smartNavigation="true"/>
</system.web>
</configuration>
Regards,
Satheesh