Hide Datagrid Expanders

| 1 Comment

In the program I am developing, I wanted to show data from a table in a datagrid. This table is related to another table. As a result, this datagrid would show an expander and the name of that other table. I wanted this hidden. So I asked myself, "How do I hide the expander?" I didn't know so I searched and found the following:

Microsoft Support WebCasts

One DataGrid is designated to be the master grid and the second is designated to be the details grid. When you select an entry in the master list, all of the related child entries are shown in the details list. As you can see, there are no expanders shown on the master DataGrid. This is done by setting the AllowNavigation property of the DataGrid controls to false.

So there you have it set AllowNavigation to False. If you happen to find this useful, please link to this post as there is nothing that says to do this to hide them. I think this would be very helpful to others.

1 Comment

I had a hell of time finding that same feature.
AllowNavigation = false;


About this Entry

This page contains a single entry by tmichael published on June 21, 2003 6:12 PM.

Version Number was the previous entry in this blog.

TreeNode Level is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.