problem with a column in datagridview control

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

    #1

    problem with a column in datagridview control

    Hello,

    I am reading data from a sql server table that is under replication. This
    table has the replicatin GUID column that is generated with replicatin. I am
    reading the data from a dataAdapter/Dataset using a dataview which is the
    data source for a datagridview control. When I scroll horizontally in the
    datagridview control and reach this GUID column (which is not at the end of
    the table) it raises the datagridview dataError event. If I continue to
    click on the scrollbar button I keep getting the dataerror until I am past
    the GUID column. Then I can scroll to the end of the datagridview control
    backwards OK. But when I scroll forward again and reach the GUID column, I
    raise the error again.

    Is there a way in the dataview object that I can limit what columns are
    visible from my table. I realize I could do this in the datasource select
    statement, but that is a lot of columns. I am doing Select * from tbl...
    How can I make this GUID column not show up in the datagridview control? Or
    is there a way to deal with GUID columns in a dataview/datagridview control?

    Thanks,
    Rich
  • Rich

    #2
    RE: problem with a column in datagridview control

    I figured this one out. The trick is in the datagridview control not the
    dataview object:

    datagridview("G UIDcol").Visibl ie = False

    Now this column does not show up, and my problem has gone away.

    "Rich" wrote:
    [color=blue]
    > Hello,
    >
    > I am reading data from a sql server table that is under replication. This
    > table has the replicatin GUID column that is generated with replicatin. I am
    > reading the data from a dataAdapter/Dataset using a dataview which is the
    > data source for a datagridview control. When I scroll horizontally in the
    > datagridview control and reach this GUID column (which is not at the end of
    > the table) it raises the datagridview dataError event. If I continue to
    > click on the scrollbar button I keep getting the dataerror until I am past
    > the GUID column. Then I can scroll to the end of the datagridview control
    > backwards OK. But when I scroll forward again and reach the GUID column, I
    > raise the error again.
    >
    > Is there a way in the dataview object that I can limit what columns are
    > visible from my table. I realize I could do this in the datasource select
    > statement, but that is a lot of columns. I am doing Select * from tbl...
    > How can I make this GUID column not show up in the datagridview control? Or
    > is there a way to deal with GUID columns in a dataview/datagridview control?
    >
    > Thanks,
    > Rich[/color]

    Comment

    Working...