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

.NET (Core and Framework)

 
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
subeditorPete 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 
Hi
i have created DataGrid and i need to align the specific column (4th column i.e index 3) to Center in C# programmatically.

I tried as below
dg1.Columns[3].ItemStyle.HorizontalAlign = HorizontalAlign.Center;
but giving error as follows
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
even if i give index 0 also same error

How to achieve this. If anybody knows reply me.

Thanks in advance.
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 
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
subeditorPete 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 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
Pete O'Hanlon29-May-14 0:15
subeditorPete O'Hanlon29-May-14 0:15 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
ven75330-May-14 2:04
ven75330-May-14 2:04 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
Pete O'Hanlon30-May-14 2:13
subeditorPete O'Hanlon30-May-14 2:13 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
Dave Kreskowiak29-May-14 1:47
mveDave Kreskowiak29-May-14 1:47 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
ven75330-May-14 2:05
ven75330-May-14 2:05 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
Dave Kreskowiak30-May-14 4:12
mveDave Kreskowiak30-May-14 4:12 
AnswerRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
Eddy Vluggen29-May-14 20:59
professionalEddy Vluggen29-May-14 20:59 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
ven75330-May-14 2:09
ven75330-May-14 2:09 
GeneralRe: how to change DataGrid specific column alignment to Center in C# programmatically Pin
Eddy Vluggen30-May-14 5:28
professionalEddy Vluggen30-May-14 5:28 

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.