Re: DataGrid question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.
> >
> >
>
>
>
.



Relevant Pages

  • Re: DataGrid Question ...
    ... Public Function Set_ButtonColumn(ByVal oDG As DataGrid) As Boolean ... ' Add Bound Columns to the Grid ... > Private Sub dg1_ItemCommand(ByVal source As Object, ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: Dynamically create datagrid columns
    ... dynamically created grid looks marvelous. ... My problem is that my dynamically created textboxes, ... > | Subject: Re: Dynamically create datagrid columns ... > | Public Sub New ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: update command does not fire when adding row
    ... but it works fine on a datagrid that has records. ... Public Overrides Sub InitializeCell(ByVal cell As TableCell, ... >> I have built a grid dynamically, and with edit, delete and bound ... >> and the datagrid update command fires. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: DataGrid question
    ... You need to call grid.ReBind after setting the DataSource. ... Also the grid doesn't work really well with server cursors. ... > Exit Sub ... > Why is it, that after the Grid1.DataSource assignment, that the datagrid ...
    (microsoft.public.vb.controls)
  • Re: inherited DataGrid failed to render
    ... You can inherit from a DataGrid. ... look for when the grid is creating a header ... >Private Sub Page_Load(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.framework.aspnet)