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

.NET (Core and Framework)

 
GeneralRe: Generic class with reference to another generic class Pin
lukeer28-Mar-11 9:10
lukeer28-Mar-11 9:10 
QuestionHow publsiher-subscriber configurations can be included in a single app.config? Pin
glitteringsound8-Feb-11 6:59
glitteringsound8-Feb-11 6:59 
AnswerRe: How publsiher-subscriber configurations can be included in a single app.config? Pin
#realJSOP8-Feb-11 9:55
professional#realJSOP8-Feb-11 9:55 
GeneralRe: How publsiher-subscriber configurations can be included in a single app.config? Pin
glitteringsound9-Feb-11 4:52
glitteringsound9-Feb-11 4:52 
QuestionWCF webservice Pin
Pranit Kothari8-Feb-11 6:47
Pranit Kothari8-Feb-11 6:47 
AnswerRe: WCF webservice Pin
dan!sh 8-Feb-11 7:10
professional dan!sh 8-Feb-11 7:10 
QuestionAdding Row Numbers to DataGridView Pin
Member 22565337-Feb-11 5:27
Member 22565337-Feb-11 5:27 
AnswerRe: Adding Row Numbers to DataGridView Pin
Yusuf7-Feb-11 6:10
Yusuf7-Feb-11 6:10 
Member 2256533 wrote:
int numberofrows = DG.Rows.Count;
int len = numberofrows.ToString().Length;
string NumberForRow;
for (x = 0; x < DG.Rows.Count; x++)
{
NumberForRow = Convert.ToString(x + 1);
while (NumberForRow.Length < len)
{
NumberForRow = "0" + NumberForRow;
}
DG.Rows[x].HeaderCell.Value = NumberForRow;



What length are you trying to get? this does not seem right. It looks you are trying to figure out how may digits are in a number. Is that right?
int len = numberofrows.ToString().Length;


int NumberForRow = 1;
foreach (DataGridViewRow row in DG.Rows)
{
   if(NumberForRow < 10)
     row.HeaderCell.Value = String.Format("{0:D2}", NumberForRow );
   else
     row.HeaderCell.Value = NumberForRow;
   
   NumberForRow = NumberForRow+ 1;
}


GeneralRe: Adding Row Numbers to DataGridView Pin
Member 22565337-Feb-11 6:56
Member 22565337-Feb-11 6:56 
AnswerRe: Adding Row Numbers to DataGridView Pin
Luc Pattyn7-Feb-11 8:19
sitebuilderLuc Pattyn7-Feb-11 8:19 
AnswerRe: Adding Row Numbers to DataGridView Pin
Member 22565337-Feb-11 7:08
Member 22565337-Feb-11 7:08 
AnswerRe: Adding Row Numbers to DataGridView Pin
GenJerDan7-Feb-11 9:32
GenJerDan7-Feb-11 9:32 
AnswerRe: Adding Row Numbers to DataGridView Pin
RobCroll8-Feb-11 1:07
RobCroll8-Feb-11 1:07 
QuestionI have this task but I don't know what I should do , Please help me. (get Factor) Pin
Honeyboy_206-Feb-11 0:15
Honeyboy_206-Feb-11 0:15 
AnswerRe: I have this task but I don't know what I should do , Please help me. (get Factor) Pin
Honeyboy_206-Feb-11 0:35
Honeyboy_206-Feb-11 0:35 
GeneralRe: I have this task but I don't know what I should do , Please help me. (get Factor) [modified] Pin
_Erik_8-Feb-11 3:38
_Erik_8-Feb-11 3:38 
AnswerRe: I have this task but I don't know what I should do , Please help me. (get Factor) Pin
Richard MacCutchan6-Feb-11 1:35
mveRichard MacCutchan6-Feb-11 1:35 
GeneralRe: I have this task but I don't know what I should do , Please help me. (get Factor) Pin
#realJSOP7-Feb-11 5:20
professional#realJSOP7-Feb-11 5:20 
AnswerRe: I have this task but I don't know what I should do , Please help me. (get Factor) Pin
Abhinav S7-Feb-11 6:42
Abhinav S7-Feb-11 6:42 
AnswerRe: I have this task but I don't know what I should do , Please help me. (get Factor) Pin
Bernhard Hiller8-Feb-11 0:46
Bernhard Hiller8-Feb-11 0:46 
QuestionTab Control Page Not Responding Fast Enough Pin
Member 22565334-Feb-11 4:54
Member 22565334-Feb-11 4:54 
AnswerRe: Tab Control Page Not Responding Fast Enough Pin
Yusuf4-Feb-11 5:33
Yusuf4-Feb-11 5:33 
GeneralRe: Tab Control Page Not Responding Fast Enough Pin
Member 22565334-Feb-11 5:39
Member 22565334-Feb-11 5:39 
AnswerRe: Tab Control Page Not Responding Fast Enough Pin
Luc Pattyn4-Feb-11 6:19
sitebuilderLuc Pattyn4-Feb-11 6:19 
AnswerRe: Tab Control Page Not Responding Fast Enough Pin
GenJerDan4-Feb-11 9:57
GenJerDan4-Feb-11 9:57 

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.