silverlight componentone combobox binding issue - silverlight

I have to display combobox in silverlight componentone flexgrid. but when i am applying valueconvertor to that column it works and display combobox, but when i select any value from combobox and select same column from other row then it automatically select the same value which is selected in previous row.

Related

Bind a Combobox Selected Item with DataGrid Column

I am new in WPF. I have 2 controls Combo box and DataGrid. They are bind with DataSource1{ProperyX} and DataSource2{PropertyA, ProperyB, ProperyX}. I have a requirement that the Combo Box value should get selected whenever any row is getting selected in DataGrid (i.e if a row selected having the value of Column ProperyX is "JHON" then the same "JHON" should get selected in Combobox) with DataSource2 ProperyX column.

Two radgridviews - programmatically select row on 2nd based on selection on 1st

I have two radgridviews where a row selected on grid #1 by the user appears automatically in grid #2. The new row in grid #2 needs to be programmatically selected as there may be further processing for that new row and the row index is needed.
Both grids use a datatable for their items source.
It is possible that the user can select the same item twice from grid #1. So the selected row in grid #2 must be the most current selection from grid #1.
How do I programmatically select the new row in grid #2?
Thanks
Datagrid in wpf is a derive class of ItemsControl which has the SelectedIndex property which you can use to get the first index of selection in your grid after which you can set the second grid selectedIndex to the first's.
int selectedIndex=grid1.SelectedIndex ;
grid2.SelectedIndex =selectedIndex.

Devexpress checkbox column in a gridcontrol c#

I have a datagrid from devexpress in a winform application.I populated the datagrid from code (datasource=my datatable with 2 strings columns and one of type int (receive 0 and 1 values-should be checkbox on form).
I added a datagrid and from designer I added 3 columns.The last one of type checkbox.I set
UnboundType=Integer,
UnboundExpression=my column name from datatable :
DisplayFormat = Numeric,
columnedit = checkbox,
Displaycheckedvalue = 1,
displayuncheckedvalue = 0.
When I run the application always my checkboxes are blue.If i press one checkbox appear a check but when i go to the next row the previous value is again blue.What should i do so why the application keep the checks?
Don't set the column to be unbound, it is in your datasource after all.
What you want to do is just to set Displaycheckedvalue and displayuncheckedvalue as you have done, nothing more.
You can make a class which got a property for each column of your table. The int value would be a bool and so you can use List as datasource. The Grid will automaticly add checkboxes for the bool value.
If you want to use DataTable see Stig's post but in my opinion it is more beautiful to use classes and List.

How to select a row, if i click a disabled cell in a wpf datagrid

I have a wpf dynamic datagrid with a column disabled. if i click a cell in that column, the row is not selected.
The following article shows how to detect the row and column of a DataGrid click:
http://www.scottlogic.co.uk/blog/colin/2008/12/wpf-datagrid-detecting-clicked-cell-and-row/
This will work for disabled columns also.
You can adapt this code so that when the row is found, you set its IsSelected property to true.

Wpf Data entry Form bound to datatable

I was trying my hand on binding in Wpf.I am trying to make a dataenrty screen.for instance,I have a textbox and a combobox and a listview.. users enter pick an item from the combobox,add a comment and add the item to the listview.This is the flow.I have a master table for the combobox,i have its selectedvalue bound to a Item field in the ordertable and the textbox.text bound to comments field in order table.fine up to now.
from here on i'm confused,should i bind the lsitview to the order table?.If yes then how will i create a new row in the datatable each time add row is clicked..?
if a new row is created in the datatable,next time the user selects an item it should be bind to the newly created row...how can i do this...pls help...i'm pulling my hairs on this...
you can see this
http://dotnetstories.wordpress.com/2009/03/28/create-a-simple-data-centric-wpf-application/

Resources