TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Zeb dee
NA
21
832
To Provide index as AA,AB,AC......So on for the list of records in PDF
Mar 18 2021 11:06 AM
Hi, I have to provide index as AA, AB, AC,.... etc to pdf list of rows/records using PDFPtable, but there are splits after some rows, i have code like below
String index =
""
;
PdfPTable table =
new
PdfPTable(columnWidth.Count()) { TotalWidth = TABLE_WIDTH, LockedWidth =
true
};
index = GetIndex(table.Size);
public
static
string
GetIndex(
int
value)
{
StringBuilder sb =
new
StringBuilder();
do
{
value--;
int
remainder = 0;
value = Math.DivRem(value, 26,
out
remainder);
sb.Insert(0, Convert.ToChar(
'A'
+ remainder));
}
while
(value > 0);
return
sb.ToString();
}
this code display records from A,B,C,D.. Z and After Z AA,AB,AC ....so on and whenever split occurs i.e if split table occurs after 5 rows it again start from A,b,c... So this is not working.
Note:
My requirement is to display AA,AB,AC..... so on for total rows start to end in PDF if split occurs also. Can any one please help me on this, Thanks in advance, Zeb.
Attachment:
Index_SplitRows.zip
Reply
Answers (
5
)
how to pass some parameter in header and some in query strin in webapi
How to display channels in ListView using Graph API?