operation speed is very slow if we have a Page with an UXGridView and UXTreeView

1 reply. Last post: November 16, 2011 9:40 PM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
xu guochunMember

Hi,

Question one:
We are using different ClientUI5 Controls on one Page.In our example we have a Page with an UXGridView(page size is 20,has 25 columns), UXTreeView(has about 1000 items) and UXTabControl.The issue is that operation speed is very slow on this page, and it is taking a lot of time to select one item or to edit one item.This is a big problem about performance.
1> It seems if the page only has the UXGridView or the UXTreeView, the operation speed is be fine.
2> It seems if we reduce the number of UXTreeView's Items, the operation speed can be increased( performance improvement).
3> It seems if we reduce the number of UXGridView's Columns, the operation speed can be increased( performance improvement).
So Is there a limit to how many objects you can export on one page?Please give me some advise.

<Intersoft:DockPanel Name="dockPanel12" FillChildMode="Custom">
  <Intersoft:UXGridView Name="QingDanList"  AutoGenerateColumns="False"  Intersoft:DockPanel.IsFillElement="True"
                        ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem,Mode=TwoWay}"
                        Margin="0,4,4,0" IsBusy="{Binding IsBusy, Mode=TwoWay}"
                        ColumnHeaderStyleSelector="{StaticResource ColumnHeaderStyleSelector}"
                        FrozenColumnCount="2" StatusBarVisibility="Visible"
                        QueryOperation="Server" CanUserPage="True" PageSize="20"
                        PageDescriptor="{Binding QueryDescriptor.PageDescriptor, Mode=TwoWay}"
                        SortDescriptors="{Binding QueryDescriptor.SortDescriptors, Mode=TwoWay}"
                        AllowDrop="True"
                        GroupFootersVisibility="Collapsed" GroupByBoxVisibility="Collapsed"
                        AutoEditOperation="{Binding AutoEditOperation}"
                        CanUserAddRows="{Binding CanUserAddRows}"
                        CanUserDeleteRows="{Binding CanUserDeleteRows}"
                        CanUserEditRows="{Binding CanUserEditRows}"
                        EditEnterKeyAction="{Binding EditEnterKeyAction}"
                        EditMouseGesture="{Binding EditMouseGesture}"
                        EnterKeyAction="{Binding EnterKeyAction}"
                        NewItem="{Binding NewItem, Mode=TwoWay}"
                        SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}"
                        ValidateRowCommand="{Binding ValidateRowCommand}"
                        InsertRowCommand="{Binding InsertRowCommand}"
                        DeleteRowCommand="{Binding DeleteRowCommand}"
                        PrepareNewRowCommand="{Binding PrepareNewRowCommand}"
                        UpdateCellCommand="{Binding UpdateCellCommand}"
                        UpdateRowCommand="{Binding UpdateRowCommand}"
                        SaveChangesCommand="{Binding SaveChangesCommand}"
                        RejectRowCommand="{Binding RejectRowCommand}"
                        HasChanges="{Binding HasChanges}">
    <Intersoft:UXGridView.ResourceOverride>
      <Intersoft:UXGridViewResource BusyText="加载中" ContextMenu_CopyRow="复制行"/>
    </Intersoft:UXGridView.ResourceOverride>
    <Intersoft:UXGridView.Columns>
      <Intersoft:UXGridViewCheckBoxColumn Binding="{Binding bzj}" Header="标准件" IsReadOnly="True">  </Intersoft:UXGridViewCheckBoxColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding qdxh}" Header="序号" IsReadOnly="True" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding dyzy}" Header="专业" IsReadOnly="True" >  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding bhlb}" Header="类别" IsReadOnly="True" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding zhbh}" Header="项目编号" >  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding tzbz}" Header="换" IsReadOnly="True" CellHorizontalAlignment="Center">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding qdmc}" Header="项目名称">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding dw}" Header="单位" CellHorizontalAlignment="Center">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding zhxs}" Header="工程量"  CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding zcfdj, StringFormat=n}" Header="综合单价" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding zgjdj, StringFormat=n}" Header="暂估价" IsReadOnly="True" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding zcfhj, StringFormat=n}" Header="综合报价"  IsReadOnly="True" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding jsjs}" Header="取费基数" IsReadOnly="True">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding glffl, StringFormat=p}" Header="管理费费率" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding lrfl, StringFormat=p}" Header="利率费率" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding rgdj, StringFormat=n}" Header="人工单价" IsReadOnly="True" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding cldj, StringFormat=n}" Header="材料单价" IsReadOnly="True" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding jxdj, StringFormat=n}" Header="机械单价" IsReadOnly="True" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewCheckBoxColumn Binding="{Binding sptbz}" Header="商品" IsReadOnly="True">  </Intersoft:UXGridViewCheckBoxColumn>
      <Intersoft:UXGridViewCheckBoxColumn Binding="{Binding bengsong}" Header="泵送" IsReadOnly="True">  </Intersoft:UXGridViewCheckBoxColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding rgxs, StringFormat=\{0:N3\}}" Header="人工系数" IsReadOnly="True" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding clxs, StringFormat=\{0:N3\}}" Header="材料系数" IsReadOnly="True" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding jxxs, StringFormat=\{0:N3\}}" Header="机械系数" IsReadOnly="True" CellHorizontalAlignment="Right">  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewTextColumn Binding="{Binding bz}" Header="备注" >  </Intersoft:UXGridViewTextColumn>
      <Intersoft:UXGridViewCheckBoxColumn Binding="{Binding iszb}" Header="招标" IsReadOnly="True">  </Intersoft:UXGridViewCheckBoxColumn>
    </Intersoft:UXGridView.Columns>
  </Intersoft:UXGridView>
  <Intersoft:UXResizablePane x:Name="SampleControl2" Header="辅助" Intersoft:DockPanel.Dock="Bottom" ResizeDock="Top"
                                        BorderThickness="1,1,0,0" Height="250"    MinHeight="32" MaxHeight="400"
                HeaderImage="/Images/Office/PublishPlanHS.png" CollapseAction="KeepContentVisible">
    <Intersoft:UXResizablePane.HeaderBackground>
      <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
        <GradientStop Color="White"/>
        <GradientStop Color="#FFA0E1FD" Offset="1"/>
      </LinearGradientBrush>
    </Intersoft:UXResizablePane.HeaderBackground>
    <Intersoft:UXTabControl   Name="uXTabControl2" Margin="2" CornerRadius="2" SelectedIndex="{Binding SelectedTabIndex,Mode=TwoWay}">
      <Intersoft:UXTabItem Header="备注"  Background="{StaticResource BlueBackGroud}" CornerRadius="2" HeaderDisplayMode="Content"  Margin="0,0,3,0" >

      </Intersoft:UXTabItem>
      <Intersoft:UXTabItem Header="模板钢筋" Background="{StaticResource BlueBackGroud}" CornerRadius="2" HeaderDisplayMode="Content" Margin="0,0,3,0">

      </Intersoft:UXTabItem>
      <Intersoft:UXTabItem Header="换配比" Background="{StaticResource BlueBackGroud}" CornerRadius="2" HeaderDisplayMode="Content" Margin="0,0,3,0">
      </Intersoft:UXTabItem>
      <Intersoft:UXTabItem Header="单价组成" Background="{StaticResource BlueBackGroud}" CornerRadius="2" HeaderDisplayMode="Content" Margin="0,0,3,0">
      </Intersoft:UXTabItem>
      <Intersoft:UXTabItem Header="工程量计算式" Background="{StaticResource BlueBackGroud}" CornerRadius="2" HeaderDisplayMode="Content" Margin="0,0,3,0">
      </Intersoft:UXTabItem>
      <Intersoft:UXTabItem Header="清单特征" Visibility="{Binding IsQingDan}" Background="{StaticResource BlueBackGroud}" CornerRadius="2" HeaderDisplayMode="Content"  Margin="0,0,3,0" >
        <Grid>
          <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="0.5*"/>
            <RowDefinition Height="0.5*"/>
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="60"/>
            <ColumnDefinition Width="0.3*"/>
            <ColumnDefinition Width="60"/>
            <ColumnDefinition Width="0.7*"/>
          </Grid.ColumnDefinitions>
          <Intersoft:FieldLabel Header="清单编号:" Margin="0" HorizontalHeaderAlignment="Stretch" />
          <Intersoft:UXTextBox Text="{Binding SelectedItem.zhbh}" TextWrapping="Wrap" Grid.Column="1" HorizontalContentAlignment="Left" VerticalContentAlignment="Stretch" VerticalAlignment="Center" Margin="2"/>
          <Intersoft:FieldLabel Header="清单名称:" Margin="0" Grid.Column="2"/>
          <Intersoft:UXTextBox Text="{Binding SelectedItem.qdmc}" TextWrapping="Wrap" Grid.Column="3" HorizontalContentAlignment="Left" VerticalContentAlignment="Stretch" VerticalAlignment="Center" Margin="2"/>

          <Intersoft:FieldLabel Header="项目特征:" Margin="0" Grid.Row="1" d:LayoutOverrides="Height"/>
          <Intersoft:UXScrollViewer VerticalScrollBarVisibility="Auto" Margin="0" Grid.Row="1" Grid.Column="1">
            <Intersoft:UXTextBox Text="{Binding SelectedItem.qdtz}" BorderThickness="2"
              VerticalScrollBarVisibility="Disabled" TextWrapping="Wrap" AcceptsReturn="True" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Margin="2"/>
          </Intersoft:UXScrollViewer>
          <Intersoft:FieldLabel Header="计算规则:" Content="{Binding SelectedItem.qdjsgz}" Margin="0" Grid.Row="2"/>

          <Intersoft:UXScrollViewer VerticalScrollBarVisibility="Auto" Margin="0" Grid.Row="2" Grid.Column="1">
            <Intersoft:UXTextBox Text="{Binding SelectedItem.qdjsgz}" BorderThickness="2"
              VerticalScrollBarVisibility="Disabled" TextWrapping="Wrap" AcceptsReturn="True" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Margin="2"/>
          </Intersoft:UXScrollViewer>
          <Grid Grid.Column="2" Margin="2" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="2">
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="40"/>
            </Grid.RowDefinitions>
            <Intersoft:UXGridView  x:Name="QingDanFeasureList"  AutoGenerateColumns="False"   Margin="0"
                                   FrozenColumnCount="2" StatusBarVisibility="Collapsed" QueryOperation="Server"
                                   CanUserPage="False"  AutoEditOperation="True" HorizontalAlignment="Stretch"
                                   VerticalAlignment="Stretch">
              <!--StatusBarVisibility="Collapsed"  EnableRowVirtualization="True"-->
              <Intersoft:UXGridView.ResourceOverride>
                <Intersoft:UXGridViewResource BusyText="加载中" ContextMenu_CopyRow="复制行"/>
              </Intersoft:UXGridView.ResourceOverride>
              <Intersoft:UXGridView.Columns>
                <Intersoft:UXGridViewTextColumn Binding="{Binding SelectedItem.qdtz}"  Header="项目特征" />
                <Intersoft:UXGridViewTextColumn Binding="{Binding SelectedItem.qdtz}" Header="特征描述" />
                <Intersoft:UXGridViewCheckBoxColumn Binding="{Binding SelectedItem.iszb}" Header="显示" />
                <Intersoft:UXGridViewCheckBoxColumn Binding="{Binding SelectedItem.iszb}" Header="换行" />
              </Intersoft:UXGridView.Columns>
            </Intersoft:UXGridView>
            <StackPanel Margin="0,5,0,0" Grid.Row="1" Orientation="Horizontal">
              <RadioButton Content="编辑清单特征" HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="True"  />
              <RadioButton Content="编辑工作内容" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,0"  />
              <Button Content="取子目名称" HorizontalAlignment="Left" Height="25" Margin="0" Width="62"/>
              <Button Content="清单特征管理" HorizontalAlignment="Right" Height="25" Margin="10,0,0,0" Width="80"/>
            </StackPanel>
          </Grid>
        </Grid>
      </Intersoft:UXTabItem>
      <Intersoft:UXTabItem Header="清单指引" Background="{StaticResource BlueBackGroud}" CornerRadius="2" HeaderDisplayMode="Content" Margin="0,0,3,0">
      </Intersoft:UXTabItem>
      <Intersoft:UXTabItem Header="超高费" Background="{StaticResource BlueBackGroud}" CornerRadius="2" HeaderDisplayMode="Content" Margin="0,0,3,0">
      </Intersoft:UXTabItem>
    </Intersoft:UXTabControl>
  </Intersoft:UXResizablePane>
