Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: Generics argument detect a class type Pin
Simon_Whale25-Mar-14 6:22
Simon_Whale25-Mar-14 6:22 
GeneralRe: Generics argument detect a class type Pin
OriginalGriff25-Mar-14 6:31
mveOriginalGriff25-Mar-14 6:31 
AnswerRe: Generics argument detect a class type Pin
Pete O'Hanlon25-Mar-14 7:47
mvePete O'Hanlon25-Mar-14 7:47 
GeneralRe: Generics argument detect a class type Pin
Simon_Whale25-Mar-14 9:44
Simon_Whale25-Mar-14 9:44 
GeneralRe: Generics argument detect a class type Pin
Pete O'Hanlon25-Mar-14 20:56
mvePete O'Hanlon25-Mar-14 20:56 
AnswerRe: Generics argument detect a class type Pin
Dave Kreskowiak25-Mar-14 9:07
mveDave Kreskowiak25-Mar-14 9:07 
GeneralRe: Generics argument detect a class type Pin
Simon_Whale25-Mar-14 10:12
Simon_Whale25-Mar-14 10:12 
QuestionHow can i set itextSharp PdfPTable column width Pin
devenv.exe25-Mar-14 1:11
professionaldevenv.exe25-Mar-14 1:11 
In the sample code below, how can i set varying column widths for each column individually? The DescriptionColumnName width is expected to be much wider than other columns and Col1Name is not expected to be equal to Col2Name in width?. Currently, all columns are being returned with the same column width, and the description column in most cases contains alot of free text, so i want to reduce the width of columns Col1Name & Col2Name and then increase DescriptionColumnName width.

C#
 Document document;
 document.NewPage();

 System.Collections.ArrayList columnWidth = new System.Collections.ArrayList();
    for (int i = 0; i < this.dataTable.Columns.Count; i++)
    {
        if (i < 2)
        {
            columnWidth.Add(2f);
        }
        else
        {
            columnWidth.Add(1f);
        }
    }

float[] headerWidths = columnWidth.OfType<float>().Select(w => (float)w).ToArray();

PdfPTable tableHeader = new PdfPTable(3);
tableHeader.AddCell(GetCell(Col1Name));
tableHeader.AddCell(GetCell(Col2Name));
tableHeader.AddCell(GetCell(DescriptionColumnName));

tableHeader.SetWidths(headerWidths);
tableHeader.HeaderRows = 1;

PopulatePDFCell(tableHeader);
document.Add(tableHeader);

"Coming soon"



QuestionLoading SubFolders to DataGrid View - Please assist Pin
Mohan Subramani24-Mar-14 22:27
Mohan Subramani24-Mar-14 22:27 
AnswerRe: Loading SubFolders to DataGrid View - Please assist Pin
Pete O'Hanlon24-Mar-14 22:31
mvePete O'Hanlon24-Mar-14 22:31 
GeneralRe: Loading SubFolders to DataGrid View - Please assist Pin
Mohan Subramani25-Mar-14 0:34
Mohan Subramani25-Mar-14 0:34 
AnswerRe: Loading SubFolders to DataGrid View - Please assist Pin
Simon_Whale25-Mar-14 0:10
Simon_Whale25-Mar-14 0:10 
QuestionWhere Is the Current Free Download Of Visual C# ? Pin
C-P-User-324-Mar-14 3:09
C-P-User-324-Mar-14 3:09 
AnswerRe: Where Is the Current Free Download Of Visual C# ? Pin
Pete O'Hanlon24-Mar-14 3:16
mvePete O'Hanlon24-Mar-14 3:16 
GeneralRe: Where Is the Current Free Download Of Visual C# ? Pin
C-P-User-324-Mar-14 3:18
C-P-User-324-Mar-14 3:18 
GeneralRe: Where Is the Current Free Download Of Visual C# ? Pin
Pete O'Hanlon24-Mar-14 3:22
mvePete O'Hanlon24-Mar-14 3:22 
GeneralRe: Where Is the Current Free Download Of Visual C# ? Pin
C-P-User-324-Mar-14 3:29
C-P-User-324-Mar-14 3:29 
GeneralRe: Where Is the Current Free Download Of Visual C# ? Pin
Pete O'Hanlon24-Mar-14 7:37
mvePete O'Hanlon24-Mar-14 7:37 
AnswerRe: Where Is the Current Free Download Of Visual C# ? Pin
Kenneth Haugland24-Mar-14 3:16
mvaKenneth Haugland24-Mar-14 3:16 
GeneralRe: Where Is the Current Free Download Of Visual C# ? Pin
C-P-User-324-Mar-14 3:20
C-P-User-324-Mar-14 3:20 
QuestionRe: Where Is the Current Free Download Of Visual C# ? Pin
Kenneth Haugland24-Mar-14 3:25
mvaKenneth Haugland24-Mar-14 3:25 
AnswerRe: Where Is the Current Free Download Of Visual C# ? Pin
C-P-User-324-Mar-14 3:30
C-P-User-324-Mar-14 3:30 
AnswerRe: Where Is the Current Free Download Of Visual C# ? Pin
BobJanova24-Mar-14 3:56
BobJanova24-Mar-14 3:56 
GeneralRe: Where Is the Current Free Download Of Visual C# ? Pin
C-P-User-324-Mar-14 4:20
C-P-User-324-Mar-14 4:20 
GeneralRe: Where Is the Current Free Download Of Visual C# ? Pin
BobJanova24-Mar-14 4:40
BobJanova24-Mar-14 4:40 

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.