Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all 7205 articles
Browse latest View live

OBSOLETE - GridView - How to enable unobtrusive validation for inline edit form

$
0
0

Starting with DevExpress 14.1, the ASP.NET MVC GridView extension fully supports the unobtrusive client validation for built-in edit forms. Refer to the Support unobtrusive validation for the GridView's built-in edit form thread to learn more.

If you have version v14.1+ available, consider using the built-in functionality instead of the approach detailed below.
If you need further clarification, create a new ticket in our Support Center.

This example demonstrates how to implement unobtrusive validation for the editors inside the grid's inline edit form.


jQuery parsing is only done after the initial page load, so the forms that were loaded via callbacks after the page load are not parsed. To resolve this, use the approach from the How to correctly enable Model, Unobtrusive or jQuery Client validation article.

Since the client click should be handled to validate editors on the client, use the unbound column that will serve as a command column during editing.


Note that the actual data source update isn't implemented in this example.

See Also:
How to enable unobtrusive validation for GridView using the EditForm template


OBSOLETE - How to enable unobtrusive validation for GridView using the EditForm template

$
0
0

Starting with DevExpress 14.1, the ASP.NET MVC GridView extension fully supports the unobtrusive client validation for built-in edit forms. Refer to the Support unobtrusive validation for the GridView's built-in edit form thread to learn more.

If you have version v14.1+ available, consider using the built-in functionality instead of the approach detailed below.
If you need further clarification, create a new ticket in our Support Center.

The example illustrates how to implement unobtrusive validation for GridView editors. Create an Edit Form template that contains a form and all necessary editors. Corresponding validation attributes will be rendered for the template.
The main requirement is that the updating should be performed using a helper script. In the script block, we prepare validation conditions and check them for the form (that is located within the Edit Form template). If all editors are valid, the grid's UpdateEdit command is invoked.

[JScript]
function UpdateGridView(){ PrepareValidationScripts();var validator = $.data($('#frmProduct')[0], 'validator');if(validator.form()) grid.UpdateEdit();}function PrepareValidationScripts(){var form = $('#frmProduct');if(form.executed)return; form.removeData("validator"); $.validator.unobtrusive.parse(document); form.executed = true;}

GridView - EditForm template - How to enable Microsoft MVC validation
GridView - How to perform a custom client side unobtrusive validation for the EditForm template using a custom attribute

Question Comments

Added By: K R at: 6/14/2013 5:30:59 AM    

Unable to download this example, error below

ICAP Error (icap_error)

 
An error occurred while performing an ICAP operation: Maximum file size exceeded; File: GetExample; Sub File: Content\Site.css; Vendor: Kaspersky Labs; Engine error code: 0x00000000; Engine version: 8.1.8.79; Pattern version: 130614.102700.10398212; Pattern date: 2013.06.14 10:27:00
There could be a network problem, the ICAP service may be misconfigured, or the ICAP server may have reported an error.

For assistance, contact your network support team.

Added By: Vasily (DevExpress Support) at: 6/17/2013 8:00:14 AM    

Hi,

We detected that you have posted the same question to ticket Q502783 (ICAP Error occurs when downloading example:"An error occurred while performing an ICAP operation: Maximum file size exceeded"). We kindly ask you to avoid posting duplicated issues in the future. This will save time, and will allow us to provide better service.

We will post our answer in ticket Q502783 (ICAP Error occurs when downloading example:"An error occurred while performing an ICAP operation: Maximum file size exceeded").

OBSOLETE - How to implement collapsible ASPxRoundPanel

$
0
0

Starting with version v2014 vol 1 (v14.1), this functionality is available out of the box:
S19663: ASPxRoundPanel - Implement the collapsible functionality

Simply set the ASPxRoundPanel.ShowCollapseButton property to True to activate it. Please refer to the Load Content on Demand demo for more information.

If you have version v14.1+ available, consider using the built-in functionality instead of the approach detailed below.
If you need further clarification, create a new ticket in our Support Center.

This sample demonstrates how to implement collapsible ASPxRoundPanel functionality.

How to change a modified cell appearance

$
0
0

