Click here to Skip to main content
15,903,175 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Generics, Reflexion Pin
Bergerrudi19-Apr-06 13:00
Bergerrudi19-Apr-06 13:00 
Question.sendwait("08052") Pin
Mr kilany19-Apr-06 8:08
Mr kilany19-Apr-06 8:08 
AnswerRe: .sendwait("08052") Pin
Mr kilany22-Apr-06 3:36
Mr kilany22-Apr-06 3:36 
QuestionVB.NET/XML HELP URGENT Pin
samerali19-Apr-06 8:05
samerali19-Apr-06 8:05 
AnswerRe: VB.NET/XML HELP URGENT Pin
samerali19-Apr-06 8:06
samerali19-Apr-06 8:06 
AnswerRe: VB.NET/XML HELP URGENT Pin
Steve Pullan19-Apr-06 14:08
Steve Pullan19-Apr-06 14:08 
GeneralRe: VB.NET/XML HELP URGENT Pin
samerali19-Apr-06 14:17
samerali19-Apr-06 14:17 
QuestionDatagrid, DataSet Pin
dannygilbert319-Apr-06 7:46
dannygilbert319-Apr-06 7:46 
In the present code, we use a datagrid as a container to print data from a SQL database. The following gets data (via ODBC) in the SQL database and save it in a DATASET.

Public Function GetDatasetGiveSql(ByVal sqlCmd As String) As DataSet
Dim dataset As New DataSet
odbcCmd.Connection.Close()
odbcCmd = New Odbc.OdbcCommand(sqlCmd, odbcConnection)
odbcAdapt = New Odbc.OdbcDataAdapter(odbcCmd)
odbcCmd.Connection.Open()
odbcAdapt.Fill(dataset)
Return dataset
End Function

Elsewhere in the software, the software builds a query and sends it to the database like this:

dsCommand = sql.GetDatasetGiveSql(cmd)
DataGridCommand.SetDataBinding(dsCommand, "Table")

As you can suspect, dsCommand is a DataSet and DataGridCommand is the DataGrid to update.

Easy to date… OK.

Question:
---------
I want to have control on the background and foreground color of a cell based on some information like any people in this forum. I found many EXAMPLES with DataGridColumnStyle where the idea is to override the Paint method (aka: make a custom datagrid control). Yes, Perfect. I understand it BUT in this case… I DON’T CONTROL ANY COLUMN in the datagrid. It seems that the SetDataBinding() does everything by itself, it is magic.

I did not find HOW to OVERRIDE the Paint() method of this datagrid. Maybe I don’t understand something !

Sniff | :^)

Danny Gilbert, enginneer
Montréal, Canada


Danny Gilbert, enginneer
Montréal, Canada
AnswerRe: Datagrid, DataSet Pin
cowtech27-Apr-06 13:20
cowtech27-Apr-06 13:20 
GeneralRe: Datagrid, DataSet Pin
dannygilbert328-Apr-06 2:24
dannygilbert328-Apr-06 2:24 
GeneralRe: Datagrid, DataSet Pin
cowtech15-May-06 13:27
cowtech15-May-06 13:27 
QuestionEnumerate MDIList Menu-item children Pin
paas19-Apr-06 5:58
paas19-Apr-06 5:58 
Questionusing an ActiveX created in VB6 within .Net 2 Pin
Jain Mohit19-Apr-06 4:34
Jain Mohit19-Apr-06 4:34 
QuestionMonitor User Activity Pin
alexfromto19-Apr-06 4:29
alexfromto19-Apr-06 4:29 
AnswerRe: Monitor User Activity Pin
Dave Kreskowiak19-Apr-06 5:37
mveDave Kreskowiak19-Apr-06 5:37 
GeneralRe: Monitor User Activity Pin
alexfromto19-Apr-06 6:44
alexfromto19-Apr-06 6:44 
GeneralRe: Monitor User Activity Pin
Dave Kreskowiak19-Apr-06 7:34
mveDave Kreskowiak19-Apr-06 7:34 
GeneralRe: Monitor User Activity Pin
alexfromto20-Apr-06 2:44
alexfromto20-Apr-06 2:44 
QuestionCrystal Reports Database Login Pin
Izak -19-Apr-06 4:14
Izak -19-Apr-06 4:14 
QuestionSlow application startup Pin
daveryan7819-Apr-06 3:58
daveryan7819-Apr-06 3:58 
AnswerRe: Slow application startup Pin
Yuvi Panda19-Apr-06 4:17
Yuvi Panda19-Apr-06 4:17 
GeneralRe: Slow application startup Pin
daveryan7819-Apr-06 23:08
daveryan7819-Apr-06 23:08 
QuestionVB6 equivalent for Static members in C? (Shared??) Pin
MohammadAmiry19-Apr-06 3:52
MohammadAmiry19-Apr-06 3:52 
AnswerRe: VB6 equivalent for Static members in C? (Shared??) Pin
Dave Kreskowiak19-Apr-06 5:25
mveDave Kreskowiak19-Apr-06 5:25 
AnswerRe: VB6 equivalent for Static members in C? (Shared??) Pin
Joshua Quick19-Apr-06 11:07
Joshua Quick19-Apr-06 11:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.