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

Do not show row header icon if nothing is selected

Thread ID:

Created:

Updated:

Platform:

Replies:

123831 Apr 25,2016 01:56 PM UTC Apr 27,2016 04:23 AM UTC WinForms 3
loading
Tags: GridDataBoundGrid(Classic)
Michael Lohr
Asked On April 25, 2016 01:56 PM UTC

Hello,

I'm using the GridDataBoundGrid to show some items.
If I show the grid the first time no row is selected but in the first row the arrow icon is shown.
Is it possible to avoid this?

Best regards,
Michael

Amresh S [Syncfusion]
Replied On April 26, 2016 12:44 PM UTC

Hi Michael, 

The row arrow indicator is loaded whenever the grid is being loaded and the current cell is set to focus. In order to hide the row arrow indicator on loading, we have to define a custom row header CellModel and CellRenderer. The custom defined CellModel is added to the CellModels collection and then assigned via the QueryCellInfo event. You can find the customization of the CustomRowHeaderCellModel and CustomRowHeaderCellRenderer in the below provided sample. 

Code snippet: 
// Add the custom cell model. 
this.gridDataBoundGrid1.Model.CellModels.Add("CustomRowHeader", new CustomRowHeaderCellModel(this.gridDataBoundGrid1.Model)); 
// Trigger the required event. 
this.gridDataBoundGrid1.Model.QueryCellInfo += new GridQueryCellInfoEventHandler(Model_QueryCellInfo); 
 
void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e) 
{ 
     // Sets the custom cell type. 
     if (e.ColIndex == 0) 
        e.Style.CellType = "CustomRowHeader"; 
} 
 
Please refer to the attached sample and let us know your concerns. 

Sample: 

Regards, 
Amresh S.  
 


Michael Lohr
Replied On April 26, 2016 02:16 PM UTC

Hi Amresh,

thanks for your information.

I have to adopt it a little bit but now it works for me.

Best regards,
Michael



Amresh S [Syncfusion]
Replied On April 27, 2016 04:23 AM UTC

Hi Michael, 

Thank you for your update. 

We are glad that the provide solution works. Please let us know if you need any further assistance. 

Regards, 
Amresh S. 


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

;