Passing Datagrid source into a second Web Froms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • menayah
    New Member
    • Mar 2007
    • 32

    Passing Datagrid source into a second Web Froms

    Dear all,

    How to Passing Datagrid source into a second Web Froms in VB .Net?

    Thanks and Regards

    Monzer ( newbie in VB. Net )
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    What are you trying to achieve? Having the code in a class and just calling that may be easier.

    Comment

    • menayah
      New Member
      • Mar 2007
      • 32

      #3
      Originally posted by kenobewan
      What are you trying to achieve? Having the code in a class and just calling that may be easier.

      I'm trying to copy what is in the data grid content to another webform. my data grid is not fixed ( meaning: in run time the data grid may creat more than one column ) - Just like copying a table from excel sheet to another excel sheet -

      Thanks

      Comment

      • Shashi Sadasivan
        Recognized Expert Top Contributor
        • Aug 2007
        • 1435

        #4
        Well. I hope you know what you are doing there...
        but i would say that your main query is how to pass data between webforms...
        Is it so?
        There have been quite a few disucssions about this...
        Have you tried sessions?

        Comment

        • kunal pawar
          Contributor
          • Oct 2007
          • 297

          #5
          Originally posted by menayah
          Dear all,

          How to Passing Datagrid source into a second Web Froms in VB .Net?

          Thanks and Regards

          Monzer ( newbie in VB. Net )
          Set session variable of Dataset which is used for Datagrid Datasource

          And on Second form check whether tht session exist or not if yes then do you action

          Code

          session("dsSess ")=Dataset Object
          Datagrid object.DataSour ce = Dataset Object

          On Second Form
          if session("dsSess ") is nothing then
          Dim ds as DataSet = (DataSet)sessio n("dsSess")

          ' DO YOUR ACTION

          end if

          Comment

          • menayah
            New Member
            • Mar 2007
            • 32

            #6
            Originally posted by kunal pawar
            Set session variable of Dataset which is used for Datagrid Datasource

            And on Second form check whether tht session exist or not if yes then do you action

            Code

            session("dsSess ")=Dataset Object
            Datagrid object.DataSour ce = Dataset Object

            On Second Form
            if session("dsSess ") is nothing then
            Dim ds as DataSet = (DataSet)sessio n("dsSess")

            ' DO YOUR ACTION

            end if

            Thanks for the help ;)

            Comment

            Working...