Hello,
I have configured a datagrid, so that it looks and behaves more or less like Excel (for instance, by setting CellClickAction to CellSelect) I would like to implement the feature that user can press a mouse on the border of the cell and drag it to some other cell(s), and value will be copied in these cells on drop. Pretty much drag'n'drop as in Excel. I'm pretty much sure that "there is no intrinsic functionality to do this" :), but maybe there is still a way to implement this.
Probably a good starting point is SelectionDrag event in the DataGrid. But how can I determine that the border of the cell was clicked (and not somewhere in the middle of the cell)? The next question would be, can I provide some visual help about cells which will be affected by the drop operation (like Excel does)?
Thanks
Thank you for your quick response. This is what I was afraid of :-)
Nope, we dropped this idea. Too difficult, too instable, lot's of implementation necessary which is based on not officially supported API (DrawFilter etc.), too little return in improved user experience
did you manage to implement Excel like cell value drag / drop? It wouold be nice if you could share some ideas - where to mind attention :-)
Thank you in advance.
Already done (FR10682).Thanks again for you help
Developer support is correct. If every cel in the grid drew all four border sides, then either the borders would have to overlap (which would result in the same problem you are having now) or there would be double-thickn borders between each cell (which would be ugly). In fact, you can acheive this second result by setting the CellPadding property to 1. This introduces a space between cells and thus each cell has to draw all 4 border sides.
Andrej Kuklin said:As far as I can judge, the whole concept of appearances (and decision which appearance should override another) is broken in the UltraGrid.
I think that's a bit of an overstatement. Appearance in the grid work great for Fonts, BackColor, ForeColor, Text Alignment, Image Alignment, etc. They even work pretty well for borders if you apply settings on a higher level such as a band.
As far as cell borders go, I must agree with you. In this regard, the Appearance is pretty much useless.
But remember that the Appearance class is a sort've generic class that applies to many different objects across the entire set of Infragistics WinForms controls. So not every object is going to be able to support every appearance property. Appearances are very powerful, but there are, of course, always trade-offs.
I recommend that you Submit a feature request to Infragistics and suggest that a feature be added to the grid to allow cell borders in a more useful way. This is a very popular request, and I would not be surprised if it was implemented in a future release.