On the object level implement the Dictionary collection that includes a property-state pair to determine the cell state for the current object property.Change the ValueState value when a cell is being modified and call the PropertyChanged method to inform the GridControl that it is necessary to refresh the cell appearance. In the sample, the INotifyPropertyChanged interface is supported. Our GridControl receives notification from this interface. This method is present in the INotifyPropertyChanged interface that should be supported on the object level.

Question Comments

Added By: Ilya Pogorelsky at: 8/18/2014 2:01:48 PM    

this does not seem to work with 14.1

Added By: Ivan (DevExpress Support) at: 8/19/2014 7:53:12 AM    Hi Ilya,
I have updated this example so that it works for 14.1. Please take a look at it.

How to draw thick cell borders by handling the CustomDrawCell event

How to use jQuery to drag and drop items from one ASPxGridView to another

$
0
0

The example demonstrates how to use the jQuery framework to drag an item from one grid to another.

- Use jQuery UI Draggable and Droppable plug-ins;
- Define "draggable" and "droppable" items:

[ASPx]
<Styles><TableCssClass="droppableLeft"></Table><RowCssClass="draggableRow left"></Row></Styles>

 - Use the invisible ASPxGlobalEvents control and handle its client-side ControlsInitialized/EndCallback events;
- Initialize the defined draggable/droppable items via the corresponding jQuery selectors. The "start" event handler can be used to obtain the key of the dragged row and apply conditional styling to it:

[JScript]
start: function(ev, ui){var $sourceElement = $(ui.helper.context);var $draggingElement = $(ui.helper); //style elements $sourceElement.addClass("draggingStyle"); $draggingElement.addClass("draggingStyle"); //find keyvar sourceGrid = ASPxClientGridView.Cast($draggingElement.hasClass("left") ? "gridFrom" : "gridTo"); rowKey = sourceGrid.GetRowKey($sourceElement.index() - 1);}

- Handle the "drop" event of the "droppable" items and perform a callback to the callback panel that has both grids nested inside to perform the data editing functionality.

Select the "script.js" source file and review the comments to find an illustration of the above steps.


See Also:
T116869: GridView - How to drag and drop items from one grid to another
E4582: How to reorder ASPxGridView rows using buttons or drag-and-drop

Question Comments

Added By: Marc Michaels at: 1/16/2013 6:03:17 AM    

Where is DX.ashx? I can't find any mention of it anywhere.

Added By: Marc Michaels at: 1/16/2013 6:14:32 AM    

<div class="draggable"> ??? Can't find this anywhere in the example as well. This example really leaves me in the dark there is no explanation of anything. Sadly it's the closest thing I can find to help me drag from one grid and drop on another. Just going to have to struggle through it.

Added By: Marc Michaels at: 1/16/2013 6:21:13 AM    

Running example simply results in "The resource cannot be found".

Added By: Mark OMeara at: 8/19/2014 6:59:25 PM    

Can this example be adjusted to also drag and drop within the same grid? i.e. for ordering of rows?

How to create a custom exporter for the ASPxPivotGrid control by using the XtraReport suite (This exporter provides the AutoRowHeight, BestFit and FitToPage features)

How to implement editing in the Preview Form

$
0
0

The following example demonstrates how to edit a report's content in its Print Preview. To accomplish this task, handle the PreviewDoubleClick event of required controls, store their position and status, and then set a new value for these controls and recreate a report's document.

Question Comments

Added By: Kishor Kadam 1 at: 7/21/2014 1:35:56 AM    

Hi,
Instead of Report could you please show the code to display the custom Contextmenu for the PivotGrid Control .

Added By: Andrew L (DevExpress Support) at: 7/21/2014 7:38:47 AM    

Hello Kishor,

To process your recent post more efficiently, I created a separate ticket on your behalf: T131798: How to display the custom Contextmenu for the PivotGrid Control.. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Anders Wang at: 8/19/2014 8:57:20 PM    

Hi,
There are 2 problem for this sample:
1) Is there anyway to refresh the changes in the previewdoubleclick without "this.CreateDocument(false);"? eg. updatefield(),e.previewcontrol.refresh()  to refresh just changed part.  e.previewcontrol.refresh()  doesn't work.Because this will cause the whole report being recreated will cause performance issue and bad user experience. if we are editing the last page not the first page. After recreate, we go back the first page.
2)May be more difficult for you guys and also be requested by others. Could we do in place editing not create another form?

