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

WPF

 
AnswerRe: Silverlight Pin
Mark Salsbery17-Mar-09 10:13
Mark Salsbery17-Mar-09 10:13 
GeneralSilverlight Pin
Ch.Gayatri Subudhi17-Mar-09 18:10
Ch.Gayatri Subudhi17-Mar-09 18:10 
GeneralRe: Silverlight Pin
Mark Salsbery18-Mar-09 5:50
Mark Salsbery18-Mar-09 5:50 
QuestionWPF Control Name overwrite on initialization Pin
NoviceUser0916-Mar-09 22:19
NoviceUser0916-Mar-09 22:19 
Questioncreate chat room in WPF application Pin
psdeepu16-Mar-09 5:51
psdeepu16-Mar-09 5:51 
QuestionExport WPF ListView data to excel Pin
Pankaj Chamria16-Mar-09 3:52
Pankaj Chamria16-Mar-09 3:52 
AnswerRe: Export WPF ListView data to excel Pin
Eslam Afifi16-Mar-09 8:02
Eslam Afifi16-Mar-09 8:02 
GeneralRe: Export WPF ListView data to excel Pin
zameb30-Aug-10 23:00
zameb30-Aug-10 23:00 
The ListView in WPF is so different to the Forms one. Unsure | :~

Maybe the problem is how to iterate inside the ListView items.
Here it is:

GridView grid = source.View as GridView;
if (grid == null)
{
    //Sorry, only for GridView views
    return;
}
foreach (GridViewColumn col in grid.Columns)
{
    //value of header is col.Header
}
foreach (Object item in source.Items)
{
    PropertyInfo[] dataFields = item.GetType().GetProperties();
    int i = 0;
    foreach (GridViewColumn col in grid.Columns)
    {
        try
        {
            //Get the name of field displayed on grid
            string strPath = ((Binding)col.DisplayMemberBinding).Path.Path;
            //Get the field value
            object propValue = GetValue(item, source.Items, strPath);
            //Value of cell is propValue
        }
        catch (Exception)
        {
        }
    }
}


I think it will be easier to export (to excel, pdf or anything) from here.
Questioncreate a button dynamically Pin
anishkannan16-Mar-09 1:59
anishkannan16-Mar-09 1:59 
QuestionRe: create a button dynamically Pin
Mark Salsbery16-Mar-09 5:42
Mark Salsbery16-Mar-09 5:42 
AnswerRe: create a button dynamically Pin
anishkannan16-Mar-09 6:54
anishkannan16-Mar-09 6:54 
AnswerRe: create a button dynamically Pin
Eslam Afifi16-Mar-09 7:49
Eslam Afifi16-Mar-09 7:49 
GeneralRe: create a button dynamically Pin
Eslam Afifi16-Mar-09 12:25
Eslam Afifi16-Mar-09 12:25 
GeneralRe: create a button dynamically Pin
anishkannan16-Mar-09 18:57
anishkannan16-Mar-09 18:57 
AnswerRe: create a button dynamically Pin
Eslam Afifi16-Mar-09 23:07
Eslam Afifi16-Mar-09 23:07 
QuestionNew article to help you answer your questions on WPF Pin
TechiGIRL15-Mar-09 21:20
TechiGIRL15-Mar-09 21:20 
AnswerRe: New article to help you answer your questions on WPF Pin
TechiGIRL25-Mar-09 22:33
TechiGIRL25-Mar-09 22:33 
QuestionWPf trreview Insertion with binding Pin
thangavel198715-Mar-09 21:03
thangavel198715-Mar-09 21:03 
AnswerRe: WPf trreview Insertion with binding Pin
ABitSmart15-Mar-09 21:42
ABitSmart15-Mar-09 21:42 
AnswerRe: WPf trreview Insertion with binding Pin
Eslam Afifi16-Mar-09 1:51
Eslam Afifi16-Mar-09 1:51 
QuestionPopup window in silverlight Pin
sumit703415-Mar-09 19:31
sumit703415-Mar-09 19:31 
AnswerRe: Popup window in silverlight Pin
Pete O'Hanlon15-Mar-09 23:02
mvePete O'Hanlon15-Mar-09 23:02 
GeneralRe: Popup window in silverlight Pin
sumit703415-Mar-09 23:45
sumit703415-Mar-09 23:45 
GeneralRe: Popup window in silverlight Pin
Mark Salsbery16-Mar-09 6:25
Mark Salsbery16-Mar-09 6:25 
AnswerRe: Popup window in silverlight Pin
Braulio Dez1-Apr-09 6:02
Braulio Dez1-Apr-09 6:02 

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.