</Intersoft:DockPanel>
</Grid>
<Intersoft:UXResizablePane Intersoft:DockPanel.Dock="Left" HeaderImage="/Images/Info.png"
                           ResizeDock="Right" Margin="2,2,0,2" CollapseAction="KeepContentVisible"
                           Visibility="{Binding OutlookMenuVisible}" EnableFadingAnimation="False"
                           MinWidth="38" Width="250" MaxWidth="400"  x:Name="LeftPane" Header="清单">
  <Intersoft:UXResizablePane.HeaderBackground>
    <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
      <GradientStop Color="White"/>
      <GradientStop Color="#FFA0E1FD" Offset="1"/>
    </LinearGradientBrush>
  </Intersoft:UXResizablePane.HeaderBackground>
  <Intersoft:UXTabControl   Name="uXTabControl3" Margin="2" CornerRadius="2" SelectedIndex="{Binding SelectedLeftTabIndex,Mode=TwoWay}" TabStripPlacement="Bottom" >

    <Intersoft:UXTabItem Header="定额" Background="{StaticResource BlueBackGroud}" CornerRadius="2" HeaderDisplayMode="ContentAndImage"  Margin="0,0,3,0" HeaderImage="/Images/ClientUI_Silverlight.png" >

    </Intersoft:UXTabItem>
    <Intersoft:UXTabItem Header="清单" Background="{StaticResource BlueBackGroud}" CornerRadius="2" HeaderDisplayMode="ContentAndImage" Margin="0,0,3,0" HeaderImage="/Images/ClientUI_Silverlight.png">


      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="25"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <Button Content="查询" Name="SearchButton" Grid.Column="1" Height="19" Margin="0,2" VerticalAlignment="Top"/>
        <Intersoft:UXTextBox Name="SearchText"    Grid.Column="0" Margin="0,2"  />
        <Intersoft:UXScrollViewer x:Name="TreeScrollView" Grid.Row="1" Grid.ColumnSpan="2" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0,2">
          <Intersoft:UXTreeView x:Name="SampleControl" ItemsSource="{Binding TreeViewItems}"
                                    CollectionMemberPath="Nodes" DisplayMemberPath="Name" SelectedValuePath="Name"
                                    SelectedItem="{Binding SelectedTViewItem, Mode=TwoWay}"
                                            
                                    Background="{x:Null}" AllowMoveItem="True" DragMode="Copy" DragDropTooltipText=""
                                    BorderThickness="0">
            <Intersoft:UXTreeView.ItemContainerStyle>
              <Style TargetType="Intersoft:UXTreeViewItem">
                <Setter Property="DisplayMemberPath" Value="Name" />
                <Setter Property="CollectionMemberPath" Value="Nodes" />
                <Setter Property="DisplayMode" Value="Content" />
                <Setter Property="AllowMoveItem" Value="True"/>
                <Setter Property="DragMode" Value="Copy"/>
                <Setter Property="DragDropTooltipText" Value=""/>
              </Style>
            </Intersoft:UXTreeView.ItemContainerStyle>
          </Intersoft:UXTreeView>
        </Intersoft:UXScrollViewer>

      </Grid>
    </Intersoft:UXTabItem>
  </Intersoft:UXTabControl>
