views:

44

answers:

2

Hello friends,

I am using collection class to work as datasource for gridview. Please download nopCommerce source from http://nopCommerce.com. I am following the same approach.

I have created my providers and collection classes being used as datasources for gridview. The data is binding perfectly. The problem is that i have to customize all the events for gridview like "RowDeleting", "RowUpdating", "RowCancellingEdit" etc. Above all the page is postback if i am clicking on edit, update or select buttons.

Can someone provide proper solution.

Thanks for sharing your time.

Regards Mohammad Irfan

A: 

Are you checking if the page is posting back before you Bind your data?

i.e.:

protected void Page_Load(object sender, EventArgs e)
{

    if(!IsPostBack)
    {
         BindGridView();

    }

}
TheGeekYouNeed