Click here to Skip to main content
15,896,348 members
Home / Discussions / C#
   

C#

 
AnswerRe: bool delegate Pin
N a v a n e e t h20-Aug-09 0:11
N a v a n e e t h20-Aug-09 0:11 
AnswerRe: bool delegate Pin
DaveyM6920-Aug-09 0:11
professionalDaveyM6920-Aug-09 0:11 
GeneralRe: bool delegate Pin
bonzaiholding20-Aug-09 0:36
bonzaiholding20-Aug-09 0:36 
GeneralRe: bool delegate Pin
DaveyM6920-Aug-09 1:38
professionalDaveyM6920-Aug-09 1:38 
GeneralRe: bool delegate Pin
DaveyM6920-Aug-09 1:52
professionalDaveyM6920-Aug-09 1:52 
GeneralRe: bool delegate Pin
bonzaiholding20-Aug-09 2:40
bonzaiholding20-Aug-09 2:40 
Generalstore datagridview items under a button [modified] Need help! Pin
Member 474292219-Aug-09 23:43
Member 474292219-Aug-09 23:43 
GeneralRe: store datagridview items under a button [modified] Need help! Pin
OriginalGriff20-Aug-09 1:40
mveOriginalGriff20-Aug-09 1:40 
A couple of things:
1) Don't use the Name property for something like this, it is not a good practice. Use the Tag property instead.
2) In your wacht_Click handler, do not just cast the sender as a button - it is again bad practice - in future you may re-use the routine for a different control. Use:
{
Button currentButton = sender as Button;
if (currentButton != null)
   {
   ...
   }
}

3) There is no direct overload for DataGridView.Rows.Add that takes a string: you are using the generic Add(params object[]) instead - I do not know what it does with just a single string.
4) Why are you faffing about with strings and splits? You already have the DataGridViewRow items you want, why not keep a List<DataGridViewRow> in the Button.Tag property instead? You can then traverse and Add these directly, or extract the strings for your ListBox if you need to.

No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.

This message is made of fully recyclable Zeros and Ones

GeneralRe: store datagridview items under a button [modified] Need help! Pin
Member 474292220-Aug-09 2:08
Member 474292220-Aug-09 2:08 
GeneralRe: store datagridview items under a button [modified] Need help! Pin
OriginalGriff20-Aug-09 9:16
mveOriginalGriff20-Aug-09 9:16 
GeneralRe: store datagridview items under a button [modified] Need help! Pin
Member 474292220-Aug-09 21:38
Member 474292220-Aug-09 21:38 
GeneralRe: store datagridview items under a button [modified] Need help! Pin
OriginalGriff20-Aug-09 21:52
mveOriginalGriff20-Aug-09 21:52 
GeneralRe: store datagridview items under a button [modified] Need help! Pin
Member 474292222-Aug-09 2:08
Member 474292222-Aug-09 2:08 
QuestionGeneric Question - Implementing IEnumerable Pin
Programm3r19-Aug-09 23:37
Programm3r19-Aug-09 23:37 
AnswerRe: Generic Question - Implementing IEnumerable Pin
N a v a n e e t h20-Aug-09 0:08
N a v a n e e t h20-Aug-09 0:08 
GeneralRe: Generic Question - Implementing IEnumerable Pin
Programm3r20-Aug-09 1:40
Programm3r20-Aug-09 1:40 
AnswerRe: Generic Question - Implementing IEnumerable Pin
Nicholas Butler20-Aug-09 0:10
sitebuilderNicholas Butler20-Aug-09 0:10 
GeneralRe: Generic Question - Implementing IEnumerable Pin
Programm3r20-Aug-09 2:06
Programm3r20-Aug-09 2:06 
QuestionWhy doesn´t work the Code? Pin
nhqlbaislwfiikqraqnm19-Aug-09 22:48
nhqlbaislwfiikqraqnm19-Aug-09 22:48 
AnswerRe: Why doesn´t work the Code? Pin
padmanabhan N19-Aug-09 22:59
padmanabhan N19-Aug-09 22:59 
GeneralRe: Why doesn´t work the Code? Pin
nhqlbaislwfiikqraqnm19-Aug-09 23:05
nhqlbaislwfiikqraqnm19-Aug-09 23:05 
GeneralRe: Why doesn´t work the Code? Pin
padmanabhan N19-Aug-09 23:15
padmanabhan N19-Aug-09 23:15 
AnswerRe: Why doesn´t work the Code? Pin
musefan19-Aug-09 23:09
musefan19-Aug-09 23:09 
AnswerRe: Why doesn´t work the Code? Pin
Keith Barrow19-Aug-09 23:10
professionalKeith Barrow19-Aug-09 23:10 
GeneralRe: Why doesn´t work the Code? Pin
nhqlbaislwfiikqraqnm20-Aug-09 0:02
nhqlbaislwfiikqraqnm20-Aug-09 0:02 

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.