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
165
Display selected data from XamDataGrid to a textbox
posted

 

I have a XamDataGrid and a textbox. I want to display selected data from XamDataGrid to that textbox. I tried by many ways but can't. Please support for me how can I do. I used VB.NET and Datasource : SQL server.

Please give me a sample how to do it.

 

Below is my Xaml

<Window x:Class="donvi"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="donvi" Height="321" Width="623" xmlns:igDP="http://infragistics.com/DataPresenter" Name="Window1" xmlns:c1grid="http://schemas.componentone.com/wpf/C1DataGrid">
    <Grid>
        <igDP:XamDataGrid Name="XamDataGrid1"  ScrollingMode="Deferred"
                                  SortRecordsByDataType="True" Margin="0,0,220,28">
            <igDP:XamDataGrid.FieldLayoutSettings>
                <igDP:FieldLayoutSettings AutoArrangeCells="Never" RecordSelectorLocation="None" SelectionTypeCell="None"
                                                    SelectionTypeRecord="Extended" SelectionTypeField="None"
                                                    AutoGenerateFields="False" AllowAddNew="False" AllowDelete="False" />
            </igDP:XamDataGrid.FieldLayoutSettings>
            <igDP:XamDataGrid.FieldLayouts >
                <igDP:FieldLayout>
                    <igDP:FieldLayout.Fields>
                        <!-- ============== -->
                        <!-- Example Column -->
                        <!-- ============== -->
                        <igDP:Field Name="donvi" Label="Don vi" Row="0" Column="1">
                            <igDP:Field.Settings>
                                <igDP:FieldSettings CellClickAction="SelectRecord"  AllowGroupBy="True" AllowEdit="False">
                                </igDP:FieldSettings>
                            </igDP:Field.Settings>
                        </igDP:Field>
                    </igDP:FieldLayout.Fields>
                </igDP:FieldLayout>
            </igDP:XamDataGrid.FieldLayouts>
        </igDP:XamDataGrid>
        <TextBox Height="23" HorizontalAlignment="Right" Margin="0,90,58,0" Name="TextBox1" VerticalAlignment="Top" Width="120" />
    </Grid>
</Window>

Thank you for your support