Click here to Skip to main content
15,885,216 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF Design-Time Headaches Pin
SledgeHammer0110-Feb-14 12:04
SledgeHammer0110-Feb-14 12:04 
GeneralRe: WPF Design-Time Headaches Pin
GenJerDan11-Feb-14 5:20
GenJerDan11-Feb-14 5:20 
QuestionHitTest Problem Pin
Kevin Marois10-Feb-14 8:18
professionalKevin Marois10-Feb-14 8:18 
AnswerRe: HitTest Problem Pin
Jason Gleim10-Feb-14 9:41
professionalJason Gleim10-Feb-14 9:41 
QuestionLinq-To-SQL DBML Designer Question Pin
Kevin Marois10-Feb-14 7:11
professionalKevin Marois10-Feb-14 7:11 
QuestionMVVM Bound Radio Button Unexpected Behavior Pin
eddieangel7-Feb-14 12:08
eddieangel7-Feb-14 12:08 
AnswerRe: MVVM Bound Radio Button Unexpected Behavior Pin
Richard Deeming10-Feb-14 2:10
mveRichard Deeming10-Feb-14 2:10 
QuestionHow to get entire column values of a datagrid when datagrid column header check box is checked and bind those values to a datatable? Pin
abhinav12235-Feb-14 18:28
abhinav12235-Feb-14 18:28 
have a Listbox in which I have added two controls i.e a Checkbox and a Datagrid side by side as a Listboxitem. I have done it in a following manner:

In Code behind: listBox1.items.Add(dt)

here dt is the table name.

In Xaml:

C#
<ListBox Grid.Row="0" AlternationCount="2" MinHeight="305" HorizontalAlignment="Stretch"  Name="listBox1" VerticalAlignment="Stretch" MinWidth="537" >            
    <ListBox.ItemTemplate>                
        <DataTemplate>                    
                <StackPanel Name="stkPanel" MinHeight="80" MinWidth="500" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="40"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <DataGrid Grid.Column="1" 
                              AutoGenerateColumns="True" 
                              MinHeight="75" 
                              HorizontalAlignment="Center" 
                              Name="dataGrid1" 
                              VerticalAlignment="Stretch" 
                              MinWidth="470" 
                              MaxWidth="900" 
                              ItemsSource="{Binding}" 
                              IsReadOnly="True" Background="#E6BAB7B7">
                        <DataGrid.ColumnHeaderStyle>
                            <Style TargetType="DataGridColumnHeader">
                                <Setter Property="ContentTemplate">
                                    <Setter.Value>
                                        <DataTemplate>
                                            <CheckBox Name="colCheckBox" IsChecked="{Binding IsChecked, ElementName=IsDone, Mode=OneWay}" Content="{Binding}"/>
                                        </DataTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </DataGrid.ColumnHeaderStyle>
                    </DataGrid>
                    <CheckBox  Grid.Column="0" Height="35" Width="25" Name="IsDone" HorizontalAlignment="Right" VerticalAlignment="Center" Checked="IsDone_Checked" />
                    </Grid>                        
            </StackPanel>                   
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox> 

Suppose for first listboxitem, there is "IsDone" checkbox and a datagrid. If I select "IsDone" check box (listbox item) all the datagrid column header check box is selected.Now, I can uncheck some of the datagrid coulmn header check boxes.What I want is to get values of the entire column only whose columnheader check box is checked and bind those values to a datatable.Similarly repeat the above process for other listbox item.Can you please suggest me how to do that in wpf?

modified 6-Feb-14 0:39am.

QuestionHwndHost & C++/CLI problem Pin
Super Lloyd4-Feb-14 3:09
Super Lloyd4-Feb-14 3:09 
QuestionXML Treeview NodeChanged event not triggering on attribute edit Pin
wilx2-Feb-14 22:49
wilx2-Feb-14 22:49 
AnswerRe: XML Treeview NodeChanged event not triggering on attribute edit Pin
wilx2-Feb-14 23:09
wilx2-Feb-14 23:09 
QuestionAnother real newbie question - wiring events to handlers not in the code-behind class Pin
Marc Clifton2-Feb-14 10:57
mvaMarc Clifton2-Feb-14 10:57 
AnswerRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Pete O'Hanlon2-Feb-14 11:27
mvePete O'Hanlon2-Feb-14 11:27 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Marc Clifton5-Feb-14 15:09
mvaMarc Clifton5-Feb-14 15:09 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Pete O'Hanlon5-Feb-14 23:15
mvePete O'Hanlon5-Feb-14 23:15 
AnswerRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
_Maxxx_2-Feb-14 19:19
professional_Maxxx_2-Feb-14 19:19 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Mycroft Holmes3-Feb-14 3:05
professionalMycroft Holmes3-Feb-14 3:05 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
_Maxxx_3-Feb-14 9:29
professional_Maxxx_3-Feb-14 9:29 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Marc Clifton5-Feb-14 15:13
mvaMarc Clifton5-Feb-14 15:13 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
_Maxxx_5-Feb-14 15:26
professional_Maxxx_5-Feb-14 15:26 
QuestionHow do I wire Command to functions not in the view? Pin
Marc Clifton2-Feb-14 10:14
mvaMarc Clifton2-Feb-14 10:14 
QuestionHow to bind a dataset to a WPF richtextbox? Pin
fsunole0329-Jan-14 10:43
fsunole0329-Jan-14 10:43 
AnswerRe: How to bind a dataset to a WPF richtextbox? Pin
Wayne Gaylard30-Jan-14 1:07
professionalWayne Gaylard30-Jan-14 1:07 
QuestionHandling RowEditEnding in a DataGrid according to MVVM pattern Pin
Piotr Z27-Jan-14 23:43
Piotr Z27-Jan-14 23:43 
AnswerRe: Handling RowEditEnding in a DataGrid according to MVVM pattern Pin
Pete O'Hanlon28-Jan-14 0:29
mvePete O'Hanlon28-Jan-14 0:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.