Thanks a lot for your great help.


How to perform ASPxGridView instant updating using different editors in the DataItem template

$
0
0

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&#13;&#10;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 PM    

how can i connect the data source for dynamic value in example http://www.devexpress.com/example=E2333

ASPxGridView - Multi-Row Editing

$
0
0

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.

This demo shows how to edit all rows selected on the page.

See Also:
Custom client-side logic implementation in the grid with multi-row editing
How to implement the multi-row editing feature in the ASPxGridView
How to edit multiple selected rows in a single Edit Form
How to perform ASPxGridView instant updating using different editors in the DataItem template
How to implement ASPxGridView Multi-Row editing using ASPxHiddenField in the Master-Detail scenario

Question Comments

Added By: Angela Pearman at: 1/11/2013 9:50:49 AM    

Why are there two InvoiceItems.vb files in this example?

Added By: Scott Harding at: 6/1/2013 4:27:13 PM    

Doesn't maintain edit values if you click the header to sort the grid in edit mode.

Added By: Prashanthi G at: 7/17/2013 7:26:45 AM    

This is working fine with Text and memo columns but Not working with GridViewDataComboBoxColumn - not updating combobox values- please advise

Added By: Prashanthi G at: 9/8/2013 3:39:04 AM    

How to achieve the same when grouping the columns?, this example not working properly when grouping is there in the grid. when expanding and collapsing the rows, the visible indexes changing hence the values entered are wrongly placing in the gird.

How to get exact row index when grouping also?

How to implement the multi-row editing feature in the ASPxGridView

$
0
0

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.

We already have the E158 example showing how to implement a similar feature. The project below is a simplified version of the same functionality, which allows you to edit all rows on a current page at once. To implement this, I added the ASPxTextBox to the DataItemTemplate Container of several columns and bound these editors to the underlying data source. This will force the ASPxGridView to always display editors in these columns. So, the end-user can input values in these editors. After that click the PostModifications button to preserve the changes made. NOTE, this is done without switching the ASPxGridView to the EditMode and back.

To preserve the changes made, I saved editor values to the List<object> and then used these values by setting the UpdateParameters of the ASPxGridView's DataSource. Finally, to obtain editors and their values, I used the ASPxGridView.FindRowCellTemplateControl Method.

See Also:
How to implement the multi-edit functionality with a multi-page grid that is bound dynamically
Custom client-side logic implementation in the grid with multi-row editing
How to edit multiple selected rows in a single Edit Form
How to force the grid to stay in Edit mode
How to perform ASPxGridView instant updating using different editors in the DataItem template

Question:E324 - How to calculate the ASPxGridView group summaries on the client side

Question Comments

Added By: jdubeau at: 7/17/2012 5:50:48 PM    

this example does update anything.

Added By: Wendy Ramsaur at: 7/23/2012 12:57:07 PM    

How are you collecting updated information and putting it in to the list? This only updates with the original information.

Added By: yaniv abo at: 7/25/2012 11:16:17 AM    

whan you select Run Online the Grid data does not update whan you click "Post Modifications"

Added By: Manish Singh 8 at: 7/30/2012 11:43:03 PM    

@yaniv abo : you have to provide the KeyFieldName Properties of gridview then this code will work

Added By: Wendy Ramsaur at: 7/31/2012 10:34:47 AM    

OK, it works...sort of. I have a column represented by a RadioButtonList. The callback is not getting any updated values. Can I get some help?

Added By: Wendy Ramsaur at: 7/31/2012 10:45:12 AM    

Also just tried using a textbox. Again, does not get updated values in this example.

Added By: Fiona Titcombe at: 10/18/2012 4:00:21 AM    

Is there any solution to this? FindRowCellTemplateControl(grid, col, "txtBox") returns the original value, not the updated value.

Added By: Hamdy Nassar at: 10/20/2012 12:44:48 AM    

thanks alot it is working perfect

Added By: Steve Knowles at: 12/10/2012 10:16:11 AM    

I am having the same problem as others in that the original, not updated value is being returned. Has anyone figured out why this happens in some projects?

Added By: Ashley Perkins at: 12/18/2012 9:02:33 AM    

To anyone having problems with this demo make sure you are not touching the grid view data source on page load.

I was changing the select query and rebinding on page load, this caused the values to reset. Got rid of that and it worked perfectly.

