Re: how to implement IBindingList
From: keith (keith_at_discussions.microsoft.com)
Date: 01/21/05
- Next message: Rachel Suddeth: "Re: Send a file straight to printer?"
- Previous message: Zeng: "Re: ArrayList and its Insert method"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: how to implement IBindingList"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: how to implement IBindingList"
- Reply: Nicholas Paldino [.NET/C# MVP]: "Re: how to implement IBindingList"
- Messages sorted by: [ date ] [ thread ]
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();
> > }.
> >
>
>
>
- Next message: Rachel Suddeth: "Re: Send a file straight to printer?"
- Previous message: Zeng: "Re: ArrayList and its Insert method"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: how to implement IBindingList"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: how to implement IBindingList"
- Reply: Nicholas Paldino [.NET/C# MVP]: "Re: how to implement IBindingList"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|