I'm new to asking on stack overflow so go easy on me plz.
Using VS2012 premium edition and web forms 4.5.2.
I'm trying to update the gridview on postback.. (it updates when redirects) and I've searched a lot of articles but it only says about databind.. actually I am not databinding I'm using the selectmethod
<asp:GridView runat="server" ID="someGrid" CellPadding="10"
DataKeyNames="idx" AutoGenerateColumns="true"
selectMethod="someGrid_GetData" ItemType="orders">
</asp:GridView>
and I am just calling the selectMethod on the behind.
public IQueryable someGrid_GetData()
{
someContext soc = new someContext();
var item = order.Where(s => s.idx == s.idx);
return item;
}
It works like a charm, but one thing.. It doesn't update when postback. I put
someGrid.databind()
on page_load() !ispostback
but it doesn't work.
It seems like an easy fix, but I've been struggling with this for hours.
Thanks in advance.