Posted 26 January 2023, 2:57 am EST
Hi,
im migrating my applivation from framework to net7
hi have now your last library and i noticed that
many things has changed from my version in the flexgrid component
so i start asking my first question :
- BINDING:
<c1:Column Width="60" Binding="{Binding krecord_base.kid}"> <c1:Column.HeaderTemplate> <DataTemplate> <TextBlock Text="{Binding kbinding_language.kgrid_col_id}" Style="{x:Static Kisar_lib_app_wpf:KAppResources.kcontrol__listview__header_text__style}"/> </DataTemplate> </c1:Column.HeaderTemplate> </c1:Column>
this is code as i used to bind the previous flexgrid,
the flexgrid is connected through the viewmodel
now i saw that for the main binding i can write directly : <c1:Column Width=“60” Binding=“krecord_base.kid”>
but i did not find solution for the header binding and the header style
- SORTED COLUMN
i did not find equivalend of “SortedColumn” event
in my version i used to solve a problem :
if i had that 3^ row selected and the user sort a column
after the sorting the previous row does not remain selected
but (very danger) it is selected the 3^ row in the new order
I dont know if exists anymore the problem, but is there a manner to have a SortedColumn" event?
3 BOUNDPROPERTYNAME
i did not find any way to do this :
FLEXGRID.Columns[nCol].BoundPropertyName
4 BINDING SPEED
the flexgrid is connected through the viewmodel
if i use in the itemsource always connected it works very slow in case of many rows :
viewmodel search:
var array=getData();
foreach (var item in array)
this.kbinding_grid__itemssource.Add(new TRecord_search(item));
100’000 records > 28 sec
if i act in the wpf form
FLEXGRID.ItemsSource=null;
viewmodel.search()
FLEXGRID.ItemsSource=viewmodel.kbinding_grid__itemssource;
100’000 records > 7 sec
So, i know that this is a general problem and not specifically of the flexgrid
but in the framework i found a component ObservableCollectionEx that solved the problem,
now with NET6 version of flexgrid it throw exception of index out of range…
I would ask you if the flexgrid has some solution for this problem
Thank you
BS