Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > ...Accessing a datagrid across frames...

Reply
Thread Tools

...Accessing a datagrid across frames...

 
 
dj Bass
Guest
Posts: n/a
 
      07-16-2003
I've got a situaion where there's one frame with a load of buttons, acting
as a small control panel, with a datagrid object existing in another frame.

On clicking on one button on the top frame, I want to be able to access the
instance that is being displayed onscreen of the grid, because it contains,
among other things, a column of check boxes, who's state is lost if i
manually refresh it from the other frame via scripting.

What I want to do is when clicking a button in the top, pick out all items
in the datagrid in the frame below that have been "selected", that is,
checked off.

Any ideas as to an approach for this?
Is there a way, for example, to access the object in another page as it
exists, and drive it externally, calling methods on already existing
instance of that object?

Thanks for your comments.
Daniel.


 
Reply With Quote
 
 
 
 
Vidar Petursson
Guest
Posts: n/a
 
      07-16-2003
Hi

I am not totally sure what you want... Do you simply want to store the
checked checkboxes in the other frame?

var myCheckBoxArr = new Array();
function storeCheckedBoxes(){
with(parent.FRAMENAME.document.forms[0])
{
for(i=0;i<elements.length;i++)
{
if(elements[i].type == "checkbox") if(elements[i].checked)
myCheckBoxArr.push(elements[i].name);
}
}
}

This will store the checked checkboxes names in the Array

Or for newer browsers
document.getElementsByTagName("CHECKBOX");

More info
http://msdn.microsoft.com/library/de...sbytagname.asp
http://msdn.microsoft.com/library/de...s/elements.asp

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"dj Bass" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've got a situaion where there's one frame with a load of buttons, acting
> as a small control panel, with a datagrid object existing in another

frame.
>
> On clicking on one button on the top frame, I want to be able to access

the
> instance that is being displayed onscreen of the grid, because it

contains,
> among other things, a column of check boxes, who's state is lost if i
> manually refresh it from the other frame via scripting.
>
> What I want to do is when clicking a button in the top, pick out all items
> in the datagrid in the frame below that have been "selected", that is,
> checked off.
>
> Any ideas as to an approach for this?
> Is there a way, for example, to access the object in another page as it
> exists, and drive it externally, calling methods on already existing
> instance of that object?
>
> Thanks for your comments.
> Daniel.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding rows to DataGrid across multiple PostBacks Andrew ASP .Net 2 02-29-2008 12:09 PM
Format datagrid across several columns Andy ASP .Net 0 05-08-2006 02:18 PM
Transfer DataGrid across frames dot net ASP .Net Datagrid Control 1 07-07-2004 08:29 AM
Adding rows to DataGrid across multiple PostBacks Andrew ASP .Net Datagrid Control 1 02-04-2004 05:49 AM
...Accessing a datagrid across frames... dj Bass ASP .Net 1 07-16-2003 06:34 PM



Advertisments