Added By: Bryan Meier at: 1/31/2013 11:36:43 AM    

To add on to what Ashley commented on...

Make sure you have the AutoPostBack set to false on the button you are using to perform the callback. By default the value is true which will override your callback and the OnCustomCallback event of your grid will never get called. Not to mention your changes will be reverted back to the original values.

Added By: Prashanthi G at: 9/3/2013 9:19:25 PM    

In this given example no.of rows is less and it is working fine, how to achieve this kind of functionality if more no of records more say for ex 100 records. page load became very slow and some times not responding message is coming. Any suggessions

Added By: Philippe Foucart at: 9/24/2013 2:18:37 AM    

Works perfect for me on pc, but not on ipad -> on ipad, when clicking the button, nothing happens, I just get the circling image indicating somethings happening in background, but looks like callback is not executed.
any ideas?

Added By: Richard Wilke at: 11/10/2013 3:10:37 PM    

I have converted this code to fit my database structure. It looks like everything is coded correctly, but after running through the code to update the database ...

 for (int i = 0; i < list.Count; i++) {
                AccessDataSource1.UpdateParameters["CategoryName"].DefaultValue = list[i].CategoryName;
                AccessDataSource1.UpdateParameters["Description"].DefaultValue = list[i].Description;
                AccessDataSource1.UpdateParameters["CategoryID"].DefaultValue = list[i].Id.ToString();
// AccessDataSource1.Update(); << Uncomment this line to update data!
            }
            ASPxGridView1.DataBind();

The database never gets updated. Any thoughts? The list gets built correctly and contains all the updated data from the grid. Help.

Added By: M Abo Habiba at: 1/6/2014 1:55:28 AM    

Is this resolved 13.2 as BatchEdit ?

Added By: Paul.Astramowicz@thyssenkrupp.com Paul.Astramowicz@thyssenkrupp.com at: 8/13/2014 12:48:28 PM    

Can we use this Example somehow but within using it within a FORM<>  ???

Added By: Artem (DevExpress Support) at: 8/13/2014 11:17:10 PM    

Hello Paul,

To process your recent post more efficiently, I created a separate ticket on your behalf: T140120: E324 - Using within a form. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Custom client-side logic implementation in the grid with multi-row editing

$
0
0

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.

Custom logic implemented in this example allows the end-user to select a limited number of named columns via comboboxes. The maximum number of columns the user can select is defined by a numeric column value, which he can also change. The only callback is used to post the entire grid page data.
To work in multi-row-edit mode, scripts and ClientInstanceName property values are generated programmatically.

See Also:
ASPxGridView - Multi-Row Editing
How to implement the multi-row editing feature in the ASPxGridView
How to perform ASPxGridView instant updating using different editors in the DataItem template

Question Comments

Added By: Paul.Astramowicz@thyssenkrupp.com Paul.Astramowicz@thyssenkrupp.com at: 8/13/2014 1:17:12 PM    

How would the below code be used if you were to use a ASPxSpinEdit Instead of a ASPxTextBox ?

Added By: Mike (DevExpress Support) at: 8/13/2014 11:22:36 PM    Hello Paul,

I see that you have already created a new ticket regarding this inquiry: T139992: How to enable users to select/enter data for the GridViewDataSpinEditColumn within a Gridview for all ROws?
This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Implement on-demand data posting (batch data update)

$
0
0

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.

If you don't want database transactions to take place after each end-user action, you can implement on-demand data posting mechanism.
This means, that all data changes will not be immediately sent to the database, but instead will be accumulated within the current user session.
When needed, end-users can press the Post All Data button to send changes to the database.

This approach can make your web site much more responsive, if users need to add or update multiple records during a session.

See Also:
How to update a Boolean field using the ASPxGridView selection
How to perform ASPxGridView instant updating using different editors in the DataItem template

Question Comments

Added By: Pornsak Tangsujaritvijit at: 5/14/2012 8:24:15 AM    

Can you convert to asp.net mvc ?

Added By: Alex Bakht 2 at: 8/18/2013 3:39:30 PM    

Hello,

First of all, it references DevExpress.Web.ASPxEditors.v8.1 and refers to v2013 vol1.4-v2013 vol 2.1.

