User Profile

Collapse

Profile Sidebar

Collapse
Infog
Infog
Last Activity: Nov 13 '10, 06:59 PM
Joined: Dec 18 '08
Location: Pittsburgh, PA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How to bind DataGridView to single column in strongly typed DataTable?

    I would like to implement Virtual mode on a DataGridView. The issue is that I'm not sure how to bind to ONLY the ID column in my DataTable without binding to the whole table.

    Adding combobox or textbox columns and handling the CellValueNeeded event is not a problem, I've done that elsewhere in my program.

    I would like to use something like
    Code:
    DataGridView.DataSource = MyDataset.Tables("TableName").Columns(&qu
    ...
    See more | Go to post

  • Infog
    started a topic Custom programming of a strongly typed datatable?
    in .NET

    Custom programming of a strongly typed datatable?

    Is it possible to edit a strongly typed dataset so that each table and column has additional properties?

    If I could record the ValueMember and DisplayMember for each table I'm using, I could write a general solution for my display layer that is much shorter than coding the "data --> display" part of the windows form every time I need to display a DataGridView, ComboBox, etc.
    See more | Go to post

  • Usage of colon (i.e. : ) for multiple statements?

    When using : in VB.NET, will the order of events ALWAYS follow the order I've coded it in?

    Such as:
    Code:
    Private Sub DoSomething(ByVal sender As Object, ByVal e As System.ComponentModel.ListChangedEventArgs) Handles dvCertTypes.ListChanged, dvJobTypes.ListChanged
            Dim _flw As FlowLayoutPanel
    
        If Equals(sender, dvCertTypes) Then _flw = flwCertTypes Else _
                If Equals(sender,
    ...
    See more | Go to post

  • Infog
    started a topic Textbox databindings

    Textbox databindings

    I am getting an error I don't understand - "Child list cannot be created".

    I have successfully bound a DataView column to a textbox, but am having problems binding a child table's column in the same way.

    DataView column > Relation > Parent table column

    What format should I be using to link from a dataview with IDs, to the parent tables that contain the actual information?

    ...
    See more | Go to post

  • Infog
    started a topic Interesting copy/paste dilema

    Interesting copy/paste dilema

    In testing cut/copy/paste for my program, I realized that all forms that are a child of my MDIparent1 form lose their cut/copy/paste abilities.

    Is there a common reason for this? Is this something that I need to implement?

    I show the child forms by using something along these lines:
    Code:
    Form1.mdiparent = MDIparent1
    Form1.show
    I've found that the same Form1 does have cut/copy/paste...
    See more | Go to post

  • You could try
    Code:
    Threading.ReaderWriterLockSlim
    instead. This allows you to specify if a piece of code can read, read then write, or just write.

    Any thread can read at the same time (no writing), only one thread can have the privilege of reading then upgrade into writing, and only one thread can write (no reading).

    There is a good explanation here: http://www.albahari.com/threading/

    Hope this helps.
    See more | Go to post

    Leave a comment:


  • Infog
    started a topic OLE DB connection pooling

    OLE DB connection pooling

    I would like to use a client-side connection pool with my VB.NET application. MS Access is used for the database. One user (a V.P.) is running the applicationvia Parallels on a Mac, which makes any delay much more noticeable.

    However, the interwebs are a little sparse on implementation information for OLE DB connection pooling.As far as I can tell, the key here is to enable connection pooling with ODBC 3.0, via SQLSetEnvAttr.
    ...
    See more | Go to post

  • Infog
    started a topic DataRow.SetField usage?

    DataRow.SetField usage?

    What is the difference between these two? If I use one or the other when adding or updating a strongly typed DataTable's DataRow, will there be any difference in the result?

    I can't find an explanation in any MSDN page.

    Code:
     _row.SetField("FieldName", "A value")
     _row("FieldName") = "A value"
    See more | Go to post

  • Infog
    replied to ThreeState check box
    I hadn't really thought about using text... it would look nicer if it were check boxes though.

    I've been learning a lot of useful things about DataGridViews along the way, so I think I'll keep working towards my goal of using a three-state check box to show the summary of my data.

    At least now I know one method that will NOT work. :)
    See more | Go to post

    Leave a comment:


  • Infog
    replied to ThreeState check box
    There are three states that I would like to show - The employee doesn't have a certain certification (False), the employee does have a certain certification (True), or the employee has a certification that has been flagged for review (Intermediate).

    I was hoping that a data table could be used to store the value of an intermediate check state. That would allow me to not manually add each check box column in the DataGridView. If the...
    See more | Go to post

    Leave a comment:


  • Infog
    started a topic ThreeState check box

    ThreeState check box

    I have a DataGridView that has columns with a value type of boolean.

    To load the DataGridView, I load values into a DataTable then set
    Code:
    theDataGridView.DataSource = theTable
    What value can I use in the table to load an intermediate check state?
    Would it be better to use a check box control with a value than to use a column set to the boolean data type?

    The check box is for display only, and will...
    See more | Go to post

  • Thank you! Yes, I'm using VB.NET.

    Aha! so THAT is what shared means. :) Making my datasets part of a module or shared class should do the trick then.
    See more | Go to post

    Leave a comment:


  • Stay alive, data! Where to put datasets for global access?

    I think I've somehow missed a basic design principle for storing data from databases.

    What is the "correct" way to store data that your whole application needs access to, regardless of which forms are open or which class is reading the data? I would like to store datasets apart from forms, but don't know how to create them in their own space so that they can be referenced in code at design time.

    When I started...
    See more | Go to post

  • Infog
    replied to Get column names via Me.RowChanging's "e"?
    in .NET
    Thank you! I hadn't even thought of that.

    At the moment, the dataset's column names are the same as the database column names. I have an ArrayList that stores a coding name and a database-use name for each table and an ArrayList that stores the names and connection strings for all the databases I connect to, so adding an ArrayList that stores coding-use/database-use column names for each database wouldn't be a problem.

    ...
    See more | Go to post
    Last edited by Infog; Jun 25 '09, 06:37 PM. Reason: type on the dataset name

    Leave a comment:


  • Infog
    started a topic Get column names via Me.RowChanging's "e"?
    in .NET

    Get column names via Me.RowChanging's "e"?

    I have written a chunk of code that automatically writes a SQL string, using parameters. The parameters themselves are easy, but getting the column names has been a problem.

    Is possible to get column names from the "e" of the Me.RowChanging event? Otherwise, writing
    Code:
    "Insert Into TableName (each, column, name) Values (@0, @1, @2)"
    is going to be a bit more difficult.

    The other pieces of information...
    See more | Go to post

  • Is there a way to do this without having as much code? ie, a "proper" way of doing this?

    No guarantees if this will do what you want it to. :)

    Code:
    ''' <summary>Allows tieing events to a worker without additional code</summary>
        Public Class BackgroundWorkerCreation
            Private _worker As BackgroundWorker
    
            ''' <summary>Initialize the worker and tie on
    ...
    See more | Go to post

    Leave a comment:


  • Infog
    started a topic "Outsourcing" Background worker creation

    "Outsourcing" Background worker creation

    I am trying to code a simple background workers class without needing to use the backgroundworke r object on a form. This would allow me to use a background worker in any class without writing much additional code. Is it possible to pass in the name of a sub at runtime instead of hard-coding it? To do this I would replace onDoWork and onProgressChang ed below and use (Byval onWorkSub as SomeKindOfObjec t?, Byval onProgressChang edSub as SomeKindOfObjec t?)...
    See more | Go to post

  • Infog
    replied to valueMember vs DisplayMember Pin
    Oh wait, didn't read your problem entirely. Edited.
    See more | Go to post

    Leave a comment:


  • Infog
    started a topic Intellisense XML Comment Tooltip

    Intellisense XML Comment Tooltip

    I have read that it is possible, but how do I use them in VS2008? I would like to start commenting class's commands and properties, but I can't find how to.

    http://social.msdn.microsoft.com/for...4-bde51a6ef62f...
    See more | Go to post

  • Infog
    replied to Change Startup minimum time
    (woops... how do I delete a post....)
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...