CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2008
    Posts
    4

    Selection List Control

    I am looking for a control that can read in a file deliminated by what ever character I decide and putting this info into a grid,

    once I ahve the grid I would like to be able to select an item on the grid and delete it which in turn would delete the "record" from the text file.

    is there something I can use for this if not how would I go about making it?


    Thanks in Advance

    DAve

  2. #2
    Join Date
    Jul 2008
    Posts
    4

    Re: Selection List Control

    Thought I should say I am using DOT NET FW 2.0

  3. #3
    Join Date
    Aug 2005
    Location
    Seattle, Wa
    Posts
    179

    Re: Selection List Control

    Since you dont have a specific question, you can start by reading about working with files in c#:

    http://msdn.microsoft.com/en-us/libr...m.io.file.aspx

    and possibly the datagrid control:

    http://msdn.microsoft.com/en-us/libr....datagrid.aspx

  4. #4
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Selection List Control

    Quote Originally Posted by davidbell
    I am looking for a control that can read in a file deliminated by what ever character I decide and putting this info into a grid,...
    You may look for thisforever, there is no such control, if you need this behaviour, you need to design it yourself. Look for streams like FileStream and TextReader, TextWriter class and you will be able to create the code you need. Its all in the System.IO namespace
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  5. #5
    Join Date
    Jul 2008
    Posts
    4

    Re: Selection List Control

    sorry I was not very clear,
    I know all the file and text stuff it was just the grid part.

    I take it a data grid it the best way, meaning I wont need to create my own grid, just I thought a data grid was for databases and not for somthing as simple as a text file.

    Cheers,

    Dave

  6. #6
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Selection List Control

    Quote Originally Posted by davidbell
    sorry I was not very clear,
    I know all the file and text stuff it was just the grid part.

    I take it a data grid it the best way, meaning I wont need to create my own grid, just I thought a data grid was for databases and not for somthing as simple as a text file.

    Cheers,

    Dave
    Simple take a datagridview. It also works if you dont want to bind your data to a datasource directly.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  7. #7
    Join Date
    Jul 2008
    Posts
    4

    Re: Selection List Control

    but how do i populate it from an array?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured