Click here to Skip to main content
15,905,867 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Hi there :) Please help me Pin
Paul Conrad5-Nov-08 6:27
professionalPaul Conrad5-Nov-08 6:27 
GeneralRe: Hi there :) Please help me Pin
viashivan6-Nov-08 0:36
viashivan6-Nov-08 0:36 
GeneralRe: Hi there :) Please help me Pin
Paul Conrad6-Nov-08 5:01
professionalPaul Conrad6-Nov-08 5:01 
GeneralRe: Hi there :) Please help me Pin
Pete O'Hanlon6-Nov-08 1:48
mvePete O'Hanlon6-Nov-08 1:48 
GeneralRe: Hi there :) Please help me Pin
viashivan6-Nov-08 3:18
viashivan6-Nov-08 3:18 
GeneralRe: Hi there :) Please help me Pin
Pete O'Hanlon6-Nov-08 4:11
mvePete O'Hanlon6-Nov-08 4:11 
AnswerRe: Hi there :) Please help me Pin
viashivan12-Nov-08 0:49
viashivan12-Nov-08 0:49 
QuestionAm I overcomplicating matters here? Pin
GDavy4-Nov-08 23:26
GDavy4-Nov-08 23:26 
This is related to a post I made yesterday, but after researching I think I found where my problem lies, and nevertheless am stuck again. The problem I have is the following. I read from a file data, this data consists of rows of 'x' columns (x changes from file to file).
I want to display these rows in a list in my WPF application. Seems simple enough, might be simple, but as I am a beginner in WPF I might have chosen the most difficult possible way to get there...
Since the row-makeup is completely file specific there's not much in the xaml file, just the declaration of the table-header:

<StackPanel x:Name="MyGridViewList" Orientation="Vertical">
  <GridViewHeaderRowPresenter x:Name="grdViewHeader" ColumnHeaderContainerStyle="{StaticResource MyHeaderStyle}"/>
</StackPanel>


In the code behind I read the column specific data and put it in the header.

GridViewColumnCollection colCollection = new GridViewColumnCollection();
for(int i=0;i<mydatacollection.columns.count;>            {
    GridViewColumn viewCol = new GridViewColumn();
    viewCol.Header = MyDataCollection.Columns[i].Name;
    viewCol.Width = 100;

    // I think here I have to add a line like:
    // viewCol.DisplayMemberBinding = bind to position i of the objectarray;

    colCollection.Add(viewCol);
}
grdViewHeader.Columns = colCollection;


The column-header is displayed correctly. Afterwards I create
GridViewRowPresenter objects for each row, and to the Content property I assign an array of objects. The object at position 0 should be data for 1st column, object at pos 1 for 2nd etc... Right now the number of rows that's displayed is correct but the data in each cell is displayed as: "Object[] Array"

So now I found out that the GridViewRowPresenter does not know how to 'bind' each value to the right column. So in the commented out code above I need to mention somehow to bind to a specific position in the array.
Can anyone tell me how to do this? Or am I doing it completely wrong here?

Thanks for any help,
Davy
AnswerRe: Am I overcomplicating matters here? Pin
ColinM1235-Nov-08 12:04
ColinM1235-Nov-08 12:04 
QuestionWierd Border drawing on ElementHost when it is dropped on a Windows Form. Pin
Aaron Hickman4-Nov-08 17:54
Aaron Hickman4-Nov-08 17:54 
AnswerRe: Wierd Border drawing on ElementHost when it is dropped on a Windows Form. Pin
Aaron Hickman4-Nov-08 17:58
Aaron Hickman4-Nov-08 17:58 
QuestionI need more ideas to customize the look of the color palette control with more properties [modified] Pin
ArunManick4-Nov-08 17:39
ArunManick4-Nov-08 17:39 
QuestionAdd content to a GridViewRowPresenter Pin
GDavy4-Nov-08 4:22
GDavy4-Nov-08 4:22 
QuestionBeginners question on deployment/installation Pin
esjq3-Nov-08 9:47
esjq3-Nov-08 9:47 
AnswerRe: Beginners question on deployment/installation Pin
Jammer4-Nov-08 0:31
Jammer4-Nov-08 0:31 
GeneralRe: Beginners question on deployment/installation Pin
esjq4-Nov-08 9:47
esjq4-Nov-08 9:47 
QuestionsetingOneWindowInsideAnother WPF Pin
bilal haider2-Nov-08 17:44
bilal haider2-Nov-08 17:44 
AnswerRe: setingOneWindowInsideAnother WPF Pin
Pete O'Hanlon2-Nov-08 22:26
mvePete O'Hanlon2-Nov-08 22:26 
GeneralRe: setingOneWindowInsideAnother WPF Pin
bilal haider3-Nov-08 1:30
bilal haider3-Nov-08 1:30 
GeneralRe: setingOneWindowInsideAnother WPF Pin
Pete O'Hanlon3-Nov-08 1:39
mvePete O'Hanlon3-Nov-08 1:39 
GeneralRe: setingOneWindowInsideAnother WPF Pin
bilal haider3-Nov-08 2:28
bilal haider3-Nov-08 2:28 
GeneralRe: setingOneWindowInsideAnother WPF Pin
Pete O'Hanlon3-Nov-08 2:37
mvePete O'Hanlon3-Nov-08 2:37 
QuestionTest Project Issue ? Pin
Mohammad Dayyan2-Nov-08 17:00
Mohammad Dayyan2-Nov-08 17:00 
AnswerRe: Test Project Issue ? Pin
Pete O'Hanlon3-Nov-08 8:25
mvePete O'Hanlon3-Nov-08 8:25 
QuestionHow can I create this effect in WPF ? Pin
Mohammad Dayyan2-Nov-08 16:48
Mohammad Dayyan2-Nov-08 16:48 

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.