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. Image for the cookie policy date

Current Row Marker

I have a GridDataBoundGrid (3.2.1.0). I am attempting to clear the current cell when the grid is first loaded up by calling: this.gdbgBatches.CurrentCell.MoveTo(-1,-1); This seems to clear the current cell, but the first row still has the little arrow marker on the row header (which I believe indicates the current row). This makes it appear as though the current cell is on the first row when it fact it is not. Is there anyway to make this arrow go away when I clear the current cell? If it is of any interest why I am doing this.. I am actually setting up 2 grids in a master detail relationship. But I am manually retrieving the details only when they click on a row in the master grid because it is quite a bit of data. Therefore when the master grid first comes up.. I want it to show that no row is currently selected. Thanks.

3 Replies

AD Administrator Syncfusion Team September 30, 2005 08:35 AM UTC

Hi Brian You can make use of the PrepareViewStyleInfo event and can make the Row header of that particular row to be as "Header" . Here is the code. private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e) { if(e.ColIndex == 0 && e.RowIndex == 0) { this.gridDataBoundGrid1[1,0].CellType = "Header"; } } Best Regards Mouli.


BN Brian N. Wright September 30, 2005 02:37 PM UTC

Well I tried this code exactly as shown except I changed it to: this.gridDataBoundGrid1[2,0].CellType = "Header"; because I have a filter bar in row 1.. But I even tried changing it to make every cell in column 0 to be a "Header" but it still did not work. The problem with this solution, as far as I can tell, is that they are already headers. That is not the problem I described. My problem is that the little arrow marker (for lack of a better term), that shows up in the row header and that seems to indicate the row of the current cell, still shows up in the first row even when I clear out the current cell by calling: this.gridDataBoundGrid1.CurrentCell.MoveTo(-1,-1); How do I get rid of this "little arrow marker" on the row header? Thanks.


AD Administrator Syncfusion Team October 1, 2005 03:23 AM UTC

Here is a little sample shwoing one way to do this. You have to delay setting teh CurrentPostion to -1 for a little time after teh formload or the grid will reset it. http://www.syncfusion.com/Support/user/uploads/GDGB_Currency_4b2269ed.zip

Loader.
Live Chat Icon For mobile
Up arrow icon