all groups > vb.net controls > may 2007 >
You're in the

vb.net controls

group:

DataGrid bound to numeric values (SQL Server 2005)


DataGrid bound to numeric values (SQL Server 2005) jim
5/26/2007 5:54:03 PM
vb.net controls:
Not sure why this is so difficult. Bound dataGrid is bound to numeric
values, some of them are percentages. The format is set to p on these
dataGrid values.

Thought I would capture the cellParsing event and change the value, but it
doesn't stick!

Private Sub DataGrid_CellParsing(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellParsingEventArgs) Handles
DataGrid.CellParsing

If e.ColumnIndex = 8 Then
If String.IsNullOrEmpty(e.Value.ToString) Then
e.Value = DBNull.Value
e.ParsingApplied = True
Else
e.Value = e.Value / 100
e.ParsingApplied = True
End If
End If

End Sub

The following works, but would rather have a solution at the Form/DataGrid
level. Months from now, when someone is having issues with this app, they
should not have to look at the dataSet level to see whats happening:

Partial Class ProcureDataSet
Partial Class DistPricingDataTable

Private Sub DistPricingDataTable_ColumnChanging(ByVal sender As
System.Object, ByVal e As System.Data.DataColumnChangeEventArgs) Handles
Me.ColumnChanging

If (e.Column.ColumnName = Me.Fee_PercentColumn.ColumnName) Then
'Add user code here
If IsDBNull(e.ProposedValue.ToString) Or e.ProposedValue.ToString =
"" Then
Return
Else
e.ProposedValue = e.ProposedValue / 100
End If
End If

End Sub

End Class

Have spent several hours trying to post this query on MSDN in Visual Studio
2005, but they say my internet connection is down, so I will post it here
instead.

HELP

Re: DataGrid bound to numeric values (SQL Server 2005) tim
6/1/2007 8:13:19 PM
Here are some givens jimBob:

1. The quickest response to your issue will occur when you post in the wrong
usenet.

2. You will never get a response to a really technical question. Microsoft
wants you to call them for technical Support.

3. Even though you have paid top dollar for a MSDN subscription this year,
you will not receive any special support, and probably not even an upgrade
to the product; Visual Studio 2005. Exactly what am I getting for my top
dollar subscription? Posting questions in that thing they call 'Community,
Ask a Question' is a joke, right? The navigation through this forum is
insane. Do people at Microsoft actually get paid to come up with this?

4. I would love to be able to call Microsoft when I am having issues like:
a) Change the values in a tabControl page without having to select the
tabControl and letting the user not see all this tabControl page flopping.
b) Allowing a user to remove the values in a dataGrid that are bound to a
numeric value; you know Numeric 9.4 kinda stuff. Try deleting this value
and see the hoops you have to go through to get this update to work
correctly. I am not dealing with money or float here!

Don't get me wrong, I thing Visual Studio 2005 is a great product; it just
needs to be better! I base these development systems on the tools I used to
use, like any Borland product.




[quoted text, click to view]

Re: DataGrid bound to numeric values (SQL Server 2005) jake
6/1/2007 8:24:11 PM
I agree. I have tons of issues, and no support. If VS2005 controls worked
as intended, it would not be an issue. Seems I am continually searching for
a work-a-round. Add a new control, and spend the entire day trying to
figure out how to get it to work!


[quoted text, click to view]

Re: DataGrid bound to numeric values (SQL Server 2005) bonnie
6/1/2007 8:33:10 PM
Yeah me too! In the good old days, we received a book with our product,
that included everything this product ever did. Stuff was indexed, and now,
you have to search through an on-line help that usually doesn't even come
close to what your looking for. Whats wrong with a book?

[quoted text, click to view]

AddThis Social Bookmark Button