I have one textbox and a check box in a grid. In the TextChanged server event I have some code that executes. When done with that code I need the cursor to go to the next textbox. As it is, it goes back to the textbox for the first record in the grid. Is it possible to make the cursor go to the textbox in the next record when tab or enter is pressed? The textbox is Amount Approved.
<telerik:RadGrid ID="gridFundingBills" runat="server" Width="1110px" AllowMultiRowSelection="True"
AutoGenerateColumns="False"
OnNeedDataSource="gridFundingBills_NeedDataSource"
OnItemDataBound="gridFundingBills_ItemDataBound"
OnItemCreated="gridFundingBills_ItemCreated"
SelectedItemStyle-CssClass="selectedrow"
GridLines="None" >
<MasterTableView DataKeyNames="FundingDtlID,SourceBankAcctID,RemainingAmt" EditMode="InPlace" Width="1090px"
NoMasterRecordsText="There are no open funding bills at this time">
<Columns>
<telerik:GridBoundColumn DataField="CustomerNm" FilterControlAltText="Filter CustomerNm column" HeaderText="Property" SortExpression="CustomerNm" UniqueName="CustomerNm" ItemStyle-Width="100px" HeaderStyle-Width="125px" HeaderStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="VendorNm" FilterControlAltText="Filter VendorNm column" HeaderText="Vendor" SortExpression="VendorNm" UniqueName="VendorNm" ItemStyle-Width="150px" HeaderStyle-Width="150px" HeaderStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BankAcct" FilterControlAltText="Filter BankAcct column" HeaderText="Bank" ReadOnly="True" SortExpression="BankAcct" UniqueName="BankAcct" ItemStyle-Width="125px" HeaderStyle-Width="125px" HeaderStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridHyperLinkColumn UniqueName="BillNo" HeaderText="Bill Reference #" DataTextField="BillNo" DataNavigateUrlFields="BillUrl" DataNavigateUrlFormatString="http://{0}" Target="_blank" ItemStyle-Width="175px" HeaderStyle-Width="150px">
</telerik:GridHyperLinkColumn>
<telerik:GridBoundColumn DataField="BillURL" FilterControlAltText="Filter BillURL column" ReadOnly="True" SortExpression="BillURL" UniqueName="BillURL" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BillPeriod" FilterControlAltText="Filter BillPeriod column" HeaderText="Bill Period" ReadOnly="True" SortExpression="BillPeriod" UniqueName="BillPeriod" ItemStyle-Width="125px" HeaderStyle-Width="125px" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DueDt" DataType="System.DateTime" FilterControlAltText="Filter DueDt column" HeaderText="Due Date" SortExpression="DueDt" UniqueName="DueDt" DataFormatString="{0:d}" ItemStyle-Width="75px" HeaderStyle-Width="75px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TotalAmt" DataType="System.Decimal" FilterControlAltText="Filter TotalAmt column" HeaderText="TotalAmt" SortExpression="Total Due" UniqueName="TotalAmt" DataFormatString="{0:F}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderStyle-Width="60px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="RemainingAmt" DataType="System.Decimal" FilterControlAltText="Filter RemainingAmt column" HeaderText="Remaining Balance" ReadOnly="True" SortExpression="RemainingAmt" UniqueName="RemainingAmt" DataFormatString="{0:F}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderStyle-Width="60px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FundingDtlID" DataType="System.Guid" FilterControlAltText="Filter FundingDtlID column" HeaderText="FundingDtlID" ReadOnly="True" SortExpression="FundingDtlID" UniqueName="FundingDtlID" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SourceBankAcctID" DataType="System.Guid" FilterControlAltText="Filter BankAcctID column" HeaderText="BankAcctID" ReadOnly="True" SortExpression="BankAcctID" UniqueName="BankAcctID" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Amount Approved" UniqueName="AmtApproved" HeaderStyle-Width="70px"
ItemStyle-Width="70px" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:TextBox ID="AmountApproved" runat="server" Width="55px" OnTextChanged="AmountApproved_TextChanged"
AutoPostBack="true" CssClass="numericAlign"></asp:TextBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="50px" ItemStyle-Width="50px">
</telerik:GridClientSelectColumn>
</Columns>
</MasterTableView>
<ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" ScrollHeight="300px"></Scrolling>
<ClientEvents OnRowSelected="handleTextBoxValue" OnRowDeselected="handleTextBoxValue" OnActiveRowChanged="sumAmtApproved" />
<Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" />
</ClientSettings>
</telerik:RadGrid>
protected void AmountApproved_TextChanged(object sender, EventArgs e)
{
//code to update values,
UpdateBalances();
//need to tab to AmountApproved in next record
}
<telerik:RadGrid ID="gridFundingBills" runat="server" Width="1110px" AllowMultiRowSelection="True"
AutoGenerateColumns="False"
OnNeedDataSource="gridFundingBills_NeedDataSource"
OnItemDataBound="gridFundingBills_ItemDataBound"
OnItemCreated="gridFundingBills_ItemCreated"
SelectedItemStyle-CssClass="selectedrow"
GridLines="None" >
<MasterTableView DataKeyNames="FundingDtlID,SourceBankAcctID,RemainingAmt" EditMode="InPlace" Width="1090px"
NoMasterRecordsText="There are no open funding bills at this time">
<Columns>
<telerik:GridBoundColumn DataField="CustomerNm" FilterControlAltText="Filter CustomerNm column" HeaderText="Property" SortExpression="CustomerNm" UniqueName="CustomerNm" ItemStyle-Width="100px" HeaderStyle-Width="125px" HeaderStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="VendorNm" FilterControlAltText="Filter VendorNm column" HeaderText="Vendor" SortExpression="VendorNm" UniqueName="VendorNm" ItemStyle-Width="150px" HeaderStyle-Width="150px" HeaderStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BankAcct" FilterControlAltText="Filter BankAcct column" HeaderText="Bank" ReadOnly="True" SortExpression="BankAcct" UniqueName="BankAcct" ItemStyle-Width="125px" HeaderStyle-Width="125px" HeaderStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridHyperLinkColumn UniqueName="BillNo" HeaderText="Bill Reference #" DataTextField="BillNo" DataNavigateUrlFields="BillUrl" DataNavigateUrlFormatString="http://{0}" Target="_blank" ItemStyle-Width="175px" HeaderStyle-Width="150px">
</telerik:GridHyperLinkColumn>
<telerik:GridBoundColumn DataField="BillURL" FilterControlAltText="Filter BillURL column" ReadOnly="True" SortExpression="BillURL" UniqueName="BillURL" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BillPeriod" FilterControlAltText="Filter BillPeriod column" HeaderText="Bill Period" ReadOnly="True" SortExpression="BillPeriod" UniqueName="BillPeriod" ItemStyle-Width="125px" HeaderStyle-Width="125px" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DueDt" DataType="System.DateTime" FilterControlAltText="Filter DueDt column" HeaderText="Due Date" SortExpression="DueDt" UniqueName="DueDt" DataFormatString="{0:d}" ItemStyle-Width="75px" HeaderStyle-Width="75px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TotalAmt" DataType="System.Decimal" FilterControlAltText="Filter TotalAmt column" HeaderText="TotalAmt" SortExpression="Total Due" UniqueName="TotalAmt" DataFormatString="{0:F}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderStyle-Width="60px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="RemainingAmt" DataType="System.Decimal" FilterControlAltText="Filter RemainingAmt column" HeaderText="Remaining Balance" ReadOnly="True" SortExpression="RemainingAmt" UniqueName="RemainingAmt" DataFormatString="{0:F}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderStyle-Width="60px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FundingDtlID" DataType="System.Guid" FilterControlAltText="Filter FundingDtlID column" HeaderText="FundingDtlID" ReadOnly="True" SortExpression="FundingDtlID" UniqueName="FundingDtlID" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SourceBankAcctID" DataType="System.Guid" FilterControlAltText="Filter BankAcctID column" HeaderText="BankAcctID" ReadOnly="True" SortExpression="BankAcctID" UniqueName="BankAcctID" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Amount Approved" UniqueName="AmtApproved" HeaderStyle-Width="70px"
ItemStyle-Width="70px" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:TextBox ID="AmountApproved" runat="server" Width="55px" OnTextChanged="AmountApproved_TextChanged"
AutoPostBack="true" CssClass="numericAlign"></asp:TextBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="50px" ItemStyle-Width="50px">
</telerik:GridClientSelectColumn>
</Columns>
</MasterTableView>
<ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" ScrollHeight="300px"></Scrolling>
<ClientEvents OnRowSelected="handleTextBoxValue" OnRowDeselected="handleTextBoxValue" OnActiveRowChanged="sumAmtApproved" />
<Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" />
</ClientSettings>
</telerik:RadGrid>
protected void AmountApproved_TextChanged(object sender, EventArgs e)
{
//code to update values,
UpdateBalances();
//need to tab to AmountApproved in next record
}