datagrid disaster

Results 1 to 2 of 2

Thread: datagrid disaster

  1. #1
    Join Date
    Dec 1969

    Default datagrid disaster

    I have a datagrid with checkbox column. The user select which files they want then I need to append each of these to a email and send it.<BR><BR>I can do the email stuff fine. Just I have a submit button outside of the datagrid that call the send mail method, hence I cant retrieve any data from the datagrid ie<BR><BR>If have (object Sender, DataGridEventargs e) I can get datagrid details i e.cell whatever<BR> <BR>But because the ONE submit button i have is not in teh datagrid I have to use<BR>I have (object Sender, eveteargs e)<BR><BR>This means I cannot get data from the datagrid....... I dont need a button column I just need one button that cn be used withe the datagrid??<BR><BR>Unless there is any ohter way to retrive datagrid information<BR><BR>HELP!! :)

  2. #2
    Join Date
    Dec 1969

    Default RE: datagrid disaster

    You can do that.<BR><BR>Try the following technique:<BR><BR>Declare a listitem and loop through all the items of the datagrid.<BR><BR>I will give you the code, convert that to<BR><BR>Dim x As listitem<BR><BR>for each listitem in datagrid.items<BR> if (CType(listitem.findcontrol("Name_of_the_checkbox" ),CheckBox).Checked = true Then<BR> &#039; do whatever you want to do<BR>end if<BR>next<BR><BR>I hope the above code will solve your problem, if not let me know.<BR><BR>Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts