We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Synchronizing EditableList and DataBoundGrid

How can I show an EditableList control and have it synchronized with a column in a datagrid*? i.e. I have a notes I am trying to bind both the list and the grid to the same DataView. First of all I am having problems just binding my data to the Editable list (forgetting the datagrid for now). It just displays ''DataRowView'' for each row in the list when I bind it with the followiing code: editableList1.ListBox.DataSource = notes_view; editableList1.ListBox.DisplayMember = "Note_title"; This (syntax aside) exact code works for a windows listbox. If i bind them both to the same view then the selected index correctly changes in both, but again the EditableList only displays ''DataViewRow'' for each column. I tried the Windows Listbox control but that totally falls over itself if you try and bind it to the same view as a datagrid. The SF control does not have this problem (and has the bonus that its editable) but I cant get it to display my data. There are no databound editablelist examples that use the DataSource property. I''m not even entirely sure in .NET how/if youre supposed to bind to two objects at the same time. If you use two DataGrids then it works and is very elegant, but the MS Listbox is awful in this respect. I''d rather not catch position changed events because thats a pain. -simon * i actually wont be using a datagrid in my final code but a custom control instead. however i think if i get it working with a datagrid then i''ll be fine

1 Reply

SI simon March 16, 2004 09:55 AM UTC

OK So i see that http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=11052 refers to this control as being incomplete. I am running 2.0.2.1 . Is the DataSource property not working for this version (the mentioned demo uses Items and not ListBox.DataSource)? I notice that the nested ListBox is actually a windows form so I dont see why it shouldn''t. If i cant use it - is there a control that will keep in sync with the position in a datagrid automatically. I tried the GridListControl but that didnt keep in sync with a Grid''s position. thanks -simon postscript: i am using the Winforms datagrid for these tests

Loader.
Live Chat Icon For mobile
Up arrow icon