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

ASPxGridView - Batch Editing - How to show save and cancel buttons only when any row/cell has been changed

$
0
0

UPDATED:

Starting with v16.1, this feature is available out of the box. Please refer to the ASPxGridView, ASPxCardView - Change Save and Cancel buttons' enabled state when an end-user changes a value in BatchEdit mode thread for additional information.

This example demonstrates how to hide the Save changes and Cancel changes buttons, and show them only when an end-user edits any cell or row.
See Also:
ASPxGridView - Batch Editing - How to use external buttons to update data and enable them only when a row/cell has been changed  
MVC Example:
GridView - Batch Editing - How to show save and cancel buttons only when any row/cell has been changed

Question Comments

Added By: Warren Connors 4 at: 4/16/2015 12:55:22 AM    

I was just trying to use some of this code, but the SetButtonsVisibility function does not get a value for var statusBar because there are no elements on the rendered page with class name "StatusBarWithButtons" (did a view source and string search). Has this changed recently?

Added By: Larry (DevExpress Support) at: 4/16/2015 6:28:43 AM    Hello,

It seems that you have created a separate ticket for this issue. Let's continue discussing this issue in the ASPxGridView batch edit confirmation on save thread.

Added By: Warren Connors 4 at: 4/16/2015 8:33:34 AM    

One more thing, though - do you have any examples, or could point me to some pertinent doc, on how to construct the following piece of the ASPxGridView specs in code? I am building the entire ASPxGridView in code dynamically, and I can figure out everything else except the following:

           <Templates>
               <StatusBar>
                   <div style="text-align: right">
                       <dx:ASPxHyperLink ID="hlSave" runat="server" Text="Save changes">
                           <ClientSideEvents Click="function(s, e){ gridView.UpdateEdit(); }" />
                       </dx:ASPxHyperLink>
                       <dx:ASPxHyperLink ID="hlCancel" runat="server" Text="Cancel changes">
                           <ClientSideEvents Click="function(s, e){ gridView.CancelEdit(); SetButtonsVisibility(gridView); }" />
                       </dx:ASPxHyperLink>
                   </div>
               </StatusBar>
           </Templates>

Added By: Larry (DevExpress Support) at: 4/17/2015 12:27:50 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T231731: ASPxGridView - How to create the StatusBar template dynamically. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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