Basically, I just took an demo of the RadGrid object and modified the code to allow me to bulk enter donations into our membership database.
My problem is that as soon as I select a value from either of the dropdowns and change focus to another object, the selected value is lost.
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<style type="text/css">
li.rlbItem .rlbText {
color: red;
}
.message {
line-height: 37px;
}
.RadGrid .rgRow,
.RadGrid .rgAltRow {
height: 30px;
}
.RadGrid_Silk .rgRow,
.RadGrid_Silk .rgAltRow,
.RadGrid_Glow .rgRow,
.RadGrid_Glow .rgAltRow {
height: 36px;
}
.RadGrid_MetroTouch .rgRow,
.RadGrid_MetroTouch .rgAltRow,
.RadGrid_BlackMetroTouch .rgRow,
.RadGrid_BlackMetroTouch .rgAltRow {
height: 46px;
}
</style>
<telerik:RadAjaxManager runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="SavedChangesList" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="ConfigurationPanel1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="ConfigurationPanel1"/>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1"></telerik:RadAjaxLoadingPanel>
<telerik:RadFormDecorator RenderMode="Lightweight" ID="RadFormDecorator1" runat="server" DecorationZoneID="demo" DecoratedControls="All" EnableRoundedCorners="false" />
<div id="demo" class="demo-container no-bg">
<h1>Donations</h1>
<telerik:RadListBox RenderMode="Lightweight" runat="server" ID="SavedChangesList" Width="600px" Height="200px" Visible="false"></telerik:RadListBox>
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"
AllowAutomaticInserts="True" PageSize="10" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted"
OnItemUpdated="RadGrid1_ItemUpdated" AllowAutomaticUpdates="True" AllowPaging="True"
AutoGenerateColumns="False" OnBatchEditCommand="RadGrid1_BatchEditCommand" DataSourceID="SqlDataSourceDonations">
<MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="DonationID"
DataSourceID="SqlDataSourceDonations" HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False">
<BatchEditingSettings EditType="Cell" HighlightDeletedRows="true"/>
<SortExpressions>
<telerik:GridSortExpression FieldName="Envelope" SortOrder="Ascending" />
</SortExpressions>
<Columns>
<telerik:GridBoundColumn DataField="DonationID" HeaderStyle-Width="0px" HeaderText="DonationID"
SortExpression="DonationID" UniqueName="DonationID" ReadOnly="true" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridNumericColumn DataField="Envelope" HeaderStyle-Width="80px" HeaderText="Envelope"
SortExpression="Envelope" UniqueName="Envelope">
<ColumnValidationSettings EnableRequiredFieldValidation="true">
<RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
</RequiredFieldValidator>
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridBoundColumn DataField="Donor" HeaderStyle-Width="350px" HeaderText="Donor"
SortExpression="Donor" UniqueName="Donor" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridDropDownColumn DataField="Fund" HeaderStyle-Width="250px" HeaderText="Fund" ListTextField="Fund" ListValueField="Fund" DataSourceID="SqlDataSourceFunds" DropDownControlType="DropDownList"
SortExpression="Fund" UniqueName="Fund">
<ColumnValidationSettings EnableRequiredFieldValidation="true">
<RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
</RequiredFieldValidator>
</ColumnValidationSettings>
</telerik:GridDropDownColumn>
<telerik:GridDateTimeColumn DataField="DonationDate" HeaderStyle-Width="120px" HeaderText="Donation Date"
SortExpression="DonationDate" UniqueName="DonationDate" DataFormatString="{0:yyyy-MM-dd}">
<ColumnValidationSettings EnableRequiredFieldValidation="true">
<RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
</RequiredFieldValidator>
</ColumnValidationSettings>
</telerik:GridDateTimeColumn>
<telerik:GridNumericColumn DataField="DonationAmount" HeaderStyle-Width="120px" HeaderText="Donation Amount"
SortExpression="DonationAmount" UniqueName="DonationAmount" DataFormatString="{0:C2}">
<ColumnValidationSettings EnableRequiredFieldValidation="true">
<RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
</RequiredFieldValidator>
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridDropDownColumn DataField="PaymentType" HeaderStyle-Width="150px" HeaderText="Payment Type" ListTextField="PaymentType" ListValueField="PaymentType" DataSourceID="SqlDataSourcePaymentTypes" DropDownControlType="DropDownList"
SortExpression="PaymentType" UniqueName="PaymentType">
<ColumnValidationSettings EnableRequiredFieldValidation="true">
<RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
</RequiredFieldValidator>
</ColumnValidationSettings>
</telerik:GridDropDownColumn>
<telerik:GridButtonColumn ConfirmText="Delete this Donation?" ConfirmDialogType="RadWindow"
ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="50px"
CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
</telerik:GridButtonColumn>
</Columns>
</MasterTableView>
<ClientSettings AllowKeyboardNavigation="true"></ClientSettings>
</telerik:RadGrid>
</div>
<asp:SqlDataSource ID="SqlDataSourceDonations" runat="server" ConnectionString="<%$ AppSettings: LocalConnectionInfo %>"
DeleteCommand="Exec UpdateDonation;"
InsertCommand="Exec UpdateDonation 'NEW', @Envelope, '', null, null, @DonationDate, @DonationAmount, null, null, null, @Fund, null, null, 'Monetary', null, @PaymentType;"
SelectCommand="Exec GetDonation @EnvelopeNumber=-1;"
UpdateCommand="Exec UpdateDonation @DonationID, @Envelope, '', null, null, @DonationDate, @DonationAmount, null, null, null, @Fund, null, null, 'Monetary', null, @PaymentType;">
<DeleteParameters>
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Envelope" Type="Int16"></asp:Parameter>
<asp:Parameter Name="Fund" Type="String"></asp:Parameter>
<asp:Parameter Name="DonationDate" Type="DateTime"></asp:Parameter>
<asp:Parameter Name="DonationAmount" Type="Decimal"></asp:Parameter>
<asp:Parameter Name="PaymentType" Type="String"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="DonationID" Type="String"></asp:Parameter>
<asp:Parameter Name="Envelope" Type="Int16"></asp:Parameter>
<asp:Parameter Name="Fund" Type="String"></asp:Parameter>
<asp:Parameter Name="DonationDate" Type="DateTime"></asp:Parameter>
<asp:Parameter Name="DonationAmount" Type="Decimal"></asp:Parameter>
<asp:Parameter Name="PaymentType" Type="String"></asp:Parameter>
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSourceFunds" runat="server" ConnectionString="<%$ AppSettings: LocalConnectionInfo %>"
SelectCommand="Exec GetValidFunds;">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSourcePaymentTypes" runat="server" ConnectionString="<%$ AppSettings: LocalConnectionInfo %>"
SelectCommand="Exec GetValidPaymentTypes;">
</asp:SqlDataSource>
</asp:Content>