Q: DataView or DataTable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Geoff Jones

    #1

    Q: DataView or DataTable

    Hi

    Can anybody tell me how to determine, from within an overrided DataGrid,
    whether the datasource of the datagrid is a DataView or DataTable?

    Thanks in advance

    Geoff


  • Phil G.

    #2
    Re: DataView or DataTable

    Geoff,

    Have you considered something like:-

    Dim oRet as new object

    oRet = dg.datasource
    if typeof oRet is datatable then

    else
    if typeof oRet is dataview then

    end if
    end if

    Haven't tried this, but HTH. Phil

    "Geoff Jones" <nodamnspam@ema il.com> wrote in message
    news:43240106$0 $22951$cc9e4d1f @news.dial.pipe x.com...[color=blue]
    > Hi
    >
    > Can anybody tell me how to determine, from within an overrided DataGrid,
    > whether the datasource of the datagrid is a DataView or DataTable?
    >
    > Thanks in advance
    >
    > Geoff
    >
    >[/color]


    Comment

    • Phil G.

      #3
      Re: DataView or DataTable

      Geoff,

      Have you considered something like:-

      Dim oRet as new object

      oRet = dg.datasource
      if typeof oRet is datatable then

      else
      if typeof oRet is dataview then

      end if
      end if

      Haven't tried this, but HTH. Phil

      "Geoff Jones" <nodamnspam@ema il.com> wrote in message
      news:43240106$0 $22951$cc9e4d1f @news.dial.pipe x.com...[color=blue]
      > Hi
      >
      > Can anybody tell me how to determine, from within an overrided DataGrid,
      > whether the datasource of the datagrid is a DataView or DataTable?
      >
      > Thanks in advance
      >
      > Geoff
      >
      >[/color]


      Comment

      • Geoff

        #4
        Re: DataView or DataTable

        Many thanks Phil

        "Phil G." <Phil@nospam.co m> wrote in message
        news:dg1390$iek $1@nwrdmz02.dmz .ncs.ea.ibs-infra.bt.com...[color=blue]
        > Geoff,
        >
        > Have you considered something like:-
        >
        > Dim oRet as new object
        >
        > oRet = dg.datasource
        > if typeof oRet is datatable then
        >
        > else
        > if typeof oRet is dataview then
        >
        > end if
        > end if
        >
        > Haven't tried this, but HTH. Phil
        >
        > "Geoff Jones" <nodamnspam@ema il.com> wrote in message
        > news:43240106$0 $22951$cc9e4d1f @news.dial.pipe x.com...[color=green]
        >> Hi
        >>
        >> Can anybody tell me how to determine, from within an overrided DataGrid,
        >> whether the datasource of the datagrid is a DataView or DataTable?
        >>
        >> Thanks in advance
        >>
        >> Geoff
        >>
        >>[/color]
        >
        >[/color]


        Comment

        • Geoff

          #5
          Re: DataView or DataTable

          Many thanks Phil

          "Phil G." <Phil@nospam.co m> wrote in message
          news:dg1390$iek $1@nwrdmz02.dmz .ncs.ea.ibs-infra.bt.com...[color=blue]
          > Geoff,
          >
          > Have you considered something like:-
          >
          > Dim oRet as new object
          >
          > oRet = dg.datasource
          > if typeof oRet is datatable then
          >
          > else
          > if typeof oRet is dataview then
          >
          > end if
          > end if
          >
          > Haven't tried this, but HTH. Phil
          >
          > "Geoff Jones" <nodamnspam@ema il.com> wrote in message
          > news:43240106$0 $22951$cc9e4d1f @news.dial.pipe x.com...[color=green]
          >> Hi
          >>
          >> Can anybody tell me how to determine, from within an overrided DataGrid,
          >> whether the datasource of the datagrid is a DataView or DataTable?
          >>
          >> Thanks in advance
          >>
          >> Geoff
          >>
          >>[/color]
          >
          >[/color]


          Comment

          • Cor Ligthert [MVP]

            #6
            Re: DataView or DataTable

            >[color=blue]
            > Can anybody tell me how to determine, from within an overrided DataGrid,
            > whether the datasource of the datagrid is a DataView or DataTable?
            >[/color]
            if typeof datagrid1.datas ource Is DataTable then ...........
            etc

            I hope this helps,

            Cor


            Comment

            • Cor Ligthert [MVP]

              #7
              Re: DataView or DataTable

              >[color=blue]
              > Can anybody tell me how to determine, from within an overrided DataGrid,
              > whether the datasource of the datagrid is a DataView or DataTable?
              >[/color]
              if typeof datagrid1.datas ource Is DataTable then ...........
              etc

              I hope this helps,

              Cor


              Comment

              Working...