|
-
Jun 30th, 2005, 12:33 PM
#1
Thread Starter
Frenzied Member
datagrid stylesheet
In my SQL I get a value from calculating two fields. I want to place this value in my datagrid. I'm having trouble mapping it in my dg-stylesheet.
VB Code:
Dim cmdView As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter("select check_no, purchase_date, vendor_payee, check_amt, " & _
[B]"(check_amt-returned_amt) as purchase_amt[/B], returned_amt, approver_id, " & _
"from pccr.pccr_check_header, pccr.pccr", objCon)
Dim grdColStyle5 As New DataGridTextBoxColumn()
With grdColStyle5
.HeaderText = "Purchase Amt"
.MappingName = "purchase_amt"
.Format = "$#.##"
.Width = 77
.Alignment = HorizontalAlignment.Center
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jul 12th, 2005, 09:27 AM
#2
Re: datagrid stylesheet
VB Code:
Dim cmdView As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter("select check_no, purchase_date, vendor_payee, check_amt, " & _
"(check_amt-returned_amt) as purchase_amt, returned_amt, approver_id, " & _
"from pccr.pccr_check_header, pccr.pccr", objCon)
dim ds as new dataset
cmdView.Fill(ds, "purchase_amt")
Dim ts1 As New DataGridTableStyle
ts1.MappingName = "purchase_amt"
ts1.AlternatingBackColor = Color.LightBlue
Dim grdColStyle5 As New DataGridTextBoxColumn()
With grdColStyle5
.HeaderText = "Purchase Amt"
.MappingName = "purchase_amt"
.Format = "$#.##"
.Width = 77
.Alignment = HorizontalAlignment.Center
end with
Me.DataGrid1.TableStyles.Clear()
Me.DataGrid1.TableStyles.Add(ts1)
Regards
Jorge
"The dark side clouds everything. Impossible to see the future is."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|