I have some server-side activity that toggles the visible property of some of the rows prior to the rebind, but I don't think that should affect the behavior of the grid. The following is done from a button click:
.
.
.
var retval = ADAdvisor.ws.ADAdvisorMaintService.InvestorAccountsForCF(parseInt(currInvID.value), UpdateAccountList);
}
function UpdateAccountList(result) {
var tableView = $find("<%= radGridAccounts.ClientID %>").get_masterTableView();
tableView.set_dataSource(result);
tableView.dataBind();
}
And, here is the grid with the template column checkbox:
<telerik:RadGrid ID="radGridAccounts" runat="server" Width="480px" Height="300px" Skin="Black" AllowMultiRowSelection="true" >
<ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="True" >
<Selecting AllowRowSelect="true" UseClientSelectColumnOnly="false" />
<Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true" />
</ClientSettings>
<MasterTableView AutoGenerateColumns="false" Font-Size="Larger" DataKeyNames="UserID,InvAcctID,AcctTypeCode" NoMasterRecordsText="All Accounts Assigned to Cash Flows..." >
<Columns>
<telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Select for<br/>Cash Flow" >
<ItemTemplate>
<asp:Panel ID="Panel1" runat="server" >
<asp:CheckBox ID="chkBoxCFAccts" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="AccountChecked" />
</asp:Panel>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="AcctDesc"
HeaderText="Account Description:"
SortExpression="AcctDesc"
UniqueName="AcctDesc"
HeaderStyle-Width="200px" />
<telerik:GridBoundColumn DataField="CurrBalance"
HeaderText="Balance:"
SortExpression="CurrBalance"
UniqueName="CurrBalance"
HeaderStyle-Width="90px" />
<telerik:GridBoundColumn DataField="AcctTypeName"
HeaderText="Account Type:"
SortExpression="AcctTypeName"
UniqueName="AcctTypeName"
HeaderStyle-Width="100px" />
<telerik:GridBoundColumn DataField="UserID"
HeaderText="UserID:"
Visible="false" />
<telerik:GridBoundColumn DataField="InvAcctID"
HeaderText="InvAcctID:"
Visible="false" />
<telerik:GridBoundColumn DataField="AcctTypeCode"
HeaderText="AcctTypeCode:"
Visible="false" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
I'm sure I am missing something simple, but I just can't solve this one.
Thanks,
Shahryar