Results 1 to 9 of 9

Thread: Need Help accessing Class Properties in a Windows form

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    4

    Question Need Help accessing Class Properties in a Windows form

    Background
    excuse my ignorance i'm getting into CSharp development, have knowledge of vb.


    Scenario

    I have a class module SFactory.cs where I retrieve data from the database into a script collection using sql adapter and filling it in dataset and returnign back as a script collection.



    I have 2 values returned from the stored procedure which are stored as Script.Property1 and Script.Property2 (same for each row from stored proc.)





    Situation
    I need to access these 2 values in 2 textboxes in my windows form



    My windows form code looks like this –



    ScriptCollection scripts = SFactory.RetrieveScripts(input1, input2, input3);

    this.mygrid.DataSource = scripts;


    need to add something like as shown below, but i do not see my properties if i can atleast access one row of scripts collection or of the grid and retrieve would help me.

    this.mytext1.text = Convert.ToString(scripts.Property1)

    this.mytext2.text = Convert.ToString(scripts.Property2)

    or

    this.mytext1.text = Convert.ToString(grid.row.1.column(8).text)
    this.mytext2.text = Convert.ToString(grid.row.1.column(9).text)

    any help is sincerely appreciated.


    Thanks.
    csharp developer
    Last edited by csharpdeveloper; Feb 5th, 2007 at 02:20 PM. Reason: Phrase better

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