?
Solved

Datagrid modify selected rows

Posted on 2006-06-13
2
Medium Priority
?
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 4

Accepted Solution

by:
joachimcarrein earned 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

718 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