c# - Why are my datagrid crashing my browser when sorting them -
i have silverlight application , use datagrids in it.
my problem (crash) happens whenever i'm sorting datagrid using left click on coloumn header.
i've tried debug debugger doesn't stop when crash happens if select exceptions in vs exception options.
i tried remove columns one, without format. nothing better.
and don't know problem comes (the datagrid, datasource...).
so show code think responsible this, i'm not sure if there missing.
xmlns:my="clr-namespace:system.windows.controls;assembly=system.windows.controls.data" <riacontrols:domaindatasource x:name="datasource" queryname="getlistcriteres" autoload="false"> <riacontrols:domaindatasource.domaincontext> <domain:domainserviceglobal /> </riacontrols:domaindatasource.domaincontext> </riacontrols:domaindatasource> <my:datagrid itemssource="{binding data, elementname=datasource, mode=twoway}" scrollviewer.horizontalscrollbarvisibility="auto" scrollviewer.verticalscrollbarvisibility="auto" tooltipservice.tooltip="liste des périodes" grid.row="0" horizontalalignment="left" x:name="dgdata" margin="20,0,20,0" isreadonly="true" autogeneratecolumns="false" > <my:datagrid.columns> <my:datagridtextcolumn header="date de début" binding="{binding datedebper,mode=twoway, stringformat=dd/mm/yyyy}" /> <my:datagridtextcolumn header="date de fin" binding="{binding datefinper,mode=twoway, stringformat=dd/mm/yyyy}" /> </my:datagrid.columns> </my:datagrid> <grid datacontext="{binding elementname=dgdata, path=selecteditem}" grid.row="1"> <grid.rowdefinitions> <rowdefinition /> <rowdefinition /> <rowdefinition /> </grid.rowdefinitions> <grid grid.row="0"> <grid.columndefinitions> <columndefinition width="auto" /> <columndefinition width="auto"/> <columndefinition width="auto" /> </grid.columndefinitions> <stackpanel orientation="horizontal" margin="0,15,0,0"> <textblock x:name="headerelementdata" margin="5,5,5,5" /> </stackpanel> </grid> <stackpanel grid.row="1" orientation="vertical"> <grid> <grid.rowdefinitions> <rowdefinition height="auto" /> <rowdefinition height="auto" /> <rowdefinition height="auto" /> <rowdefinition height="auto" /> <rowdefinition height="auto" /> <rowdefinition height="auto" /> <rowdefinition height="auto" /> </grid.rowdefinitions> <grid.columndefinitions> <columndefinition width="auto" /> <columndefinition width="*" /> <columndefinition width="auto" /> <columndefinition width="auto" /> <columndefinition width="*" /> <columndefinition width="auto" /> </grid.columndefinitions> <!-- 1ere ligne --> <stackpanel orientation="horizontal" margin="5,5,5,5" grid.columnspan="3" grid.column="0" grid.row="0"> <sdk:label target="{binding elementname=dpdatedebper}" width="110" grid.column="0" horizontalalignment="left" verticalalignment="center" margin="2,0,0,0" /> <mydatepicker:mycustomdatepicker width="130" name="dpdatedebper" selecteddate="{binding datedebper, mode=twoway, notifyonvalidationerror=true, validatesonexceptions=true}" /> <sdk:descriptionviewer grid.column="2" margin="5,0,0,0" target="{binding elementname=dpdatedebper}" visibility="visible"/> </stackpanel> <sdk:validationsummary x:name="vslisteerreursdata" grid.columnspan="6" grid.row="5" maxheight="100" borderthickness="0" /> </grid> </stackpanel> </grid>
i don't understand why sort crash brower, sort after all...
is xaml code?
is else?
i don't understand because, data correctly loaded , displays first time, when left click on column header sort datagrid
, there crash.
thank you.
Comments
Post a Comment