Smart    Lucky

Smart Lucky

  • NA
  • 555
  • 640.8k

Problem In Value Getting At Runtime Of DataTemplate

Nov 29 2011 6:19 AM
Hi

i am using DataGrid in silverlight and and i am using custom columns and i have use datepicker and i want to get the datepicker value at run time and i want to store it in database is it possible then  how can nay one hlep me..............?





<Grid x:Name="LayoutRoot" Background="White">
        <hidaya:DataGrid Margin="12,42,38,128" Height="230" Width="350" x:Name="gridData" AutoGenerateColumns="False">
            <hidaya:DataGrid.Columns>
                <hidaya:DataGridTextColumn Header="Name" CanUserReorder="True" CanUserResize="True" Binding="{Binding Name}" CanUserSort="True" />
                <hidaya:DataGridTextColumn Header="Address" CanUserReorder="True" CanUserResize="True" Binding="{Binding Add}" CanUserSort="True"/>
                <hidaya:DataGridTemplateColumn Header="Image">
                    <hidaya:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Image Source="{Binding Image}" Height="30" Width="35"/>
                        </DataTemplate>
                    </hidaya:DataGridTemplateColumn.CellTemplate>
                </hidaya:DataGridTemplateColumn>
                <hidaya:DataGridCheckBoxColumn Header="Check Me" Binding="{Binding IsAvailable}"/>
                <hidaya:DataGridTemplateColumn Header="Last Invoice Date">
                    <hidaya:DataGridTemplateColumn.CellEditingTemplate>
                        <DataTemplate>
                            <hidaya:DatePicker SelectedDate="{Binding LastInvoice, Mode=TwoWay}" Name="Dp" />  // I want to get it's value
                        </DataTemplate>
                    </hidaya:DataGridTemplateColumn.CellEditingTemplate>
                </hidaya:DataGridTemplateColumn>
            </hidaya:DataGrid.Columns>
        </hidaya:DataGrid>
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="30,0,0,0" Name="textBlock1" Text="{Binding  Name}" VerticalAlignment="Top" Width="103" />
        <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="202,9,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
    </Grid>

Answers (1)