index | search | no replies | posting guidelines | help login | register
Index » Products » ASP DataGrid
search this forum:
:: Hierachical grid bug or bad use ? :: (2)Post a New Message | Post a Reply
Jan 8 2005, 12:50 AM
 Hierachical grid bug or bad use ?Post a Reply
 step

View this author's profile Send this author a private message

from: france

Hello,

I test the objGrid and y have two problems:

            Dim sConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Mysource;"

            Dim objGrid
            objGrid = Server.CreateObject("AspWebSolution.DataGrid")
            With objGrid

                .Command = "SELECT Table1. NomUser as [Name], Table1.AdressUSER as [Adress], Table2.Date, Table2.Operation FROM Table1, Table2 WHERE Table1.IdUSER= Table2.IdUSER
objGrid.MasterTable = "Table1"
                'Create a databse connection
                .CreateConnection(sConnString)
                .title = "Test"
                .GridStyle = "background-color:gray;"
                .HeaderStyle = "background-color:#666699;"
                .HeaderTextStyle = "color:white;font-family:verdana;font-size:8pt;"
                .ItemStyle = "background-color:#d2d1de;color:000000;font-family:verdana;font-size:8pt;"
                .AltItemStyle = "background-color:#f5f5f5;color:000000;font-family:verdana;font-size:8pt;"
                .FooterStyle = "font-family:verdana;font-size:8pt;"
                .AddRowNumbers = False
                .canfilter = True
                'Display the data grid
                .Display()
            End With
            objGrid = Nothing


There are two problem in display.

In first the header text content : NomUser as [Name]
in second there are only one field in MasterTable . How to display the other field ? because is appear in the détail grid !

Try this exemple.

Thanks four your quickly answer.

Jan 11 2005, 2:43 AM
 Re: Hierachical grid bug or bad use ?Post a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

Try this:

Dim sConnString, objGrid
sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Mysource.mdb;"
Set objGrid = Server.CreateObject("AspWebSolution.DataGrid")

With objGrid
    .Command = "SELECT Table1.NomUser, Table1.AdressUSER, Table2.Date, Table2.Operation FROM Table1, Table2 WHERE Table1.IdUSER=Table2.IdUSER"
    Call .ColumnCaption("Table1.NomUser","Name")
    Call .ColumnCaption("Table1.AdressUSER","Adress")
    
    .MasterTable = "Table1"
    .title = "Test"
    
    .GridStyle = "background-color:gray;"
    .HeaderStyle = "background-color:#666699;"
    .HeaderTextStyle = "color:white;font-family:verdana;font-size:8pt;"
    .ItemStyle = "background-color:#d2d1de;color:000000;font-family:verdana;font-size:8pt;"
    .AltItemStyle = "background-color:#f5f5f5;color:000000;font-family:verdana;font-size:8pt;"
    .FooterStyle = "font-family:verdana;font-size:8pt;"
    
    .AddRowNumbers = False
    .CanFilter = True
    
    'Create a databse connection
    Call .CreateConnection(sConnString)

    'Display the data grid
    .Display
End With
Set objGrid = Nothing


P/S: Read the online manual




-------------------------
Ghost
Pages: (1)   [1]

search this forum: