Follow the example.
1 - Open Page1 and then Page2 on another browser tab.
2 - Return to Page1 and click in the Update button. The grid records of Page2 are displayed in the grid.
private void BindDataSource()
{
int orderId = 10643;
int empId = 0;
.
.
.
this.OrdersGrid.DataSource = order;
this.OrdersGrid.DataBind();
}
|
private void BindDataSource()
{
int orderId = 10643;
int empId = 0;
.
.
.
this.OrdersGrid.DataSource = order;
this.OrdersGrid.DataBind();
}
|
<ej:Button ID="Button1" runat="server" Type="Button" OnClick="Button1_Click" Text="Update"></ej:Button>
<ej:Grid ID="OrdersGrid1" runat="server" DataSourceCachingMode="Session" AllowPaging="True"> |
this.OrdersGrid1.DataSource = order;
this.OrdersGrid1.DataBind();
} |
Thank you, Vignesh.
Are there any other alternatives besides this? Because as pages are standardized I would keep the grid on the master page and on the child pages I would load it.
Yes, I want to render the reusable Grid and I expect bind different data to the Grid dynamically.
I placed grid in master page because all the pages will follow the same pattern, I will have a registration form and as I add new records, edit or delete existing records, I reload the grid.