Click here to Skip to main content
15,888,162 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Passing two parameters in Command biding in WPF and MVVM Pin
indian14316-May-16 22:08
indian14316-May-16 22:08 
GeneralRe: Passing two parameters in Command biding in WPF and MVVM Pin
Pete O'Hanlon16-May-16 22:11
mvePete O'Hanlon16-May-16 22:11 
GeneralRe: Passing two parameters in Command biding in WPF and MVVM Pin
Meshack Musundi23-May-16 3:12
professionalMeshack Musundi23-May-16 3:12 
QuestionAdd Dictionary in ObsavableCollection Pin
indian14314-May-16 9:20
indian14314-May-16 9:20 
AnswerRe: Add Dictionary in ObsavableCollection Pin
Pete O'Hanlon14-May-16 22:07
mvePete O'Hanlon14-May-16 22:07 
AnswerRe: Add Dictionary in ObsavableCollection Pin
Richard Deeming16-May-16 1:18
mveRichard Deeming16-May-16 1:18 
GeneralRe: Add Dictionary in ObsavableCollection Pin
indian14316-May-16 6:35
indian14316-May-16 6:35 
QuestionDatagrid is not updating the values after changing the collection in the ViewModel in WPF Pin
indian14313-May-16 11:02
indian14313-May-16 11:02 
Hi All,

I have a Datagrid in a Window container as below
<DataGrid HorizontalAlignment="Left" Margin="103,188,0,0" VerticalAlignment="Top" Height="98" Width="313"
                 ItemsSource="{Binding Path=DictionaryName, Mode=TwoWay}" ></DataGrid>

And Collection in the ViewModel as below
public Dictionary<short, String> DictionaryName
       {
           get { return _testData.DictionaryName; }
           set { _testData.DictionaryName = value; NotifyPropertyChanged("DictionaryName"); }
       }
public void AddAnItem()
       {
           int t = DictionaryName.Max(x => x.Key) + 1;

           DictionaryName.Add(short.Parse(t.ToString()), t.ToString() + "Number");
       }

When Button click calls the Command then it is adding an item into the Dictionary but that is not being added into the Datagrid eventhough I kept the Mode as TwoWay?

Can anybody please help me any sort of help may be a code snippet, a link or even a suggestion also helps me?

Please its very urgent and I am new to the WPF, thanks in advance.
Thanks,

Abdul Aleem

"There is already enough hatred in the world lets spread love, compassion and affection."

AnswerRe: Datagrid is not updating the values after changing the collection in the ViewModel in WPF Pin
Richard Deeming13-May-16 11:16
mveRichard Deeming13-May-16 11:16 
GeneralRe: Datagrid is not updating the values after changing the collection in the ViewModel in WPF Pin
indian14313-May-16 11:44
indian14313-May-16 11:44 
GeneralRe: Datagrid is not updating the values after changing the collection in the ViewModel in WPF Pin
indian14313-May-16 21:09
indian14313-May-16 21:09 
GeneralRe: Datagrid is not updating the values after changing the collection in the ViewModel in WPF Pin
Pete O'Hanlon14-May-16 3:39
mvePete O'Hanlon14-May-16 3:39 
QuestionConvert This XAML To C# Pin
Kevin Marois12-May-16 13:45
professionalKevin Marois12-May-16 13:45 
QuestionAdd a check box and delete multiple rows from DataGrid in WPF Pin
indian14312-May-16 8:46
indian14312-May-16 8:46 
AnswerRe: Add a check box and delete multiple rows from DataGrid in WPF Pin
Mycroft Holmes12-May-16 13:06
professionalMycroft Holmes12-May-16 13:06 
GeneralRe: Add a check box and delete multiple rows from DataGrid in WPF Pin
indian14312-May-16 14:12
indian14312-May-16 14:12 
QuestionUse Different Paths In Control Template Pin
Kevin Marois11-May-16 13:14
professionalKevin Marois11-May-16 13:14 
AnswerRe: Use Different Paths In Control Template Pin
Gerry Schmitz11-May-16 16:06
mveGerry Schmitz11-May-16 16:06 
QuestionHandle Title Bar Icon Click Pin
Kevin Marois11-May-16 5:56
professionalKevin Marois11-May-16 5:56 
AnswerRe: Handle Title Bar Icon Click Pin
CHill6011-May-16 22:42
mveCHill6011-May-16 22:42 
AnswerRe: Handle Title Bar Icon Click Pin
Pete O'Hanlon11-May-16 23:50
mvePete O'Hanlon11-May-16 23:50 
Questionwpf Pin
Member 113037949-May-16 7:39
Member 113037949-May-16 7:39 
AnswerRe: wpf Pin
Pete O'Hanlon9-May-16 8:34
mvePete O'Hanlon9-May-16 8:34 
QuestionRe: wpf Pin
ZurdoDev11-May-16 9:20
professionalZurdoDev11-May-16 9:20 
QuestionWPF Dependency Property Of Type UserControl Pin
Kevin Marois3-May-16 5:32
professionalKevin Marois3-May-16 5:32 

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.