views:

1520

answers:

2

Hi there im using C# 3.5, this could be possible ?

<EditItemTemplate>
                                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("date", "{dd/MM/YYYY}")  %>'></asp:TextBox></EditItemTemplate>
                                    <ItemTemplate>

I was trying :

<ListView Margin="0,80,0,38" Name="dlstInformes" Grid.ColumnSpan="2" >
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Numero Informe"   DisplayMemberBinding="{Binding Path= numeroinforme}" >
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock >

                                </TextBlock>   
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="Nombre" DisplayMemberBinding="{Binding Path= nombreinforme}" />
                    <GridViewColumn Header="Fecha Informe" DisplayMemberBinding="{Binding Path= fechainforme}" />
                </GridView>
            </ListView.View>
+3  A: 

one solution here:

<ListView Margin="0,80,0,38" Name="dlstInformes" MouseDoubleClick="dlstInformes_MouseDoubleClick">
        <ListView.View>
            <GridView>
                <GridViewColumn Header="Numero Informe"   DisplayMemberBinding="{Binding Path= numeroinforme}" >

                </GridViewColumn>
                <GridViewColumn Header="Nombre" DisplayMemberBinding="{Binding Path= nombreinforme}" />
                <GridViewColumn Header="Fecha Informe">
                    <GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock>
                            <TextBlock.Text>
                             <Binding Path="fechainforme" StringFormat="{}{0:MM/dd/yyyy}"/>
                             </TextBlock.Text>
                            </TextBlock>
                        </DataTemplate>
                    </GridViewColumn.CellTemplate>
                </GridViewColumn> 

            </GridView>
        </ListView.View>

    </ListView>

hopes helps...

Angel Escobedo
A: 

not an answer: is there a support for using different stringformats ?

StringFormat="{}{0:MM/dd/yyyy}"/ works for ??? USA

e.g. other countries using maybe dd.MM.yyyy

kind regards

Jeffrey
This should be its own question
Richard C. McGuire