Click here to Skip to main content
15,891,473 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Accept Button and Data Binding inconsistency Pin
Abhinav S4-Jul-12 23:23
Abhinav S4-Jul-12 23:23 
GeneralRe: Accept Button and Data Binding inconsistency Pin
Bernhard Hiller4-Jul-12 23:36
Bernhard Hiller4-Jul-12 23:36 
GeneralRe: Accept Button and Data Binding inconsistency Pin
Pete O'Hanlon5-Jul-12 0:30
mvePete O'Hanlon5-Jul-12 0:30 
GeneralRe: Accept Button and Data Binding inconsistency Pin
Abhinav S5-Jul-12 0:47
Abhinav S5-Jul-12 0:47 
GeneralRe: Accept Button and Data Binding inconsistency Pin
Wayne Gaylard5-Jul-12 2:20
professionalWayne Gaylard5-Jul-12 2:20 
GeneralRe: Accept Button and Data Binding inconsistency Pin
Bernhard Hiller5-Jul-12 2:56
Bernhard Hiller5-Jul-12 2:56 
GeneralRe: Accept Button and Data Binding inconsistency Pin
Pete O'Hanlon5-Jul-12 9:38
mvePete O'Hanlon5-Jul-12 9:38 
QuestionWPF Cascading filters Pin
Ross Cain4-Jul-12 8:45
Ross Cain4-Jul-12 8:45 
I'm trying to use a series of cascading controls to filter a datagridview.
I've built a local sdf database and set up the datatable I wish to use in my gridview.

I created a combobox which I bound to my datatable and happily populates my regions
This then populates a second control (checkboxlist) which returns a set of checbox selections for the region selecetd in the combobox (This also works fine).

Finally I have my datagridview and this is where I have an issue.
The Grid is populated via the same table and fills as you select from the combobox but only for recordsets with the 1st terminal selection.

What I so far seem unable to do is work out how to use the checkboxlist to filter the datagridview.
I've tried adding a datatemplate and then code behind to create an observable collection but then my checkboxlist stopped working.

I'd really appreciate any advice or help on how to solve this as I'm sure it is simpler than I'm making it.

This is my XAML currently with the datatemplate though it seems to populate the checkboxlist fine without that template:

C#
<Window.Resources>
    <my:VlogicaDataSet x:Key="vlogicaDataSet" />
    <CollectionViewSource x:Key="_Regions_ViewSource" Source="{Binding Path=_Regions_, Source={StaticResource vlogicaDataSet}}" />
    <CollectionViewSource x:Key="_Regions__Terminal_ViewSource" Source="{Binding Path=Regions$_Terminal$, Source={StaticResource _Regions_ViewSource}}" />
    <CollectionViewSource x:Key="_Regions__Terminal_GridViewViewSource" Source="{Binding Path=Terminal$_GridView, Source={StaticResource _Regions__Terminal_ViewSource}}" />
</Window.Resources>
<Grid>
    <GroupBox Header="Analysis Mode" Height="471" HorizontalAlignment="Left" Margin="12,185,0,0" Name="groupBox1" VerticalAlignment="Top" Width="1463" Foreground="Orange">
        <Grid DataContext="{StaticResource _Regions__Terminal_GridViewViewSource}">
            <TabControl Height="372" HorizontalAlignment="Left" Margin="14,18,0,0" Name="tabControl1" VerticalAlignment="Top" Width="235">
                <TabItem Header="Forecasting" Name="tabItem1">
                    <Grid DataContext="{StaticResource _Regions_ViewSource}">
                        <Label Content="Region Selection" Height="28" HorizontalAlignment="Left" Margin="6,17,0,0" Name="label1" VerticalAlignment="Top" FontWeight="Bold" />
                        <ComboBox DisplayMemberPath="GROUPNAME" Height="23" HorizontalAlignment="Left" ItemsSource="{Binding}" Margin="10,46,0,0" Name="_Regions_ComboBox" SelectedValuePath="GROUPNUM" VerticalAlignment="Top" Width="196">
                            <ComboBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <VirtualizingStackPanel />
                                </ItemsPanelTemplate>
                            </ComboBox.ItemsPanel>
                        </ComboBox>
                        <xctk:CheckListBox DataContext="{Binding UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding Source={StaticResource _Regions__Terminal_ViewSource}}" Margin="10,102,20,77" Name="clbTerminals" SelectedItems="{Binding}" SelectedMemberPath="IsSelected" SelectedValue="{Binding Path=SelectedValue}" ValueMemberPath="Level" DisplayMemberPath="NAME">
                            <ItemsControl>
                                <DataTemplate>
                                    <CheckBox IsChecked="{Binding Path=Selected}" Content="{Binding Path=Description}"/>
                                </DataTemplate>
                            </ItemsControl>
                        </xctk:CheckListBox>



