Solved

Datagrid modify selected rows

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

624 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