Re: DataGrid question
- From: Les Stockton <LesStockton@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 20 Jun 2005 07:46:04 -0700
So no one else uses the grid with recordsets? No one can tell me how to
resolve this issue? The rebind doesn't work. It errors.
"Mark J. McGinty" wrote:
> You need to call grid.ReBind after setting the DataSource.
>
> Also the grid doesn't work really well with server cursors.
>
>
> -Mark
>
>
> "Les Stockton" <les.stockton@xxxxxxxxxxx> wrote in message
> news:%23oq43zRcFHA.3620@xxxxxxxxxxxxxxxxxxxxxxx
> > I'm making changes to an existing program that supposedly works.
> > The change I made had to do with database open options, but nothing with
> > controls or interface. Oddly, after my changes, the data grid doesn't
> > populate even though I can go in debug mode and clearly see that the
> > recordset I'm assigning it (as a DataSource) is populated and valid.
> >
> > Private Sub cmdExecute_Click()
> > On Error Resume Next
> > Dim RS As ADODB.Recordset
> >
> > Set RS = NewRS(adUseServer, adOpenStatic, adLockOptimistic)
> > RS.Open txtSQLStatement.Text, DB
> > If Err.Number Then
> > MsgBox "Error Executing Query: " & Err.Description
> > Exit Sub
> > End If
> >
> > Set Grid1.DataSource = RS
> >
> > End Sub
> >
> > Why is it, that after the Grid1.DataSource assignment, that the datagrid
> > does not display anyting?
> > I'm told that the datagrid is a tricky control and that I shouldn't use
> > it, but since this is an existing program, you'd think I could get it
> > working.
> >
> >
>
>
>
.
- Follow-Ups:
- Re: DataGrid question
- From: Mark J. McGinty
- Re: DataGrid question
- References:
- DataGrid question
- From: Les Stockton
- Re: DataGrid question
- From: Mark J. McGinty
- DataGrid question
- Prev by Date: Copy PictureBox into Clipboard
- Next by Date: Which control is the one selected?
- Previous by thread: Re: DataGrid question
- Next by thread: Re: DataGrid question
- Index(es):
Relevant Pages
|