Search:

Type: Posts; User: RK62

Page 1 of 2 1 2

Search: Search took 0.04 seconds.

  1. Re: Contains lookup for custom objects in list

    Perfect and simple!
  2. [RESOLVED] Contains lookup for custom objects in list

    How can I create a list (of my custom structure) to hold only unique items? This list should be created from another list.

    The original list may be like this and contain duplicate Countries:
    Item...
  3. Replies
    5
    Views
    6,152

    Re: Bind WPF DataGrid column to indexed property in

    I'm binding here a columns in the datadrig. UI cannot be changed here.
    I have a datagrid that has x number of columns (amount of colulmns determined at runtime) and the corresponding custom object...
  4. Replies
    5
    Views
    1,723

    Re: Sumproduct with LINQ

    Perfect! Thank you.
  5. Replies
    5
    Views
    6,152

    Re: Bind WPF DataGrid column to indexed property in

    It will work but it doesn't solve my problem here.
    I can of course make separate properties for each items, like
    Correlation0
    Correlation1
    Correlation2
    ...
    Correlation1000

    This is not...
  6. Replies
    5
    Views
    1,723

    Re: Sumproduct with LINQ

    This one seems to get it right.
    How would that be extended to divide the productSum with each category's total value (to get the weighted Percentage) ?

    So with the above we get:
    Category...
  7. Replies
    5
    Views
    1,723

    Sumproduct with LINQ

    Can I calculate sumproduct by applying LINQ to List collection?

    For example, if I have a list of my custom object with four items as:
    Value Percentage Category
    1000 6,0% A...
  8. Replies
    5
    Views
    6,152

    Bind WPF DataGrid column to indexed property in

    How to bind a DataGrid column to an indexed property in XAML?

    My property which I try to bind is:

    Private m_Correlations As New Dictionary(Of Integer, Double)
    Public Property...
  9. Replies
    12
    Views
    8,634

    Re: Query and set value in datatable

    I'll work based on your suggestions. Case is solved.
  10. Replies
    12
    Views
    8,634

    Re: Query and set value in datatable

    I'm making the column primary key since it is the only valid column to identify the items.
    The data in that column should not contain duplicates. In this case, the data was erroneus in the first...
  11. Re: Ranking of list items based on specific property

    By "ranking" I mean making the items in ascending order (determined by the "factor" property here).

    Sorting the list could be of course a possibility. I have this Class structure here because the...
  12. Replies
    12
    Views
    8,634

    Re: Query and set value in datatable

    Thanks for all your comments. All solutions worked finally.
    The problem was with the data in the primary key column where there was non-unique values in my sample.
    I didn't realize that there is no...
  13. Replies
    12
    Views
    8,634

    Re: Query and set value in datatable

    Tried the Select method but received IndexOutOfRangeException.
    Any idea why?
  14. Replies
    12
    Views
    8,634

    [RESOLVED] Query and set value in datatable

    I have an untyped dataset which is populated at runtime. I need to look for a Datarow in the datatable containing a specific value in one of its column ("ID") and when found should set the other...
  15. Ranking of list items based on specific property

    I need to determine the ranking of the List items specified by one specific property of the items.

    I have the following Class:


    Public Class LevelA

    Property items as New List(Of...
  16. Replies
    3
    Views
    874

    Re: Number format to display always the sign

    Ok. I made it conditional on the value, where positive values are displayed with the format


    percentage.ToString("#+0.00%")
  17. Replies
    3
    Views
    874

    Number format to display always the sign

    What is the correct numeric format to display a Double value as a percentage with a sign (positive or negative) ?

    I currently have:

    percentage.ToString("P2")

    but the "P2" leaves out the...
  18. Replies
    8
    Views
    1,082

    Re: Array as property

    Good point, I'll do that.
    Case solved.
  19. Replies
    8
    Views
    1,082

    Re: Array as property

    Yes, I agree the collection one is probably better.
    I need to be able to access the items in the collection by a (meaningful) key, so I modified your example to use a Dictionary:


    Private...
  20. Replies
    8
    Views
    1,082

    Re: Array as property

    I used this one and it worked well.

    Regarding the size of the array (which I have to define at runtime), is the following a correct way?


    ReDim m.Correlations(99)
  21. Replies
    8
    Views
    1,082

    [RESOLVED] Array as property

    I need to define a property in my class which is an array (of doubles).

    My original (bad) version is this:

    Public Class Market
    Property Correlations0 As Double
    Property...
  22. Replies
    1
    Views
    5,308

    WPF - image transition effect

    I'm trying to apply a transition effect (animation) to images. I have a grid control and an image control which is binded to the currently selected row on the grid.
    How can I apply a fade-in...
  23. How to pass parameters from other controls to eventhandler in WPF

    I have a contentcontrol that holds an image control. Contentcontrol content is binded to a currently selected row in datagrid which is binded to a dataset table.
    I have an eventhandler for clicking...
  24. Replies
    0
    Views
    3,297

    Storing a large number of images in WPF

    What is the optimal way in a WPF application to store a (relatively) large number of images to an application?

    I need to be able to persist the images between sessions (storing them to and loading...
  25. Replies
    0
    Views
    3,989

    Mapping CLR namespace to custom class problem

    I'm just starting with WPF so this is a very basic question.
    I try to map XAML namespace to my custom class which is in the same assembly as my window. I however receive the error: "Undefined CLR...
  26. Replies
    0
    Views
    481

    Filling typed dataset from Excel

    I have created a typed dataset (in WPF project) with only one datatable and I should fill it from the given Excel worksheet.

    How should I do it? I managed to fill an untyped dataset but I have...
  27. Thread: Learning WPF

    by RK62
    Replies
    0
    Views
    2,982

    Learning WPF

    I'm new to WPF. What I understand is that with WPF it is possible to create much more "nicer"-looking UI than with winforms.

    I have an existing winform project coded with VB.NET and I would like...
  28. Errors in proxy class created by DataSvcUtil.exe

    I try to access a WCF data service (that I created) from the desktop application through a proxy class that was created with DataSvcUtil.exe tool.
    I followed one book example where the WCF data...
  29. Replies
    7
    Views
    963

    VS 2010 Re: Public variables for all classes

    That sounds good.
    Most of the properties in my custom class are actually readonly.
    And definitely there are only one place within the application, where these properties should ever be set (one of...
  30. Replies
    7
    Views
    963

    VS 2010 Re: Public variables for all classes

    Thank you for the quick answer.
    Yes, I was missing the class name in front of the variable when I tried to call it, i.e. I tried only 'secuniverse' when the correct one was...
  31. Replies
    7
    Views
    963

    VS 2010 Public variables for all classes

    I have a MDI application and a very complicated class there which populates its properties from a dataset derived from an external database.
    Each form, including child forms have to be able to...
  32. Replies
    5
    Views
    7,391

    VS 2010 Re: Add new row to blank datatable

    Thanks for the replies.
    My follow-on question is how the values that the user inputs on the newly created row can be preserved. Now when they are entered and when moving to next cell the value on...
  33. Replies
    5
    Views
    7,391

    VS 2010 Re: Add new row to blank datatable

    The problem seems to be that initially the datarig is not bound to any datasource and the null reference occurred. Your suggestion works if I change the code as follows:


    Dim dt As New DataTable...
  34. Replies
    5
    Views
    7,391

    VS 2010 Add new row to blank datatable

    I try to view a datagrid with one empty row in it when the form loads. The datagrid has to be bound to a datatable all the time.
    I get a NullReferenceException with the folloing code:



    Dim dt...
  35. Re: Books/links for controlling MS Office through VB.net

    You're definitely right about that.
    ...if I just had the time for it. I probably buy the C# book as well but it may take some extra effort to apply the ideas to VB which due to time constraints is...
  36. Re: Books/links for controlling MS Office through VB.net

    Yes, there seems to be some good books on the topic but as you said, one focuses on C# (which I don't use). Probably have to buy several of them to make things to work.
  37. Re: Books/links for controlling MS Office through VB.net

    Thanks. That is a good place to start.
    But what I really am looking is a comprehensive overview of controlling these applications, like crossing .NET --> .COM boundaries, complete descriptions of...
  38. Books/links for controlling MS Office through VB.net

    Are there any books written with the focus on how to control MS Office (Excel, Word, Powerpoint) through VB.net applications?
    I only have checked the book Professional Excel Development that shows a...
  39. Replies
    9
    Views
    6,076

    VS 2010 Re: Importing a data range from Excel

    Thank you for your help. Works perfectly!
    It seems I have to learn SQL...
  40. Replies
    9
    Views
    6,076

    VS 2010 Re: Importing a data range from Excel

    I have now the data imported to DataTable according to the instructions.
    Now the next question is how can I get the DataTable filled so that there are no rows filled if the specific Excel rows have...
Results 1 to 40 of 42
Page 1 of 2 1 2



Click Here to Expand Forum to Full Width