zoukankan      html  css  js  c++  java
  • GridControl

    <dxg:GridControl Name="grid" 
                                 ItemsSource="{Binding }" AutoExpandAllGroups="True" 
                                 AllowDrop="False"  IsFilterEnabled="False">
                    <dxg:GridControl.Columns>
                        <dxg:GridColumn FieldName="Weekday" MinWidth="30" GroupIndex="0">
                            
                            <dxg:GridColumn.GroupValueTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Path=Value,Converter={StaticResource weekdayConverter}}" Margin="5,0,0,0" />
                                </DataTemplate>
                            </dxg:GridColumn.GroupValueTemplate>
                        </dxg:GridColumn>
                        
                        <dxg:GridColumn FieldName="Starttime" MinWidth="30">
                            <dxg:GridColumn.CellTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Path=Value,Converter={StaticResource dateTimeConverter},ConverterParameter='HHmm'}" VerticalAlignment="Center" />
                                </DataTemplate>
                            </dxg:GridColumn.CellTemplate>
                        </dxg:GridColumn>
                        
                        <dxg:GridColumn FieldName="Endtime" MinWidth="30">
                            <dxg:GridColumn.CellTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Path=Value,Converter={StaticResource dateTimeConverter},ConverterParameter='HHmm'}" VerticalAlignment="Center" />
                                </DataTemplate>
                            </dxg:GridColumn.CellTemplate>
                            
                        </dxg:GridColumn>
                        
                        <dxg:GridColumn MinWidth="30" >
                            <dxg:GridColumn.CellTemplate>
                                <DataTemplate>
                                <Button Width="80" Name="btnDelete" Click="btnDelete_Click">Delete</Button>
                                </DataTemplate>
                            </dxg:GridColumn.CellTemplate>
                        </dxg:GridColumn>
                    </dxg:GridControl.Columns>
                    
                    <dxg:GridControl.GroupSummary>
                        <dxg:GridSummaryItem SummaryType="Count" />
                    </dxg:GridControl.GroupSummary>
                    
                    <dxg:GridControl.View>
                        <dxg:TableView Name="view" AllowGrouping="False" AllowEditing="False" 
                                       AllowColumnFiltering="False" AllowSorting="False" AllowDrop="False" 
                                       AllowMoving="False" ShowGroupedColumns="False" 
                                       ShowGroupPanel="False"   AutoWidth="True" NavigationStyle="Row" />
                    </dxg:GridControl.View>
                </dxg:GridControl>

  • 相关阅读:
    MSBuild最佳实践
    Javascript:阻止浏览器默认右键事件,并显示定制内容
    zeptoJS:如何像jQuery一样,让滚动变得优雅?
    Javascript:DOM表格操作
    Javascript:getElementsByClassName
    Javascript:DOM动态创建元素实例应用
    Javascript:倒计时
    Javascript:sort()方法快速实现对数组排序
    探究css !important的应用之道
    Javascript:splice()方法实现对数组元素的插入、删除、替换及去重
  • 原文地址:https://www.cnblogs.com/quietwalk/p/3531636.html
Copyright © 2011-2022 走看看