Re: how to implement IBindingList

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: keith (keith_at_discussions.microsoft.com)
Date: 01/21/05


Date: Fri, 21 Jan 2005 11:31:03 -0800

But problem is no sample codes. Just don't know how to start coding for
something like

PropertyDescriptor IBindingList.SortProperty
{
     get { throw new NotSupportedException(); }
}

"Nicholas Paldino [.NET/C# MVP]" wrote:

> keith,
>
> It shouldn't be that hard. Basically, you would have to reorder the
> list internally, and then fire the ListChanged event, passing
> ListChangedType.Reset, to indicate that much of the list has changed.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@spam.guard.caspershouse.com
>
> "keith" <keith@discussions.microsoft.com> wrote in message
> news:7AE6E2E4-C0E3-44C9-89BD-5E9E595FAC39@microsoft.com...
> > There is an sample class CustomerList to implement the interface
> > IBindingList
> > in MSDN.
> >
> > But it dosen't have codes for followings to show how to sort the
> > collection.
> >
> > Can you provide codes to to it?
> >
> > Thanks
> > Keith
> >
> > PropertyDescriptor IBindingList.SortProperty
> > {
> > get { throw new NotSupportedException(); }
> > }
> >
> > void IBindingList.AddIndex(PropertyDescriptor property)
> > {
> > throw new NotSupportedException();
> > }
> >
> > void IBindingList.ApplySort(PropertyDescriptor property, ListSortDirection
> > direction)
> > {
> > throw new NotSupportedException();
> > }
> >
> > int IBindingList.Find(PropertyDescriptor property, object key)
> > {
> > throw new NotSupportedException();
> > }
> >
> > void IBindingList.RemoveIndex(PropertyDescriptor property)
> > {
> > throw new NotSupportedException();
> > }
> >
> > void IBindingList.RemoveSort()
> > {
> > throw new NotSupportedException();
> > }.
> >
>
>
>



Relevant Pages

  • INTERNAL COMPILER ERROR
    ... these are my codes for image processing...im not sure why im getting this " ... void CAboutDlg::DoDataExchange ... BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) ... void CFvasDlg::OnSysCommand(UINT nID, LPARAM lParam) ...
    (microsoft.public.vc.mfc)
  • how to explain the thread3 from the Bengining Linux Programming 3rd edition.
    ... that, he changes some about the thread3.c, below is the codes after ... can semaphore get increased since work_area value has changed, ... void *thread_function; ...
    (comp.os.linux.development.apps)
  • How to change Swing app to JApplet
    ... how to change a Swing app to a JApplet? ... what should I change in codes? ... public static void main{ ...
    (comp.lang.java.programmer)
  • how to implement IBindingList
    ... But it dosen't have codes for followings to show how to sort the collection. ... throw new NotSupportedException(); ... void IBindingList.ApplySort(PropertyDescriptor property, ListSortDirection ...
    (microsoft.public.dotnet.languages.csharp)
  • cannot include properly gdiplus.h
    ... i ve try many sample codes, ... have lynk problems. ... void main ... do we have to set something to make gdiplus usefull? ...
    (microsoft.public.vsnet.ide)