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.
Unfortunately, activation email could not send to your email. Please try again.

Do not show row header icon if nothing is selected

Thread ID:

Created:

Updated:

Platform:

Replies:

123831 Apr 25,2016 09:56 AM Apr 27,2016 12:23 AM Windows Forms 3
loading
Tags: GridDataBoundGrid(Classic)
Michael Lohr
Asked On April 25, 2016 09:56 AM

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 08:44 AM

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 10:16 AM

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 12:23 AM

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.

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.

;