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.

GridDataBoundGrid default Currentcell Border

Thread ID:

Created:

Updated:

Platform:

Replies:

72929 Apr 11,2008 02:35 AM Apr 15,2008 08:29 AM Windows Forms 1
loading
Tags: GridControl
Keshav Kamat
Asked On April 11, 2008 02:35 AM

Hello,

I am using a GridDataBoundGrid. The default currentcell(rowindex = 1, columnindex = 1) is always having a border displayed.This is not desirable as even when this cell is set to be readonly it is possible to edit the contents of this cell.Moreover I do not want any cell in my datagrid to have a border appearance.Is there a way I can set this borderstyle to none?


Administrator [Syncfusion]
Replied On April 15, 2008 08:29 AM


Hi Keshav

Thanks for the interest in Syncfusion products.

If your intention is to remove the selected cell border for the cell(rowindex = 1, columnindex = 1) when the application run, you can set CurrentCell.MoveTo(-1, -1). And if you want to set the set the ReadOnly to this cell, you can handle PrepareViewStyleInfo event. Please refer the code snippet below.


this.gridDataBoundGrid1.CurrentCell.MoveTo(-1, -1);

private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
{
if (e.RowIndex == 1 && e.ColIndex == 1)
{
e.Style.ReadOnly = true; }
}


Please refer the sample in the below link that illustrates the above.

http://websamples.syncfusion.com/samples/Grid.Windows/I72929/main.htm

Please let me know if this is not what you needed.

Regards,
Asem.



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.

;