the line
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="BatchUpdate" %>

The Visual Studio does not like the Inherits="BatchUpdate" part.

Can you kindly send this project to me?

Thank you.

How to perform GridView instant updating using different editors in the DataItem template

$
0
0

UPDATED:

Starting with version 13.2, the GridView 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 GridView control offers advanced "Batch Editing Mode" programming options.

You can find a standalone DB-independent solution in our Code Examples base at:
GridView - 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 example illustrates a functionality similar to that demonstrated in the How to perform ASPxGridView instant updating using different editors in the DataItem template example.
When a user types a value, the editor raises the client-side ASPxClientEdit.ValueChanged event. In the event handler, it is possible to get a value from the editor and send it to the server using jQuery.ajax method.

See Also:
Video: ASP.NET MVC GridView - How To Setup Multi-Row and Instant Updates
GridView - How to implement batch update using the Ajax request
How to implement the multi-row editing feature in the GridView

Question Comments

Added By: Michael Akin at: 9/4/2013 9:18:49 AM    

According to the Video, it is hitting a database, what would the Reflection code look like using Entity Framework 5?

How to implement the multi-row editing feature in the GridView

$
0
0

UPDATED:

Starting with version 13.2, the GridView 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 GridView control offers advanced "Batch Editing Mode" programming options.

You can find a standalone DB-independent solution in our Code Examples base at:
GridView - 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.

This example demonstrates how to implement the multi-row editing feature using the GridView extension. The main idea is to save changed values in the JavaScript dictionary and pass this dictionary to the required action. It is necessary to use a custom ModelBinder in the action to convert passed data to the required dictionary object.

See also:
How to perform GridView instant updating using different editors in the DataItem template
GridView - How to implement batch update using the Ajax request
How to implement the multi-row editing feature in the ASPxGridView
IModelBinder Interface
ASP.NET MVC2 - Custom Model Binder Examples
jQuery.ajax()

Question Comments

Added By: saurabh seth at: 9/11/2013 5:15:50 AM    

i m planning to extend this implementation, is there any way to return back the errors(changes those failed validation) and display the errors (e.g. highlighting the erroneous cell).

Added By: Fabio Vassura at: 1/7/2014 8:15:48 AM    

What about creating ?


OBSOLETE - How to Add the Back and Forward Buttons to an MDI Application

$
0
0

=================================
This article is obsolete starting with v10.1. Use the built-in feature of the Document Manager component instead: Document Selector 
=================================
The built-in Back and Forward Actions allow end-users to navigate between previously invoked Views. These Actions are contained in the DevExpress.ExpressApp.SystemModule.ViewNavigationController. This Controller is not intended for use in applications with MDI strategy, because it collects a history of Views invoked in the application's main Window. In an MDI application, the main Window doesn't have any View; all Views are displayed in child Windows. So, the Back and Forward Actions are always disabled.

This example demonstrates how to create a custom WindowController that contains navigation Actions collecting Views from invoked MDI child forms. For details on this example, refer to the OBSOLETE - How to Add the Back and Forward Buttons to an MDI Application article.

ASPxGridView - How to implement cascading comboboxes in Batch Edit mode

$
0
0

The concept of cascading combo boxes requires sending a callback to the server to get data for the second editor based on the first editor's selected value. 
In the meantime, it's impossible to send callbacks for built-in editors and it's necessary to use the EditItemTemplate (see ASPxGridView - Batch Edit - Support a scenario when GridViewComboBoxColumn is used in callback mode).
A basic scenario of this approach requires the following steps:
1) Use the client-side ASPxClientGridView.BatchEditStartEditing  and ASPxClientGridView.BatchEditEndEditing  events  to provide the template combo box with values.
2) Handle the SelectedIndexChanged event to send callbacks if it's required.
3) Handle the ASPxClientComboBox.EndCallback event for the second editor to apply the selected item after a callback.
4) Handle the ASPxClientGridView.Init  and ASPxClientGridView.EndCallback events  to initialize and reset global variables responsible for data providing logic after the grid was refreshed. 
 
The attached example illustrates how to implement all these steps.

Question Comments

Added By: umesh patel 1 at: 8/19/2014 11:34:15 PM    

