We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ShowRecordPreviewRow

Thread ID:

Created:

Updated:

Platform:

Replies:

36072 Oct 19,2005 02:48 PM UTC Oct 19,2005 11:48 PM UTC WinForms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 19, 2005 02:48 PM UTC

Is there anyway to not show this for rows that have no data to be displayed in the preview? I am filling this in the QueryCellStyleInfo event and would like to not show it for rows that don''t have any descriptions (which is what I am displaying in it).

Administrator [Syncfusion]
Replied On October 19, 2005 02:57 PM UTC

It also show up for the nested tables. How do you only show this in the base table?

Administrator [Syncfusion]
Replied On October 19, 2005 05:28 PM UTC

To show/hide for individual records you need a custom engine where you derive GridRecord and override this method: public override bool ShouldShowRecordPreviewRows() and return true/false based on your condition. You can see an example of creating a custom engine and deriving GridRecord in this sample. \Essential Studio\3.3.0.0\Windows\Grid.Windows\Samples\Grouping\ResizableRows

Administrator [Syncfusion]
Replied On October 19, 2005 07:21 PM UTC

I get the following error: ''XXX.GroupingRecordRow.ShouldShowRecordPreviewRows()'': no suitable method found to override This was after adding the following class to my engine class public class GroupingRecordRow : GridRecordRow { /// /// Initializes a new object in the specifed record part. /// /// The parent element. public GroupingRecordRow(RecordRowsPart parent) : base(parent) { } public override bool ShouldShowRecordPreviewRows() { return true; } }

Administrator [Syncfusion]
Replied On October 19, 2005 11:48 PM UTC

It should be GridRecord instead of GridRecordRow. Sorry. public class GroupingEngineFactory : GridEngineFactoryBase { // Add this line in your forms ctor: // GroupingEngineFactory provides a modified GridChildTable that adds an extra section // GridEngineFactory.Factory = new GroupingEngineFactory(); public override GridEngine CreateEngine() { return new GroupingEngine(); } } public class GroupingEngine : GridEngine { public override Record CreateRecord(Table parentTable) { return new MyGridRecord(parentTable); } } public class MyGridRecord : GridRecord { public MyGridRecord(Table parent) : base(parent) { } public override bool ShouldShowRecordPreviewRows() { //return false to hide this preview record //return true to show it return false; } }

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;