Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Delete Record From Datagrid

Posted on 2004-10-27
8
Medium Priority
?
214 Views
Last Modified: 2010-04-03
Using the example from Negatyve http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_21180897.html , does anyone know how to delete a record from the database using the datagrid? If so, can you please provide and example or point me in the right direction.  Any help would be greatly appreciated.  Thanks in adavance.

Justice
0
Comment
Question by:Justice75
[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
  • 5
  • 3
8 Comments
 

Author Comment

by:Justice75
ID: 12428457
The example that I am refering to is using the LoadVars object not the XML emaple.  Thanks.
0
 

Author Comment

by:Justice75
ID: 12430465
Okay?

Can anyone show me how to get the value of a record that was loded into a datagrid.  I think that I can send it the ASP page an ddelete the record.  However, how do I reload the datagrid?  Would I reload the loadVars object once the record ID (MMID) is sent to the ASP page.  Well I guess that I can just experiment once I figure out how to get the value of teh reord id from the selected record.  I have included the AS file.  Thanks for any help.

Justice


AS:
//this code checks the main swf root to see if the user has logged in
     if (_root.logged.text ==""){
          status.text = "YOU MUST BE LOGGED IN TO ACCESS YOUR MESSAGES";
          } else {
          status.text = "";
          }
//load vars
data_var = new LoadVars();
//any number can be plugged in here- the main swf root supplies this to this swf and passes it to the asp page that selects
//the records based on this value
data_var.ID = _root.logged.text;
data_var.path = this;
data_var.onLoad = function(success)
{
     if(success){
          var dataProv = [];
          for(var i = 0; i < Number(this.tot); i++){
               var item = {};
               item.Date = this["MMDate" + i];
               item.ID     = this["MMID" + i];
               item.From     = this["FromID" + i];
               item.Subject = this["Subject" + i];
               item.Message = this["Message" + i];
               item.Total = this["tot"];
               
               dataProv.push(item);
          }

          //counter
          iMCounter.text = item.Total;
         
          //column names, column info and dataProvider
          this.path.data_dg.columnNames = ["Date", "ID", "From", "Subject"];
          this.path.data_dg.dataProvider = dataProv;

          this.path.data_dg.getColumnAt(0).width = 150;
          this.path.data_dg.getColumnAt(1).width = 30;
          this.path.data_dg.getColumnAt(2).width = 50;
          this.path.data_dg.getColumnAt(3).width = 140;
         
}    
}

data_var.sendAndLoad("http://localhost/PartyList/Pages/Profile/proMVLoad.asp", data_var, "POST");


myGridListener = new Object();
myGridListener.change = function (eventObj)
{
     var eventSource = eventObj.target;
     var theSelectedItem = eventSource.selectedItem;
     var theSelectedItemMessage = theSelectedItem.Message;
     info.text = "Message:  " + theSelectedItemMessage;
};
data_dg.addEventListener("change", myGridListener);
stop();
0
 
LVL 27

Expert Comment

by:negatyve
ID: 12431609
Actually, what aren't you able to do?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Justice75
ID: 12434005
WOW Hi Negatyve!,

I want to be able to delete a record using the example that you provided.  I added a few extra lines of code and a text area bu it's the same code.  Thanks a bunch for  your time.

Justice

0
 
LVL 27

Expert Comment

by:negatyve
ID: 12471270
ok, gimme time to make you an example.. :)
0
 

Author Comment

by:Justice75
ID: 12472576
ok thanks
0
 
LVL 27

Accepted Solution

by:
negatyve earned 2000 total points
ID: 12483231
0
 

Author Comment

by:Justice75
ID: 12483996
Thanks Alot
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

618 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