Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
Simples Binding Possible to XamDataGrid
posted

sorry not good at WPF yet... If I set autoGenerate on I get the heading and data displayed for all the rows. If I set it off the rows appear to be there. But nothing shows up for heading or data. What is the magic of getting the fields linked up? thanks

on the code side:

MyDataBase mydb = new MyDataBase();
var ds = (from x in mydb.vwCompanyProcessingInfoData select x).ToList();
BindingList<vwCompanyProcessingInfo> bindingList = new BindingList<vwCompanyProcessingInfo>(ds);
dataGrid.DataSource = bindingList;

------------

on the xaml side:

<Grid x:Name="LayoutRoot" Width="Auto">
<!--#BEGIN SNIPPET#-->
<igDP:XamDataGrid x:Name="dataGrid" Grid.Row="0"
GroupByAreaLocation="None"
DataSource="{Binding vwCompanyProcessingInfo}">

<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AutoGenerateFields="false"/>
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.FieldSettings>
<igDP:FieldSettings LabelClickAction="Nothing" AllowEdit="False" AllowGroupBy="false" AllowRecordFiltering="True" />
</igDP:XamDataGrid.FieldSettings>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
<igDP:Field Name="CompanyName" Label="Company Name" Visibility="Visible" />
<igDP:Field Name="isTechMultiBill" Visibility="Visible" />
<igDP:Field Name="isFieldInspectionMultiBill" />
<igDP:Field Name="isTechTestMultiBillSpecial" />
<igDP:Field Name="isFieldInspectionMultiBillSpecial" />
<igDP:Field Name="FieldInspectionApprover_or_PO" />
<igDP:Field Name="TechTestApprover_or_PO" />
<igDP:Field Name="isTechTestSignatureRequired" />
<igDP:Field Name="isFieldInspectionSignatureRequired" />
<igDP:Field Name="isMustHaveTechTestPOorAPR" />
<igDP:Field Name="isMustHaveFieldInspectionPOorAPR" />
<igDP:Field Name="LastUpdateUserID" />
<igDP:Field Name="LastUpdateDateTime" />
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
<!--#END SNIPPET#-->


</Grid>