很快,我是网格和WPF的新手,由于某种原因,我无法在ListView中看到我的内容,而且我非常确定Grid会导致它。
cur.execute("INSERT INTO testtable (id,name) VALUES (%s, %s)" % row)
TypeError: not enough arguments for format string.
实施是:
<Grid Canvas.Left="223" Canvas.Top="228">
<Grid.RowDefinitions>
<RowDefinition Height="9*"/>
<RowDefinition Height="28*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="8*"/>
<ColumnDefinition Width="21*"/>
<ColumnDefinition Width="29*"/>
<ColumnDefinition Width="29*"/>
</Grid.ColumnDefinitions>
<ListView HorizontalAlignment="Left" Height="123" VerticalAlignment="Top" Width="589" Name="LibraryList" Margin="-188,-76,-141.001,-10" IsEnabled="False" Grid.ColumnSpan="4" Grid.RowSpan="2" >
<ListView.View>
<GridView>
<GridViewColumn Header="Item Name" DisplayMemberBinding="{Binding ItemName}" Width="70"/>
<GridViewColumn Header="Copy Number" DisplayMemberBinding="{Binding CopyNumber}" Width="85"/>
<GridViewColumn Header="Guid" DisplayMemberBinding="{Binding Guid}" Width="100"/>
<GridViewColumn Header="Print Date" DisplayMemberBinding="{Binding Date}" Width="90"/>
<GridViewColumn Header="Best Seller" DisplayMemberBinding="{Binding BestSeller}" Width="90"/>
<GridViewColumn Header="Category" DisplayMemberBinding="{Binding Category}" Width="70"/>
<GridViewColumn Header="Sub Category" DisplayMemberBinding="{Binding SubCategory}" Width="80"/>
</GridView>
</ListView.View>
</ListView>
</Grid>
任何想法?
顺便说一句:有时我收到一条消息:输入格式不正确。