|
Tht's correct. And, each row's XML will be different.
Everything makes sense in someone's mind
|
|
|
|
|
I was typing out a response when you answered, so I'll just throw that out and respond to this since you answered most of my questions.
You could use xsd to generate a schema and then use xsd again to generate wrapper class(es) from the schema, but the end result here will be that you'll end up with a typed DataTable, etc. which wouldn't really be 2-way bindable directly. You'd also end up with a ~50k to ~100k C# wrapper class. EDIT: Not sure about part of my answer here, maybe DataGrid has a method to bind to a DataTable? EDIT #2: Even if DataGrid does have a method to bind to a DataTable, getting the XML out of a DataTable in the precise way you want it is often a practice in futility.
So, your best bet would be to use the C# XML parser to parse the file yourself into an ObservableCollection<> or whatever and then write it back out to the DB after you are done editing.
|
|
|
|
|
Ya, that was my thinking. I was hoping for a canned solution instead of coding it all myself. But hey,. I'v got nothing better to do today
Thanks
Everything makes sense in someone's mind
|
|
|
|
|
I have a ListView in my main window which displays data from a bound List<T> . This List is re-sorted according to different criteria according to user actions.
I want to apply conditional formatting to this ListView for both Font and Background , based on the contents of two different fields of the <T> objects.
At least the values of the field responsible for the Font formatting can change during run time.
I don't have any idea how to code this...
Hopefully
---Dirk Bock
|
|
|
|
|
|
Uups...
[Moving this thread]
Dirk Bock
|
|
|
|
|
I need to Open Excel Work book in my Wpf Form is it Possible and if yes then How can I Do it?
|
|
|
|
|
It isn't really possible to embed a worksheet in your form, but you can use a DataGrid to view and edit the values. To use excel in your app, google excel interop or ADO.Net and you should get lots of results. Good Luck
|
|
|
|
|
Hi all,
I have made an application in which i need to save my data in excel sheet, for doing this i have used
using Microsoft.Office.Core;
using Excel = Microsoft.Office.Interop.Excel;
as namespace and its functions..
My problem is my exe run's fine on windows vista and higher version but it is not running on windows xp. When i run it on xp it gives exception.
I am not getting what i am missing in my application.
Thanks in advance
|
|
|
|
|
Do you have Excel installed on the XP machine? Is it the right version, or higher?
If not, it won't work...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
|
Did you install the correct .NET framework? Did you install the correct Interop DLL's[^]?
I are Troll
|
|
|
|
|
|
satendrasitu wrote: how i install interop
As described in the link that I posted, that's the reason why it's included
Do read the note at the bottom;
MSDN states; PIAs are version specific, so you should use the same version of the PIAs as the application version. For example, if you want to migrate your Microsoft Office XP managed code solution to Microsoft Office 2003, you should recompile the Office XP managed code solution with Office 2003 PIAs.
You should also have two different setup packages—one for Office XP and another for Office 2003—if you intend for the same solution to work in both Office XP and Office 2003. Deployment of PIAs for Office XP is very different from that for Office 2003. For further information about these differences, see the ReadMe file included in the Office XP PIAs download[^].
I are Troll
|
|
|
|
|
thanks for this, but how I include this with my exe , because it is not run in client mechine
modified on Friday, April 1, 2011 5:46 AM
|
|
|
|
|
satendrasitu wrote: thanks for this, but how I include this with my exe
Using a set-up application that installs all required components. Or, you'll have to copy them manually. You can't link them into the executable itself.
..wel, you could add it as an embeddable resource, unpack it and load it on demand, but that would probably cost more than the trouble would be worth.
I are Troll
|
|
|
|
|
Change your username as soon as possible, otherwise you'll wind up with endless adverts for hair-loss remedies, herbal viagra and pics of nudie ladies and/or gents in your inbox. Unless you want that of course .
|
|
|
|
|
Actually this type of problem occur due to .net framework missing on the Client System.
to run .net application it required its perquisites. It runs on higher version of XP because .net framework resides implicitly which is not in XP.
so be confirm about it or give us more details what exception is generating while running your application on XP.
|
|
|
|
|
which exception it is throwing?
|
|
|
|
|
Is it possible to use LINQ on an un-typed IList collection? Specifically I'm interested in ListView.SelectedItems. I want to remove every item except item "i".
Not sure how that would work since if I don't know the type, how would I run the query? Although, I'd really only be comparing object o.
|
|
|
|
|
It is not untyped, ListView.SelectedItems returns a collection of ListViewItem(s).
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote:
It is not untyped, ListView.SelectedItems returns a collection of
ListViewItem(s).
----
You are mistaken sir . ListView.SelectedItems most certainly does NOT return ListViewItems (unless you are binding to stock ListViewItems). It returns whatever type you are binding with.
If my ItemsSource is a ObservableCollection<Widget>, SelectedItems returns a collection of Widgets, not ListViewItems.
The definition of ListView.SelectedItems is:
[BindableAttribute(true)]
public IList SelectedItems { get; }
As you can see, un-typed .
Also, when I look in the debugger, SelectedItems is actually a:
- SelectedItems Count = 1 System.Collections.IList {System.Windows.Controls.SelectedItemCollection}
System.Windows.Controls.SelectedItemCollection is a private class.
Naturally, this fails:
IList<ListViewItem> selectedItems = SelectedItems as IList<ListViewItem>;
because it ain't that type . Unless you meant something else.
But regardless, as I look in the debugger, <whatever you want to say SelectedItems returned>[0] is NOT a ListViewItem, its a Widget.
My issue is that I don't know what type it is, so I need to do a RemoveAllExceptThis as an object.
|
|
|
|
|
I stand corrected. I was thinking of something else
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I don't think so, not directly at least, the standard LINQ operators work on IEnumerable<T> , whereas ListView.SelectedListViewItemCollection only implements IEnumerable . Could be wrong though!
|
|
|
|
|
Yeah, thats what it seems like... Oh well. Thanks anyways.
|
|
|
|