Creating Dynamic Forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anuparvathy
    New Member
    • Feb 2007
    • 25

    Creating Dynamic Forms

    i want to make an application in C# .net. in which i want to make a windows application form which is dynamic in nature .

    In that i want the form to make labels which will take that caption of the columns from the database.and the form should also contain textboxes which will have the values of the field from the table in the database.


    All this has to be dynamic on the click of a button.
    so plz help me out.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    How far have you got in your project so far? Is the application that creates the windows application windows also?

    Comment

    • anuparvathy
      New Member
      • Feb 2007
      • 25

      #3
      Originally posted by kenobewan
      How far have you got in your project so far? Is the application that creates the windows application windows also?
      i have made the connections n collected the table from the database in the dataset. n have made a datatable in the dataset from wherein the column names can b collected . but dont know how 2 get the count of those columns

      if u can help me further.Thankin g you in advance.

      Comment

      • keyu
        New Member
        • Feb 2007
        • 9

        #4
        Originally posted by anuparvathy
        i have made the connections n collected the table from the database in the dataset. n have made a datatable in the dataset from wherein the column names can b collected . but dont know how 2 get the count of those columns

        if u can help me further.Thankin g you in advance.

        for geeting count of columns u can get it be

        ds.Tables[0].Columns.Count

        where ds is ur dataset object

        Comment

        • anuparvathy
          New Member
          • Feb 2007
          • 25

          #5
          Originally posted by keyu
          for geeting count of columns u can get it be

          ds.Tables[0].Columns.Count

          where ds is ur dataset object
          I am using a datatable instead of a dataset.the name of my table is 'dt'. so can you give me the line of code for that?

          Comment

          • anuparvathy
            New Member
            • Feb 2007
            • 25

            #6
            Originally posted by anuparvathy
            I am using a datatable instead of a dataset.the name of my table is 'dt'. so can you give me the line of code for that?

            I have got the line of code.it is:
            i = dt.Columns.Coun t;
            and you need to give a variable to bring that value.

            Comment

            Working...