:: Forum >> Version 1 >>

DataGrid Row Select

Hey All...can we add a row select event on the datagrid and get the row number on the server side ...for eg...if i want to use this gird instead of the asp.net datagrid and still be able to used events like item command how can i do it...i would appreciate any help on that...thnx
Tej
Thursday, June 10, 2004
Well Tej I just started to look at this control my self for just thes same reasons. 2 days ago I found this page and since then I have tried to get it to work in a .Net enviorment. Row select event could be a little tricky since you have to build a new server side control to house the AW Grid. Then you have to fix the post back handling and there my time run out. I will do this in JavaScript instead and redirect to it self but with a querystring argument on it. Since my work has to be read on Wednseday next week I can't fool around a lot. Then use a .aspx page that returns XML to fill the GRID.

Hopefully this gave you a little tip on how to use the control in a .NET solution. Anyone else that has already done this...Please let us know..
NRJ
Thursday, June 10, 2004
i do it in php using a hidden form-field and some javascript:

<script type="text/javascript>

/* Make grid */
var obj = new Active.Controls.Grid;
.
. /* insert all custom grid-code here */
.


function post_form() {
document.testform.post_var=obj.getProperty("selection/index");
document.testform.submit();
}
</script>

<form name="testform">
<input type="hidden" name="post_var" value="">
<input type="button" name="Submit" value="Submit" onClick='post_form'>
</form>


Hope this helps..
Jo
Monday, June 14, 2004
whoops. made a little mistake:

function post_form() {
document.testform.post_var.value=obj.getProperty("selection/index");
document.testform.submit();
}
Jo
Monday, June 14, 2004
I actually do it with a Visual Foxpro CGI , so I have full control over a database from the page. Also retrieve the arrays dataset and column headers from a Memo field from a temporary cursor created by a select.
Carlos
Monday, August 23, 2004



This topic is archived.

Back to support forum

Forum search