I have a RadGrid that needs to have dynamic DataSource. The grid will have an A to Z index, where only names started by selected alphabeth is displayed.
When the grid is first loaded, the datasource is by default:
<asp:LinqDataSource ID="ldsMember" ContextTypeName="RedBuckDataContext" TableName="RB_Members" OrderBy="FIFOType" runat="server" />
It loads fine, I can edit, insert and delete columns with no problems.
When an A-Z linkbutton is clicked, the grid's datasource is changed:
using (RedBuckDataContext rbdc = new RedBuckDataContext())
var member = (from m in rbdc.RB_Members
rgMember.DataSource = member.ToList();
rgMember.DataSourceID = null;
The grid displays only data starated with the selected alphabeth, which is good!
The problem is, when I click "Edit" to modify the data, the grid does not display anything. The rows displayed were gone. It is like the datasource has been resetted.
Can anyone please help me on this?