I have a button and a couple of textboxes on a form with two radgrid controls. I fill out the textboxes and click the button. The button calls javascript when clicked. In the handler I call get_masterTableView().rebind(); for each radgrid. Only the last grid that I call rebind for actually rebinds. The grids both use different LinqDataSources. Each LinqDataSource has the Selecting event wired up which returns a linq result of columns. Why is only one radgrid rebinding?
Each radgrid looks similar to this one. The only difference is the ID, DataSourceID, and name of the OnGridCreated handler.
<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Height="100%" Width="100%" LoadingPanelID="RadAjaxLoadingPanel1">
<telerik:RadGrid ID="RadGridEnhanced" runat="server" AllowPaging="True"
Skin="Office2007" GridLines="None"
AutoGenerateColumns="False"
AllowAutomaticDeletes="True" ShowFooter="True"
DataSourceID="LinqDataSourceEnhancedAdvertising" >
<ClientSettings>
<selecting allowrowselect="True" />
<ClientEvents OnGridCreated="GetGridObjectEnhanced"></ClientEvents>
</ClientSettings>
<mastertableview datakeynames="ID" datasourceid="LinqDataSourceEnhancedAdvertising">
<Columns>
<telerik:GridBoundColumn DataField="PromotionStartDate"
DataFormatString="{0:d}" DataType="System.DateTime" FooterText="Total"
HeaderText="Promotion Start Date" SortExpression="PromotionStartDate"
UniqueName="PromotionStartDate">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PromotionEndDate" DataFormatString="{0:d}"
DataType="System.DateTime" HeaderText="Promotion End Date"
SortExpression="PromotionEndDate" UniqueName="PromotionEndDate">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn Aggregate="Sum" DataField="DiscountValue"
DataFormatString="{0:C}" DataType="System.Double" DefaultInsertValue=""
FooterAggregateFormatString="{0:C}" HeaderText="Discount Value"
SortExpression="DiscountValue" UniqueName="DiscountValue">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CityRegion" DataType="System.String"
HeaderText="City/Region" SortExpression="CityRegion" UniqueName="CityRegion">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="IndustryType" DataType="System.String"
HeaderText="Industry Type" SortExpression="IndustryType"
UniqueName="IndustryType">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" Display="False"
HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID">
</telerik:GridBoundColumn>
</Columns>
</mastertableview>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
<asp:LinqDataSource ID="LinqDataSourceEnhancedAdvertising" runat="server"
AutoPage="False" ContextTypeName="CharityCheck.CharityCheckEntities"
onselecting="LinqDataSourceEnhancedAdvertising_Selecting"
TableName="EnhancedBusinessAdvertisingsSet">
</asp:LinqDataSource>
Each radgrid looks similar to this one. The only difference is the ID, DataSourceID, and name of the OnGridCreated handler.
<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Height="100%" Width="100%" LoadingPanelID="RadAjaxLoadingPanel1">
<telerik:RadGrid ID="RadGridEnhanced" runat="server" AllowPaging="True"
Skin="Office2007" GridLines="None"
AutoGenerateColumns="False"
AllowAutomaticDeletes="True" ShowFooter="True"
DataSourceID="LinqDataSourceEnhancedAdvertising" >
<ClientSettings>
<selecting allowrowselect="True" />
<ClientEvents OnGridCreated="GetGridObjectEnhanced"></ClientEvents>
</ClientSettings>
<mastertableview datakeynames="ID" datasourceid="LinqDataSourceEnhancedAdvertising">
<Columns>
<telerik:GridBoundColumn DataField="PromotionStartDate"
DataFormatString="{0:d}" DataType="System.DateTime" FooterText="Total"
HeaderText="Promotion Start Date" SortExpression="PromotionStartDate"
UniqueName="PromotionStartDate">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PromotionEndDate" DataFormatString="{0:d}"
DataType="System.DateTime" HeaderText="Promotion End Date"
SortExpression="PromotionEndDate" UniqueName="PromotionEndDate">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn Aggregate="Sum" DataField="DiscountValue"
DataFormatString="{0:C}" DataType="System.Double" DefaultInsertValue=""
FooterAggregateFormatString="{0:C}" HeaderText="Discount Value"
SortExpression="DiscountValue" UniqueName="DiscountValue">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CityRegion" DataType="System.String"
HeaderText="City/Region" SortExpression="CityRegion" UniqueName="CityRegion">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="IndustryType" DataType="System.String"
HeaderText="Industry Type" SortExpression="IndustryType"
UniqueName="IndustryType">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" Display="False"
HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID">
</telerik:GridBoundColumn>
</Columns>
</mastertableview>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
<asp:LinqDataSource ID="LinqDataSourceEnhancedAdvertising" runat="server"
AutoPage="False" ContextTypeName="CharityCheck.CharityCheckEntities"
onselecting="LinqDataSourceEnhancedAdvertising_Selecting"
TableName="EnhancedBusinessAdvertisingsSet">
</asp:LinqDataSource>