Hi,
I have created several rows and columns etc sing grid and gridviews......I have my columns with headers assigned, however i want the column fixed so that whn the user scrolls the column fixed doesnt move. Similar to that in win forms columns.frozen = true;. And also i want to make all columns non-resizable.
Does anyone have any good references or tips?
Thanks in advance.
Urema.
Loading
personPosted Aug 13, 2009, 7:17 AM
Unfortunately i cannot provide any code, this code will be used in industry, so I am unable to do so. I just get stuck here and there.
Basically
////////////canvas and embedded user controls here, data templates etc
//// embeded user controls here, data templates etc
Thanks,
Urema.
Master BillaPosted Aug 12, 2009, 12:56 PM
Could you post your code here?
it's may help to me support to quickly
Thank you
Roei BarPosted Aug 12, 2009, 12:28 PM
if you dont have an outer
ScrollViewer, the GridView should pick up that it has limited space, and the internalScrollViewerwill appear.about keeping the Columns Non-Resizable
just add to the GridView the Attribute
CanUserResizeColumns = false
if you liked this dont forget the "Accepted Answer" :-)
personPosted Aug 12, 2009, 12:14 PM
Sorry im using a grid just and i have used a gridviewheaderrowpresenter to assign columns.
So from the gridViewHeaderRowPresenter with columns assigned to a column collection, how do i make them frozen so that they are read only and wont be affected by the scrollviewer?
Thanks anyway!
Urema.
Master BillaPosted Aug 12, 2009, 12:05 PM
I think you have grid using in listview in WPF. so you can do what ever you have asked
Just i have created to my project.
<ListView Grid.ColumnSpan="3" Margin="2" SnapsToDevicePixels="True"
AlternationCount="2" Grid.Row="1" ItemsSource="{Binding}" Name="lstQCDetails" FontSize="10" Background="WhiteSmoke" >
<ListView.View>
<GridView ColumnHeaderContainerStyle="{DynamicResource GridViewColumnHeaderStyle}" AllowsColumnReorder="False">
<GridViewColumn Width="160" Header="Cust PO Number"
DisplayMemberBinding="{Binding CustPONumber}" />
<GridViewColumn Width="100" Header="Style"
DisplayMemberBinding="{Binding Style}" />
<GridViewColumn Width="130" Header="Month Buy"
DisplayMemberBinding="{Binding MonthBy}" />
<GridViewColumn Width="60" Header="Order Qty"
DisplayMemberBinding="{Binding OrderQty}" />
GridView>
ListView.View>
ListView>
if you have any question about code, please let me know.
Thank you