ListView with data binding, sorting and lookup functions (i)

Source: Internet
Author: User
Tags sort
Sort | Data This control is purely for practice, so no consideration is given to using a DataGrid instead. Where the control is insufficient:
1, when the parent form is run, the dataset is populated, Listviewex can not automatically judge the situation, only through the CurrencyManager itemchanged event to call the fill ListViewItem function, sometimes the event will be called two times, The Listviewex will be filled two times.
2, for FindItem, in accordance with the ListViewItem text to find the ListViewItem method, remember that there is an API can be invoked, but not implemented, can only temporarily use the loop to find.
3, when the Listviewex to sort, the control is always flashing, when the project for a long time, flashing more serious.
4, in the case of data binding, LISTVIEWEX, I do not know why is the following DataGrid1 in the order of different, I have added a DataGrid2 on the form, only to show the Listviewex in the M_objview content, The contents are displayed in the same order as in DATAGRID1. It was later found that the order of padding in the function filllistviewitems () was consistent with the DATAGRID1, but once the function was run and exited, the Listviewex displayed in a different order than in the DATAGRID1.
5, for the list header with the database table field mapping, You would have inherited System.Windows.Forms.ColumnHeader and added a property implementation to a subclass, but when you add columnheader using the same inheritance from Listview.columnheadercollection, the runtime cannot display it. So we have to define a mapping class to implement this function.
6, when the Listviewex set DataSource and DataMember, call Setdatamember, automatically generate ColumnHeader and its corresponding columnheadermapping class, when running the program can not be displayed, Had to comment out.

Above do not know, please the expert pointing twos, so that I can make a better control to.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.