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

How to implement the ASPxRibbon as an ASPxGridView customization panel

$
0
0

This example demonstrates how to use an ASPxRibbon in a Web User Control, which can be added to an ASPxGridView's TitleTemplate to represent a control panel for managing common GidView functions.

Due to ASPxGridView specifics, all actions performed with the control require a request to the server in order to take effect. All these requests are performed via callbacks except two operations: switching the control to edit mode and the export operation. These operations are executed via postbacks. For this purpose, we implemented a custom postback event handler.

Another important point is that since the ASPxRibbon is a control intended to be used primarily as a client side static component, it does not keep its state between requests to the server. So, it is necessary to handle saving and restoring of Ribbon items' state on each request. For this purpose, use an ASPxHiddenField.

Please note that in order to enable correct operation of the client side command handler, the following settings need to be adjusted and should not be overridden:

[C#]
ASPxGridView.SettingsBehavior.AllowFocusedRow=true;ASPxGridView.SettingsPager.Visible=false;

 

[VB.NET]
ASPxGridView.SettingsBehavior.AllowFocusedRow = true ASPxGridView.SettingsPager.Visible = false


 Note:

Starting with version 17.1, ASPxGridView provides an embedded toolbar that allows implementing similar functionality without using an external ribbon. See the ASPxGridView - Simple implementation of an embedded toolbar example demonstrating this feature. 

Question Comments

Added By: Yorch at: 6/19/2014 4:24:54 PM    

how do you register the RaisePostBackEvent?

Added By: Yorch at: 6/19/2014 4:44:20 PM    

i tried the code on javascript and does not fire the RaisePostBackEvent on the server side.

Added By: Artem (DevExpress Support) at: 6/20/2014 3:14:21 AM    

Hello,

To avoid discussing multiple topics in this thread, I have extracted your  inquiry to a separate ticket created on your behalf: ASPxRibbon/ASPxGridView - E5037 - Postback event doesn't fire.  Please refer to it for further correspondence.

Added By: Miguel Pichiya at: 7/11/2017 11:06:05 PM    Hi DevExpress Support, i beggining with mvc model, but is also confused to me. Can you tell me how I transform this example to the mvc model or do you have an example with mvc?  Thanks in advance.Added By: Stason (DevExpress Support) at: 7/12/2017 1:39:45 AM    

Hello Miguel,

I've created a separate ticket on your behalf (T534837: GridView - How to implement ribbon toolbar for the grid). I will address it shortly.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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