473,405 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

horizontal alignment in datagrid

I try to align the data in my datagrid to the right. I use this piece
of VB.Net code. "Salestable" is one of the tables in the dataset
which i want to show in my datagrid. Showing this data in the grid
works until i try to align the data.
Dim myColumnStyle As DataGridColumnStyle
For Each myColumnStyle In
Grid_SF_YW.TableStyles("SalesTable").GridColumnSty les
myColumnStyle.Alignment = HorizontalAlignment.Right
Next

I get this error:

Object reference not set to an instance of an object.

Does anyone have an idea of what i do wrong?

Thx.
Jul 21 '05 #1
0 916

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: QT | last post by:
Dear Sirs, I just upgrade my vb 6.0 application to vb.net. But as I see my datagrid shape changed. I can not see horizontal scrool bar at the bottom of the datagrid. But I can move left of...
0
by: Kenny | last post by:
I try to align the data in my datagrid to the right. I use this piece of VB.Net code. "Salestable" is one of the tables in the dataset which i want to show in my datagrid. Showing this data in...
2
by: blackdevil1979 | last post by:
Hello, Is there a way to format the data when it is passed into the Crystal Report(CR).. for example.. In the original table, a number may be left aligned, how to change it to right alignment?.....
0
by: Dan Hinsley | last post by:
I just got one of the new Microsoft Mice that has a "tilt wheel" for horizontal scrolling. This works in a listbox in my VB.NET app, but doesn't work for a datagrid that does have a horizontal...
2
by: John Smith | last post by:
Hi all; Putting "Due" into the column header of a datagrid. Font is a proportional fort. When the alignment is left, there is some space between the column separator bar and the D in Due....
3
by: Simon Abolnar | last post by:
Is it possible to align headers and text in different way. Because with: dgts.GridColumnStyles(0).Alignment = HorizontalAlignment.Center alignment is set for all column (header and text). ...
7
by: Earl | last post by:
Any known fixes for the wacky right-alignment bug in the WinForms datagrid (VS2003)? I've tried Ken's workaround...
4
by: Jeff Higgins | last post by:
Hi, I would like to left align the text within a paragraph element while keeping the paragraph center aligned within the body. The following doesn't do it. Any help will be greatly...
0
by: Grant_S | last post by:
Can anyone help with a code snippet to right align a single column in the standard Visual studio 2003 datagrid? I need to do this alignment manipulation in code and therefore not able to set...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.