Hello,
I have an Ultragrid bound to a datatable, the last row of this datatable is a row containing the totals of the previous rows. When the user clicks on the headers of the grid, the rows are obviously sorted, including the row with totals.
What I'd like to do is to catch this click and before the grid is sorted, deleting the last row and re-adding it after the sort. Right now to obtain this I'm using MouseClick Event (to delete the Row) and MouseUp event (to add it), but this is not perfect because if the user click the header, then move the mouse outside the grid and release the pressed button, the MouseUp event is not working.
Is there a better way to do this?
Hello mtgc,
If I understood your scenario right, I believe that you could use the 'AfterSortChange' event of the 'WinGrid' instead of 'MouseUp'. Also, why not use the row summaries in this control? Please take a look at the following article from our Knowledge base: http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=6144. This a suggestion as well as a question from me, althought I can understand that your scenario requires it.
Hello
Thank you for your reply
Actually I've just "discovered" row summaries and they are just what I need!
I am glad to hear that this feature suits your needs. The 'WinGrid' control is a very complex and useful control with a lot of different features, so please do not hesitate to ask any questions about it, I will give my best to assist you in the future.