Click here to Skip to main content
15,895,142 members
Home / Discussions / WPF
   

WPF

 
Questionbuilding error in wp7 Pin
heba abu ghaleih22 21-May-12 6:40
heba abu ghaleih22 21-May-12 6:40 
AnswerRe: building error in wp7 Pin
kiLLe_51221-May-12 23:11
kiLLe_51221-May-12 23:11 
GeneralRe: building error in wp7 Pin
heba abu ghaleih22 22-May-12 23:37
heba abu ghaleih22 22-May-12 23:37 
GeneralRe: building error in wp7 Pin
kiLLe_51222-May-12 23:40
kiLLe_51222-May-12 23:40 
GeneralRe: building error in wp7 Pin
heba abu ghaleih22 23-May-12 7:43
heba abu ghaleih22 23-May-12 7:43 
GeneralRe: building error in wp7 Pin
kiLLe_51223-May-12 8:35
kiLLe_51223-May-12 8:35 
Questionparser csv Pin
MemberDotNetting21-May-12 4:36
MemberDotNetting21-May-12 4:36 
AnswerRe: parser csv Pin
Pete O'Hanlon21-May-12 4:53
mvePete O'Hanlon21-May-12 4:53 
Why do you persist in trying to do this the wrong way? You could solve this simply with an ObservableCollection and a little bit of binding.
C#
public class CsvReaderViewModel
{
  public ObservableCollection<string> CsvLines { get; set; }

  public CsvReaderViewModel(string datasource)
  {
    List<string> csv = new CsvParser().ReadAndParseData(datasource, ';');
    CsvLines = new CsvLines(csv);
  }

}
Then, "in your code behind", all you need do is (make sure you have called InitializeComponent before you try this):
C#
CsvReaderViewModel vm = new CsvReaderViewModel("my source");
DataContext = vm;
Finally, you just need to set your grid ItemsSource to CsvLines.

BTW - you have posted and been told often enough, format your code blocks using the pre tags. It's not hard to do.

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos


CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: parser csv Pin
MemberDotNetting21-May-12 9:49
MemberDotNetting21-May-12 9:49 
QuestionItems not left aligning in a DockPanel Pin
maycockt21-May-12 1:17
maycockt21-May-12 1:17 
AnswerRe: Items not left aligning in a DockPanel Pin
Pete O'Hanlon21-May-12 2:56
mvePete O'Hanlon21-May-12 2:56 
GeneralRe: Items not left aligning in a DockPanel Pin
maycockt21-May-12 3:33
maycockt21-May-12 3:33 
GeneralRe: Items not left aligning in a DockPanel Pin
Pete O'Hanlon21-May-12 4:31
mvePete O'Hanlon21-May-12 4:31 
GeneralRe: Items not left aligning in a DockPanel Pin
maycockt21-May-12 5:17
maycockt21-May-12 5:17 
GeneralRe: Items not left aligning in a DockPanel Pin
Pete O'Hanlon21-May-12 5:46
mvePete O'Hanlon21-May-12 5:46 
GeneralRe: Items not left aligning in a DockPanel Pin
kishhr22-Jun-12 8:45
kishhr22-Jun-12 8:45 
Questionwpf screen scrolling Pin
Miwin Solutions19-May-12 8:04
Miwin Solutions19-May-12 8:04 
AnswerRe: wpf screen scrolling Pin
Madhan Mohan Reddy P20-May-12 23:22
professionalMadhan Mohan Reddy P20-May-12 23:22 
GeneralRe: wpf screen scrolling Pin
kishhr22-Jun-12 8:48
kishhr22-Jun-12 8:48 
QuestionUpgradation to CS6 Pin
Mark Walter Smith19-May-12 1:09
Mark Walter Smith19-May-12 1:09 
AnswerRe: Upgradation to CS6 Pin
Pete O'Hanlon19-May-12 2:13
mvePete O'Hanlon19-May-12 2:13 
QuestionTCP in wp7 Pin
heba abu ghaleih22 18-May-12 22:39
heba abu ghaleih22 18-May-12 22:39 
AnswerRe: TCP in wp7 Pin
Abhinav S20-May-12 7:00
Abhinav S20-May-12 7:00 
QuestionHelp with a radio button Pin
abollmeyer18-May-12 16:44
abollmeyer18-May-12 16:44 
QuestionReferencing Resources Pin
Kevin Marois17-May-12 11:23
professionalKevin Marois17-May-12 11:23 

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.