UPDATED:
Starting with version 13.2, the ASPxGridView control offers the basic "Batch Editing Mode" functionality that allows accomplishing a similar task with less effort and does not require so much extra code. See the ASP.NET WebForms & MVC: GridView Batch Edit blog post to learn more about this new functionality.
Starting with version 14.1, the ASPxGridView control offers advanced "Batch Editing Mode" programming options.
You can find a standalone DB-independent solution in our Code Examples base at:
ASPxGridView - A simple Batch Editing implementation
If you have version v14.1+ available, consider using the built-in functionality instead of the approach detailed below.
If you need further assistance with this functionality, please create a new ticket in our Support Center.
The sample demonstrates how to send individual callbacks to the database to perform instant editing of the datatable without switching the grid to Edit mode. The XPO is used for demonstrating purposes only. If the SqlDataSource is used, it will be enough to create corresponding SQL statements and perform partial updating manually.
See Also:
Implement on-demand data posting (batch data update)
How to update a Boolean field using the ASPxCheckBox in a DataItem template
The general technique of using the Init/Load event handler
How to implement the multi-row editing feature in the ASPxGridView
Custom client-side logic implementation in the grid with multi-row editing
Question Comments
Added By: Almoayed Services at: 2/24/2013 6:15:16 AM
When i am implimenting this appoach it takes too much time to Load the grid (around 90 rows)...
Please give solution to this issue , also when I am bining to the table if any value is there in database I want to display that value in the DataitemTemplate Control..
Any help on the below is highly appriciated
here is mu Aspx File
-------------------------------Aspx--------------------------------
<td>
<dxwgv:aspxgridview id="Grid" runat="server" clientinstancename="grid"
width="100%" AutoGenerateColumns="False" KeyFieldName="TimeCardID">
<SETTINGS ShowFilterRowMenu="False" ShowGroupPanel="False" ShowFilterRow="False" />
<SETTINGSCUSTOMIZATIONWINDOW PopupVerticalAlign="TopSides" PopupHorizontalAlign="LeftSides" Enabled="True" />
<SETTINGSPAGER PageSize="100" />
<SETTINGSBEHAVIOR ColumnResizeMode="Control" />
<SETTINGSTEXT CustomizationWindowCaption="Available Columns" />
<Columns>
<dxwgv:GridViewDataColumn Caption = "SerialNo" FieldName="SerialNo" VisibleIndex="0" ReadOnly="true" Width="8px">
</dxwgv:GridViewDataColumn>
<dxwgv:GridViewDataColumn Caption = "Date" FieldName="ForDate" VisibleIndex="0" ReadOnly="true">
</dxwgv:GridViewDataColumn>
<dxwgv:GridViewDataTextColumn Caption = "Job" FieldName="JobID" VisibleIndex="4">
<DataItemTemplate>
<dxe:ASPxComboBox ID="cmbJob" runat="server" ValueType="System.Int32" ValueField="JobId" TextField="JobName"
OnInit="cmb_Init" DataSourceID="sds_Job" Width="120px">
</dxe:ASPxComboBox>
</DataItemTemplate>
</dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn Caption = "Site" FieldName="SiteID" VisibleIndex="4">
<DataItemTemplate>
<dxe:ASPxComboBox ID="cmbSite" runat="server" ValueType="System.Int32" ValueField="SiteID" TextField="SiteDescription"
OnInit="cmb_Init" DataSourceID="sds_Site" Width="100px">
</dxe:ASPxComboBox>
</DataItemTemplate>
</dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn Caption="Is Actual" FieldName="IsActual" VisibleIndex="4">
<DataItemTemplate>
<dxe:ASPxCheckBox ID="chkIsActual" runat="server" Width="50px" ValueField="IsActual"
>
</dxe:ASPxCheckBox>
</DataItemTemplate>
</dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn FieldName="txtNormal" VisibleIndex="4" Caption="Basic">
<DataItemTemplate>
<dxe:ASPxTextBox ID="txtNormal" runat="server" Width="60px" ValueField="NormalHrs"
OnInit="txtText_Init">
</dxe:ASPxTextBox>
</DataItemTemplate>
</dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn FieldName="OT1" VisibleIndex="4" Width="100px">
<DataItemTemplate>
<dxe:ASPxTextBox ID="txtOT1" runat="server" Width="60px" ValueField="OT1"
OnInit="txtText_Init">
</dxe:ASPxTextBox>
</DataItemTemplate>
</dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn FieldName="OT2" VisibleIndex="4" Width="100px">
<DataItemTemplate>
<dxe:ASPxTextBox ID="txtOT2" runat="server" Width="60px" ValueField="OT2"
OnInit="txtText_Init">
</dxe:ASPxTextBox>
</DataItemTemplate>
</dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn FieldName="Remarks" VisibleIndex="4" Width="100px">
<DataItemTemplate>
<dxe:ASPxTextBox ID="txtRemarks" runat="server" Width="60px" ValueField="Remarks"
OnInit="txtText_Init">
</dxe:ASPxTextBox>
</DataItemTemplate>
</dxwgv:GridViewDataTextColumn>
</Columns>
</dxwgv:aspxgridview>
</td>
</tr>
<tr>
<td>
<asp:SqlDataSource ID="employeeList" runat="server" ConnectionString="Provider=SQLOLEDB;Data Source=lab-pc;Password=sqlman;User ID=sa;Initial Catalog=ceglecnew"
ProviderName="System.Data.OleDb" SelectCommand="SELECT ActiveEmployees.EmpCode, ActiveEmployees.EmployeeName as EmpName, Employee_Mst.IsOTAllowed FROM ActiveEmployees INNER JOIN Employee_Mst ON ActiveEmployees.EmpCode = Employee_Mst.EmpCode ">
</asp:SqlDataSource>
<asp:SqlDataSource ID="sds_Job" runat="server" ConnectionString="Provider=SQLOLEDB;Data Source=lab-pc;Password=sqlman;User ID=sa;Initial Catalog=ceglecnew"
ProviderName="System.Data.OleDb" SelectCommand="SELECT -99 as JobID, 'Select' as JobName union SELECT JobID, JobName FROM JobTimeCard_mst where Status=1 order by JobID ">
</asp:SqlDataSource>
<asp:SqlDataSource ID="sds_Site" runat="server" ConnectionString="Provider=SQLOLEDB;Data Source=lab-pc;Password=sqlman;User ID=sa;Initial Catalog=ceglecnew"
ProviderName="System.Data.OleDb" SelectCommand="select -99 as SiteID,'Select' as SiteDescription union SELECT SiteID, SiteDescription FROM Site_mst order by SiteID">
</asp:SqlDataSource>
<dx:ASPxCallback ID="cb" runat="server" ClientInstanceName="cb" OnCallback="cb_Callback">
</dx:ASPxCallback>
</td>
</tr>
-------------------------end here-------------------------------------------------------
This is how am binding the datasource , SQL server the Qry is not taking time ,it gives the table instanlty..
Dim dtTime As Data.DataTable
dtTime = GB.ExecuteToDataSet(Qry).Tables(0)
Grid.DataSource = dtTime
Grid.DataBind()
------------------------------------------------------------------------------------------------------------------
Added By: Farzana Shuchy at: 5/25/2013 11:27:36 PMhow can i connect the data source for dynamic value in example http://www.devexpress.com/example=E2333