Home Forums WPF controls Xceed DataGrid for WPF DataGrid Fixed Column placing Icon

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #22195 |

    Hi,

    I am using Exceed DataGrid for wpf. how should i place a icon in to the Fixed column of the DataGrid. In Access Database Design when u Right Click and Set as a primary key, primary key icon will be placed in the Left side Fixed column. As the same i required.

    Imported from legacy forums. Posted by rajendernag (had 4878 views)

    Xceed Support
    Member
    Post count: 5658

    By fixed column, do you mean the RowSelector region (placed before the first colum ) ?

    As shown by this image: <a href=”http://forums.xceed.com/attach/WPF/DataGrid/RowSelector.jpg”>http://forums.xceed.com/attach/WPF/DataGrid/RowSelector.jpg</a&gt;

    Imported from legacy forums. Posted by Marcus [Xceed] (had 354 views)

    Xceed Support
    Member
    Post count: 5658

    If its effectivelly the case, then you need to design a new Style for the RowSelector control and attach this style to the DataRow style:

    <code>
    <Style x:Key=”myRowSelectorStyle ” TargetType=”{x:Type xcdg:RowSelector}”>
    <!– Create your new template with the appropriate triggers here –>
    </Style>

    <Style TargetType=”{x:Type xcdg:DataRow}” >
    <Setter Property=”RowSelectorPane.RowSelectorStyle” Value=”{StaticResource myRowSelectorStyle}”/>
    </Style>
    </code>

    You can start from the RowSelector styles and templates provided in the themes subfolder of the Xceed DataGrid for WPF folder (under Xceed Components )

    Imported from legacy forums. Posted by Marcus [Xceed] (had 391 views)

    User (Old forums)
    Member
    Post count: 23064

    Yes Exactly, i required the same.

    How can i do this.

    Imported from legacy forums. Posted by rajendernag (had 495 views)

    Xceed Support
    Member
    Post count: 5658

    Can you explain your requirements a little more?

    What is it you are trying to display?
    When do you want to display it?

    What is the link between the what you need displayed and the data present in the data grid control?

    Imported from legacy forums. Posted by Marcus [Xceed] (had 263 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanx for giving reply.

    I am creating DesignView of a Access Table (MS-Access 2007). i want to set a field column as a Primary Key. when i set key icon should be placed at the fixed column (not on the column header). It is on the left side fixed column.

    As shown by the image : http://forums.xceed.com/attach/WPF/DataGrid/RowSelector.jpg

    In the above image where Arrow symbol is placed.
    As the same when i click on the context menu item, dynamically icon should be placed specified column.

    Imported from legacy forums. Posted by rajendernag (had 455 views)

    Xceed Support
    Member
    Post count: 5658

    Then it is exactly as I explained before in the thread:

    You need to create a style for the RowSelector and affect it on your DataRow implicit style (refer to earlier post).

    You can find example of RowSelector styles and Templates in the themes subfolder of the installation package: (example C:\Program Files\Xceed Components\Xceed DataGrid for WPF 1.0\Themes )

    Look in the file “common\TableView.GridElementTemplates.xaml” for the resource with ID “tableViewBaseRowSelectorTemplate” for an example of ControlTemplate for the RowSelector.

    In your custom ControlTemplate, you need to place a trigger to display your custom icon.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 6094 views)

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.