Solved

Datagrid modify selected rows

Posted on 2006-06-13
2
237 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

776 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