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

ASPxGridView - How to specify the CommandButtons’ and Custom CommandButtons’ properties based on any custom criteria

$
0
0

The example demonstrates how to specify the CommandButtons and Custom CommandButtons properties by handling the CommandButtonInitialize and CustomButtonInitialize events. The DataRows' VisibleIndex property and criteria set based on field values are used to determine the buttons' visibility.

Question Comments

Added By: Hans Leonhardt at: 11/16/2013 9:27:49 AM    

Just as an addition:
If you're Using an Entity e.g. an EntityDatasource this fails. This will work, e.g.

 Private Function DeleteButtonVisibleCriteria(ByVal grid As ASPxGridView, ByVal visibleIndex As Integer) As Boolean
  
     Dim row As NameOfYOurEntity = ASPxGridView1.GetRow(visibleIndex)
       ' e.g: The Entity has a boolean Property named "isAdmin"
     Return row.isAdmin
   
 End Function

Added By: Jean-Luc Praz at: 11/17/2014 6:24:59 AM    

Is there a way to find out if a row is the first or last row in a Grid ? I need to hide a button based on that criteria ?

Added By: Alessandro (DevExpress Support) at: 11/17/2014 7:47:58 AM    Hi,

I will create a separate ticket on your behalf to keep this web page simple: ASPxGridView - E3028 - Check row location. Thank you for your time and cooperation in advance.

Added By: Annette V at: 7/27/2015 1:45:16 AM    

Hello,
it's a pity, that your examples modified in 2014 is not running in VS 2013, because the example produces the message "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine".
I don't want to change my system for that problem.

Added By: Mike (DevExpress Support) at: 7/27/2015 4:30:49 AM    

Hello Annette,

To process your recent post more efficiently, I created a separate ticket on your behalf: T271600: How to use AccessDataSource / Microsoft.Jet.OLEDB.4.0 with VS 2013. 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>