Hi
I met a new problem when I am using ultragrid.
I can move , drag and drop a row to any position in a ultragrid, However, I also want there is a hightlight when I am draging the row so that it is more clear that where will I put this row to. for example, there will be a line at the row where I am going to drop.
Is there any way to realise that?
Thanks,
Xin
Hi Xin,
I'd probably handle the DragOver event of the grid and get the row the mouse is over and apply an appearance to it.
To get the row, you will first have to convert the X and Y in the DragOver into grid coordinates (they are in screen coords). So you would use the grid.PointToClient method for the this. Then you can get the row from the point. HOWTO:UltraWinGrid Mouse Position and Row Identification
What I want is a line being drawed so that we can know where we are draging row to, even if the row is not dragged over. The line is like a insert point.
How can I draw a line in ultragrid row?
There's nothing built-in to the grid to do that. You could draw the line yourself using a DrawFilter, though. There's a sample of something very similar for the WinTree control. It's call the WinTree Drag and Drop sample. The samples install with the NetAdvantage SDK.
hi, i need something similar but i can not find the sample, i need something like draw a line between one field to another to simulate like a relation between two tables.
Thanks
Hi,
It depends on what version of NetAdvantage you are using and whether or not you chose to install the samples when you installed NetAdvantage. But the samples are usually in a folder something like this:
...\Samples\WinTree\CS\UltraTree Drag and Drop CS