Click here to Skip to main content
15,898,737 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
Questionunable to get property 'childnodes' of undefined or null reference Pin
Member 105519074-Jun-14 2:47
Member 105519074-Jun-14 2:47 
AnswerRe: unable to get property 'childnodes' of undefined or null reference Pin
Simon_Whale4-Jun-14 3:12
Simon_Whale4-Jun-14 3:12 
AnswerRe: unable to get property 'childnodes' of undefined or null reference Pin
jinzai17-Jul-14 12:26
jinzai17-Jul-14 12:26 
QuestionRewriting VB6 Point of Sale App in C# using Visual Studio 2013, .Net Framework 4.5.1 Pin
sgralnick3-Jun-14 10:41
sgralnick3-Jun-14 10:41 
AnswerRe: Rewriting VB6 Point of Sale App in C# using Visual Studio 2013, .Net Framework 4.5.1 Pin
CatchExAs19-Jun-14 12:28
professionalCatchExAs19-Jun-14 12:28 
AnswerRe: Rewriting VB6 Point of Sale App in C# using Visual Studio 2013, .Net Framework 4.5.1 Pin
Member 99087646-Aug-14 12:03
Member 99087646-Aug-14 12:03 
Question.Dat file Pin
jjanmendra1-Jun-14 22:03
jjanmendra1-Jun-14 22:03 
AnswerRe: .Dat file Pin
Richard MacCutchan1-Jun-14 22:57
mveRichard MacCutchan1-Jun-14 22:57 
AnswerRe: .Dat file Pin
Dave Kreskowiak2-Jun-14 2:28
mveDave Kreskowiak2-Jun-14 2:28 
QuestionActivex code to print pdf files on client machine Pin
Sachin Mehndiratta29-May-14 1:29
Sachin Mehndiratta29-May-14 1:29 
AnswerRe: Activex code to print pdf files on client machine Pin
AmitGajjar29-May-14 6:43
professionalAmitGajjar29-May-14 6:43 
GeneralRe: Activex code to print pdf files on client machine Pin
Sachin Mehndiratta1-Jun-14 21:04
Sachin Mehndiratta1-Jun-14 21:04 
QuestionAttribute in .net Pin
Member 1079749328-May-14 21:30
Member 1079749328-May-14 21:30 
AnswerRe: Attribute in .net Pin
Pete O'Hanlon28-May-14 22:56
mvePete O'Hanlon28-May-14 22:56 
GeneralRe: Attribute in .net Pin
Manikandan1011-Jun-14 3:46
professionalManikandan1011-Jun-14 3:46 
GeneralRe: Attribute in .net Pin
AmitGajjar29-May-14 6:44
professionalAmitGajjar29-May-14 6:44 
Questionhow to change DataGrid specific column alignment to Center in C# programmatically Pin
ven75327-May-14 23:49
ven75327-May-14 23:49 
AnswerRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
Eddy Vluggen28-May-14 0:28
professionalEddy Vluggen28-May-14 0:28 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
ven75328-May-14 1:58
ven75328-May-14 1:58 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
Eddy Vluggen28-May-14 3:00
professionalEddy Vluggen28-May-14 3:00 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
ven75328-May-14 3:32
ven75328-May-14 3:32 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
Eddy Vluggen28-May-14 5:06
professionalEddy Vluggen28-May-14 5:06 
Is this a WinForms datagrid (prolly not), an ASP.NET grid or a WPF-grid? In WinForms, life is simple;
C#
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        class Test
        {
            public string Item1 { get; set; }
            public string Item2 { get; set; }
            public string Item3 { get; set; }
        }

        DataGridView grid;
        public Form1()
        {
            List<Test> data = new List<Test>();
            data.Add(new Test() { Item1 = "bla", Item2 = "foos", Item3 = "bar" });

            InitializeComponent();
            grid = new DataGridView() { Dock = DockStyle.Fill };

            grid.DataSource = data;

            Controls.Add(grid);

            MessageBox.Show(string.Format("There are {0} columns in this grid", grid.Columns.Count));
        }

        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);
            grid.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
        }
    }
}

Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
ven75328-May-14 20:40
ven75328-May-14 20:40 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
Pete O'Hanlon28-May-14 20:50
mvePete O'Hanlon28-May-14 20:50 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
ven75329-May-14 0:11
ven75329-May-14 0:11 

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.