473,394 Members | 1,642 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,394 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 1116

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...
7
by: Doug Bell | last post by:
Hi Does anyone know (or point me where I can find) how to set the alignment of a DataGrid Column Header different to the alignment of the column. I am trying to show some Right aligned columns...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.