c# - Getting Object details from list -
i working in win form there list named notes contains different values noteid, notetype, notename. each created note shown in panel noteid, note type,notename .like panel loaded in form.
the requirement when ever user clicks on of field i.e. noteid or notetype or notename, details should loaded in editable text-boxes editing.
when user clicks on noteid unique following note details:
foreach (note n in noteretrieve) { var index = array.findindex(noteretrieve, x => x.notetype == clickvalue); } so index of particular note , notedetails
tbtitle.text = noteretrieve[index].notename; & on.
but notetype , notename not unique, can't use above logic.
how ?
well upon given suggestion , analysis found solution.
label objects have tag property. can assign id value each type , name label. then, when click label, can note id tag property.
for example, consider note id, type , name 1, type1 , name1. now, labels show type1 , name1 have tag property value set 1. need set value while creating labels. on click event handler can tag value , show correct note.
again suggestion :)
Comments
Post a Comment