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
350
Xaml Export to Excel Button.
posted

I am trying to add a export to excel button to the bottom of the xamlTabControl. I havent trouble with placement. Could you provide me a small example with just a simple button where I can export datagrid to excel. I have the logic to export datagrid to excel. I just to add the button to the bottom of the xamltabcontrol.I would like to add with the xaml below.
                    <igWindows:XamTabControl Name="xamlTabControl1" Grid.Row="2">
                        <igWindows:TabItemEx Header="CSV File Raw Data Import" Name="tabItemEx0" >          
                             <igDP:XamDataGrid Grid.Row="2" Name="dgTimeSheets" GroupByAreaLocation="None" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
                        <igDP:XamDataGrid.FieldLayoutSettings>
                            <igDP:FieldLayoutSettings HighlightAlternateRecords="True" AllowAddNew="False" AllowDelete="False" />
                        </igDP:XamDataGrid.FieldLayoutSettings>
                        <igDP:XamDataGrid.FieldSettings>
                            <igDP:FieldSettings AllowEdit="False" AllowGroupBy="False" AllowSummaries="True" SummaryDisplayArea="BottomFixed" SummaryUIType="MultiSelectForNumericsOnly" />
                        </igDP:XamDataGrid.FieldSettings>
                        <igDP:XamDataGrid.FieldLayouts>
                            <igDP:FieldLayout Key="prime">
                                <igDP:Field Name="TimesheetNumber" Visibility="Collapsed"/>
                                <igDP:Field Name="EmployeeNumber" Label="Emp Num"/>
                                <igDP:Field Name="TotalHrsWorked" Label="Total Hrs">
                                    <igDP:Field.Settings>
                                        <igDP:FieldSettings EditAsType="{x:Type sys:Double}" />
                                    </igDP:Field.Settings>
                                </igDP:Field>
                                <igDP:Field Name="PeriodStart" Label="Period Start"/>
                                <igDP:Field Name="PeriodEnd" Label="Period End"/>
                                <!--<igDP:Field Name="PayPeriodStart" Label="Pay Period Start"/>
                                <igDP:Field Name="PayPeriodEnd" Label="Pay Period End"/>-->
                                <igDP:Field Name="HdrId" Visibility="Collapsed"/>
                                <igDP:Field Name="Details"/>
                                <igDP:Field Name="Batch" Visibility="Collapsed"/>

                                <igDP:FieldLayout.SummaryDefinitions>
                                    <igDP:SummaryDefinition SourceFieldName="TotalHrsWorked" Calculator="{x:Static igDP:SummaryCalculator.Sum}" />
                                </igDP:FieldLayout.SummaryDefinitions>

                            </igDP:FieldLayout>
                            <igDP:FieldLayout ParentFieldName="Details" ParentFieldLayoutKey="prime">
                                <igDP:Field Name="DtlId" Visibility="Collapsed"/>
                                <igDP:Field Name="Header" Visibility="Collapsed"/>
                                <igDP:Field Name="JobNumber" Label="Job Num"/>
                                <igDP:Field Name="Phase"/>
                                <igDP:Field Name="Hours">
                                    <igDP:Field.Settings>
                                        <igDP:FieldSettings EditAsType="{x:Type sys:Double}" />
                                    </igDP:Field.Settings>
                                </igDP:Field>
                                <igDP:Field Name="PayType" Label="Pay Type"/>
                                <igDP:Field Name="RptDtlId" Visibility="Collapsed"/>
                            </igDP:FieldLayout>
                        </igDP:XamDataGrid.FieldLayouts>
                    </igDP:XamDataGrid>
                              <!-- tab item content goes here -->
                        </igWindows:TabItemEx>
                        
                    </igWindows:XamTabControl>
                                                      
                </Grid>

            </wizard:WizardPage>

  • 22015
    posted

    Hello pianoboy11,

     

    Thank you for contacting us.

     

    I have been looking into your requirements and it seems that I am missing something  from your scenario. Would you please provide me with more detailed information on the functionality you want to achieve?

    Do you want to place the button where the following line is, in the code snippet, that you have provided:   <!-- tab item content goes here -->?

    If possible would you please provide me with a screenshot of where the button should be placed?

     

    Looking forward to hearing from you.