Dear sir
Binding City Editor , if i have more then 400,000 cities need to be bind, Shall i used same binding concept of i used linqservermodedatasource for the binding to increase performance. Can you please send me sample project how can i use linqservermodedatasouce.  
Thanks for your time

Added By: Artem (DevExpress Support) at: 8/20/2014 6:41:34 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T142172: ASPxGridView - How to implement cascading comboboxes bound to a large data in Batch Edit mode . This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: umesh patel 1 at: 8/20/2014 11:01:37 PM    

in CITY edittor inside GridViewDataComboBoxColumn , EditItemTemplate instead of ASPxComboBox i can use aspxlookup becuase i want to provide user to search item based on incremental search

Umesh

Added By: Artem (DevExpress Support) at: 8/20/2014 11:57:38 PM    

Hello,

To avoid discussing multiple topics in this thread, I created a separate ticket on your behalf: T142423: ASPxGridView - Batch Edit - How to use ASPxGridLookup bound to a large database with incremental filtering in EditItemTemplate. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

How to configure a range distribution of ChoroplethColorizer

How to bind SchedulerControl to SQL Server database

$
0
0

This example demonstrates how to bind the SchedulerControl to a database located in MS SQL Server 2005.

The basic steps to create this example are equivalent to the steps described in Lesson 1 - Bind a Scheduler to Data. However, several additional steps are added to demonstrate more SchedulerControl capabilites:

- Resources for appointments
Besides the appointment mappings, resource mappings are defined in the SchedulerStorage. A separate TableAdapter is used to retrieve resources from the database.

- Resource sharing
The AppointmentStorageBase.ResourceSharing Property value is set to true (note the It is impossible to set ResourceSharing property to true via XAML bug report).

To test this example locally, you should setup our CarsXtraScheduling sample database in your SQL Server instance (you can download the corresponding *.sql scripts from the How to bind ASPxScheduler to MS SQL Server database example).

Question Comments

Added By: Arti Vengurlecar at: 7/15/2014 2:10:58 AM    

How to generate Dataset using SQL server?

Added By: Cliff Knasinski at: 8/20/2014 10:57:35 AM    

Are there any examples out there that show how you can do this with MVVM design methods?  I have a large application that uses connection to a SQL Server Database utilizing the LINQ to XML class that I bind to ViewModels.  I would like to use these existing view models as much as possible in binding to the Scheduler. I already have view models of projects with start and end dates and would like to use them if possible with slight adjustments to them if needed.

Added By: Elliot (DevExpress Support) at: 8/21/2014 12:12:41 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T142439: Implementing MVVM. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

How to bind a date-time chart range control client to a datasource and customize its common settings

$
0
0

This example demonstrates how to set up a range control with the date-time chart client to display a chart with date-time data in the range control's background.

In order to provide data to a chart date-time range control client, you need to access the ChartRangeControlClientDataProvider object using the ChartRangeControlClientBase.DataProvider property and assign a data source to the ChartRangeControlClientDataProvider.DataSource  property. Then specify the required data fields via the ChartRangeControlClientDataProvider.ArgumentDataMember, ChartRangeControlClientDataProvider.ValueDataMember, and ChartRangeControlClientDataProvider.SeriesDataMember (optional) properties.

In the current example, a date-time chart client is bound to a simple data table containing three columns ("Argument", "Value", and "Series").

In addition, this example shows how to customize chart client common settings (e.g., change the date-time range, customize template view and grid options).

Question Comments

Added By: Al Dyachkov at: 8/20/2014 3:08:54 PM    

There is an error in this sample

This part sets fixed range,

// Change the date-time range of the chart range control client.
dateTimeChartRangeControlClient1.Range.Min = new DateTime(2014, 7, 6);
dateTimeChartRangeControlClient1.Range.Max = new DateTime(2014, 7, 28);

while data generation uses DateTime.Now

row["Argument"] = DateTime.Now.Date.AddDays(pointIndex);

The code should be something like this :

// Change the date-time range of the chart range control client.
dateTimeChartRangeControlClient1.Range.Min = DateTime.Now;
dateTimeChartRangeControlClient1.Range.Max = DateTime.Now.AddDays(50);

Added By: Alexander T (DevExpress) at: 8/21/2014 12:42:31 AM    

Hi Al,

Thank you for the remark. We have corrected the example.

 

Viewing all 7205 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>