data grid question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike P

    #1

    data grid question

    I'm binding a data source to a data grid :

    objConnection.O pen();
    dgHistory.DataS ource =
    objCommand.Exec uteReader(Comma ndBehavior.Clos eConnection);
    dgHistory.DataB ind();

    The question I have is, if the data source is empty how do I test for
    this? I want to print to the screen using a label if there is no data
    to be displayed.


    Any help would be appreciated.


    Cheers,

    Mike



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Saravana

    #2
    Re: data grid question

    You can check like this itself.

    if isnothing(dghis tory.datasource ) then
    do something
    end if


    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "Mike P" <mrp@telcoelect ronics.co.uk> wrote in message
    news:ukTBUEdUDH A.1196@TK2MSFTN GP10.phx.gbl...[color=blue]
    > I'm binding a data source to a data grid :
    >
    > objConnection.O pen();
    > dgHistory.DataS ource =
    > objCommand.Exec uteReader(Comma ndBehavior.Clos eConnection);
    > dgHistory.DataB ind();
    >
    > The question I have is, if the data source is empty how do I test for
    > this? I want to print to the screen using a label if there is no data
    > to be displayed.
    >
    >
    > Any help would be appreciated.
    >
    >
    > Cheers,
    >
    > Mike
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it![/color]


    Comment

    Working...