3.2.0

Edit cells

Hi, this is a awesome project. I´d like to know if it´s possible to edit cells.
If yes, how could I pass the values that were changed to the server?
If no, is there any plans to do it?

Thank you very much

Daniel - Brazil
November 12,
No, cell editing is not possible in this version. It is in the plans.
Alex (ActiveWidgets)
November 12,
I believe this is doable, send in <input type='text' name='x' value='x'>, as column "text", encapsulate everything in a form, have a submit button.. currently testing, will respond shortly.
March 27,
var myData = [
["1","MP1", "<input type='text' class='arialfont8' name='edr1c1' value='MegaPipe 1' style='text-align: top; height: 30px; border-style: none;' >", "<input type='text' class='arialfont8' name='edr1c2' value='1' style='text-align: top; height: 30px; border-style: none;' >", "<input type='text' class='arialfont8' name='edr1c3' value='99.00' style='text-align: top; height: 30px; border-style: none;' >", "<input type='text' class='arialfont8' name='edr1c4' value='99.00' style='text-align: top; height: 30px; border-style: none;' >", "<select name='edr1c5' class='arialfont8' style='height:15px;'><option value='1'>Oregon</option></select>"],
["1","ROUTER1", "<input type='text' class='arialfont8' name='edr2c1' value='Router Rental' style='text-align: top; height: 30px; border-style: none;' >", "<input type='text' class='arialfont8' name='edr2c2' value='1' style='text-align: top; height: 30px; border-style: none;' >", "<input type='text' class='arialfont8' name='edr2c3' value='99.00' style='text-align: top; height: 30px; border-style: none;' >", "<input type='text' class='arialfont8' name='edr2c4' value='99.00' style='text-align: top; height: 30px; border-style: none;' >", "<select name='edr2c5' class='arialfont8' style='height:15px;'><option value='1'>Oregon</option></select>"],
["1","VOICE1", "<input type='text' class='arialfont8' name='edr3c1' value='Voice Line' style='text-align: top; height: 30px; border-style: none;' >", "<input type='text' class='arialfont8' name='edr3c2' value='1' style='text-align: top; height: 30px; border-style: none;' >", "<input type='text' class='arialfont8' name='edr3c3' value='99.00' style='text-align: top; height: 30px; border-style: none;' >", "<input type='text' class='arialfont8' name='edr3c4' value='99.00' style='text-align: top; height: 30px; border-style: none;' >", "<select name='edr3c5' class='arialfont8' style='height:15px;'><option value='1'>Oregon</option></select>"],
];

var myColumns = [ "ID", "Item Lookup", "Description", "Quantity", "Price", "Tax Price", "Tax Location"
];

works fine ;)
March 27,
More complicated way of doing same stuff:

var input = new Active.HTML.INPUT;
input.setClass("box", "input");
input.setAttribute("value", function(){return this.getItemProperty("text")});
obj.setTemplate("column", input, 3);

plus CSS:
.active-box-input {
border: none;
font: menu;
}
Alex (ActiveWidgets)
March 28,
I tried creating Editable cells as mentioned in the above note. It didn't
work out. Can you please help.
Vasu
April 5,
This might not be the best method of doing it, but in my project, I have the text inside the cells be links.

This is how I do it (using PHP):
var myData = new Array;

<?
    $url = "thispage.php";
    $field1 = "<a href='somelink.php?url=$thispage.php&field=field1' TARGET=_BLANK>Click Here</A>";
    $field2 = "<a href='somelink.php?url=$thispage.php&field=field2' TARGET=_BLANK>Click Here</A>";
    $field3 = "<a href='somelink.php?url=$thispage.php&field=field3' TARGET=_BLANK>Click Here</A>";
?>
myData.push(["<?=$field1?>", "<?=$field2?>", "<?=$field3?>"]);


The somelink.php file is a file that allows you to update the particular field you want to update in the database.
**[suppose]**
The somelink.php file had a form on it. That form would use the POST method to submit to somelinkbackend.php?url=<?=$url?>&field=<?=$field?>. The somelinkbackend.php file could update the database which the file with the Grid was using to fill the Grid.
**[/suppose]**
Then on the somelinkbackend.php file, I put in a little piece of javascript:

<script language="JavaScript">
<!--
function refreshParent() {
  	window.opener.location.href = '<?=$url?>';
  	if (window.opener.progressWindow)     				window.opener.progressWindow.close();
            window.close();
}
//-->
</script>
<body onLoad="refreshParent()">

Tim Claason
May 21,
Hi,

Cell editing? You would be happy if you find one that can do it.

Please see my demo site. http://nomiss.nttu.edu.tw/kridworld/colleges.asp

It is only for IE5.5+.


tykuo - Taiwan
tykuo
May 21,
http://www.activewidgets.com/messages/1087-17.htm

needs some tweaks, but see the bottom of the page

if you want I'll post the newest rev of grid.php

works in mozilla and ie

cell editing, adding rows and removing rows via javascript is supported

this uses activewidget's grid & template.input

Matt
May 25,
Excellent Matt. Good to see php boys beefing up this great app :D
Infolock (DevNetwork.net)
June 1,

This topic is archived.

See also:


Back to support forum