Solved

Datagrid modify selected rows

Posted on 2006-06-13
2
241 Views
Last Modified: 2011-09-20
Hey,

I have a datagrid with a context menu. The idea is that the user can select multiple rows on the datagrid, right click and then calls a function that modifies a field for all selected records.

That field is a datetime field in a sql table. I want the user to be able to add or substract minutes to all selected rows. eg. User selects rows 1 to 3, right clicks, chooses "Modify time" and inputs 10 => 10 minutes should be added to the Time filed of rows 1-3 and modify it in the database. If the user inputs -10, 10 minutes should be substracted.
0
Comment
Question by:tsay
  • 2
2 Comments
 
LVL 4

Accepted Solution

by:
joachimcarrein earned 250 total points
ID: 16892264
i'll suppose you request your "duration" with an inputbox and you know how to check that value?

after you have the value, lets say variable dDuration
Dim i As Integer
For i = 0 To datagrid.Count - 1
  if datagrid.isselected(i) then
    'Here you know which record it is and you can call your modify functions
  end if
next
0
 
LVL 4

Expert Comment

by:joachimcarrein
ID: 16892279
you can find more info on this here:  
http://aspalliance.com/articleViewer.aspx?aId=141&pId=
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question