Hi there,
i want to update my DataSource of the RadGrid with the Rebind-Method in a Button_Click-Event.
In the NeedDataSource i update the DataSource properly but the new DataSource is not shown in my Grid. It just don“t do any update.
Can you me help out here?
Here my Grid:
And here my Events:
Do you know what i“m missing in this scenario?
regards
Luke
i want to update my DataSource of the RadGrid with the Rebind-Method in a Button_Click-Event.
In the NeedDataSource i update the DataSource properly but the new DataSource is not shown in my Grid. It just don“t do any update.
Can you me help out here?
Here my Grid:
<telerik:RadGrid ID="radInvoiceOverview" runat="server" AutoGenerateColumns="true" OnNeedDataSource="radInvoiceOverview_NeedDataSource" GridLines="None" Width="650px" AllowPaging="true" PageSize="100" ShowHeader="true" ItemStyle-Height="30px" AlternatingItemStyle-Height="30px"> <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true" EnableRowHoverStyle="true"> <Selecting AllowRowSelect="true"/> </ClientSettings> <SortingSettings EnableSkinSortStyles="false"/> <PagerStyle Mode="NumericPages" AlwaysVisible="true" PageButtonCount="10" PagerTextFormat="{4} Page {0} from {1}, Transactions {2} to {3}"/> <MasterTableView EnableNoRecordsTemplate="true" AutoGenerateColumns="true"> <NoRecordsTemplate> <div style="width:100%;text-align:center;margin-top:10px;margin-bottom:10px;"><b>some Text</b></div> </NoRecordsTemplate> </MasterTableView> </telerik:RadGrid>
And here my Events:
protected void btnShow_Click(object sender, EventArgs e) { radInvoiceOverview.Rebind(); } protected void radInvoiceOverview_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { try { radInvoiceOverView.DataSource = GetUnprintedInvoicesForClient(); //<-- brings a DataTable as Source } catch (Exception ex) { //do some logging } }regards
Luke