And this was the code behind class for the observable collection:

C#
public ObservableCollection<CheckedItem> List { get;set;}

public class CheckedItem
{
  public bool Selected { get; set; }
  public string Description { get; set; }
}


Though this currently returns a debug error on the Observablecollection which says expecting class delegate, enum, interface,structure.

This was code I found researching online for an answer and tried to adapt in my VS2010 project.
QuestionBinding Tooltip to template element Pin
Blikkies4-Jul-12 3:31
professionalBlikkies4-Jul-12 3:31 
AnswerRe: Binding Tooltip to template element Pin
Pete O'Hanlon4-Jul-12 3:40
mvePete O'Hanlon4-Jul-12 3:40 
GeneralRe: Binding Tooltip to template element Pin
Blikkies4-Jul-12 4:01
professionalBlikkies4-Jul-12 4:01 
GeneralRe: Binding Tooltip to template element Pin
Pete O'Hanlon4-Jul-12 4:16
mvePete O'Hanlon4-Jul-12 4:16 
AnswerRe: Binding Tooltip to template element Pin
vinodkrebc6-Jul-12 0:59
vinodkrebc6-Jul-12 0:59 
GeneralWPF Button Image Source Pin
Kevin Marois2-Jul-12 11:47
professionalKevin Marois2-Jul-12 11:47 
GeneralRe: WPF Button Image Source Pin
Unnikrishnan_S_N3-Jul-12 2:14
Unnikrishnan_S_N3-Jul-12 2:14 
GeneralRe: WPF Button Image Source Pin
Kevin Marois5-Jul-12 11:01
professionalKevin Marois5-Jul-12 11:01 
GeneralRe: WPF Button Image Source Pin
Unnikrishnan_S_N8-Jul-12 19:50
Unnikrishnan_S_N8-Jul-12 19:50 
GeneralWPF Button Style Problem Pin
Kevin Marois2-Jul-12 11:31
professionalKevin Marois2-Jul-12 11:31 
QuestionStyle Error Pin
Kevin Marois29-Jun-12 7:51
professionalKevin Marois29-Jun-12 7:51 
AnswerRe: Style Error Pin
Gerry Schmitz29-Jun-12 11:06
mveGerry Schmitz29-Jun-12 11:06 
GeneralRe: Style Error Pin
Kevin Marois29-Jun-12 11:10
professionalKevin Marois29-Jun-12 11:10 
AnswerRe: Style Error Pin
Richard MacCutchan29-Jun-12 21:17
mveRichard MacCutchan29-Jun-12 21:17 
GeneralBest Way To Design This Pin
Kevin Marois29-Jun-12 7:31
professionalKevin Marois29-Jun-12 7:31 
GeneralRe: Best Way To Design This Pin
Abhinav S1-Jul-12 7:22
Abhinav S1-Jul-12 7:22 
GeneralRe: Best Way To Design This Pin
Unnikrishnan_S_N3-Jul-12 20:14
Unnikrishnan_S_N3-Jul-12 20:14 

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.