</Intersoft:UXResizablePane>
</Intersoft:DockPanel>

Question Two:

We Set UXTreeView IsLoadOnDemand="True", LoadOnDemandMode="UseProcessedItem"  and AllowMoveItem="True";Set UXTreeViewItem AllowMoveItem="True";The Problem is that the item bulit on demand does not support drag.If UXTreeView's IsLoadOnDemand="False", the item support drag.

<Intersoft:UXTreeView x:Name="SampleControl" ItemsSource="{Binding TreeViewItems}"
                                            CollectionMemberPath="Nodes" DisplayMemberPath="Name" SelectedValuePath="Name"
                                            SelectedItem="{Binding SelectedTViewItem, Mode=TwoWay}"
                                            IsLoadOnDemand="True" BusyLatency="0.002" LoadOnDemandMode="UseProcessedItem"
                                            ExpandedItem="{Binding ExpandedTViewItem, Mode=TwoWay}"
                                            ProcessedItem="{Binding ProcessedTViewItem, Mode=TwoWay}"
                                            Background="{x:Null}" AllowMoveItem="True" DragMode="Copy" DragDropTooltipText=""
                                            BorderThickness="0">
  <Intersoft:UXTreeView.ItemContainerStyle>
    <Style TargetType="Intersoft:UXTreeViewItem">
      <Setter Property="DisplayMemberPath" Value="Name" />
      <Setter Property="CollectionMemberPath" Value="Nodes" />
      <Setter Property="DisplayMode" Value="Content" />
      <Setter Property="AllowMoveItem" Value="True"/>
      <Setter Property="DragMode" Value="Copy"/>
      <Setter Property="DragDropTooltipText" Value=""/>
    </Style>
  </Intersoft:UXTreeView.ItemContainerStyle>
</Intersoft:UXTreeView>
Thanks for any enlightenment in advance.
All times are GMT -5. The time now is 2:36 PM.
Previous Next