Showing posts with label item. Show all posts
Showing posts with label item. Show all posts

Friday, March 16, 2012

Passing a variable in the onLoad event.

I have a data grid with multiple rows. Each row has a drop down box. I need
it to select the correct item for each row. What I am trying to figure out,
is can I pass a value to the onLoad event for the dropdownlist?

OnLoad="loadDefault(Container.DataItem("dropValue"))"Are you trying to put a selected index?

"Robin Bonin" <robin@.guavatools.com> wrote in message
news:Sr6dnWpfNfAlKIiiXTWJiA@.eatel.net...
> I have a data grid with multiple rows. Each row has a drop down box. I
need
> it to select the correct item for each row. What I am trying to figure
out,
> is can I pass a value to the onLoad event for the dropdownlist?
> OnLoad="loadDefault(Container.DataItem("dropValue"))"
I know the value of the selectedIndex, and that is what I'm trying to
select.

"Cristian Suazo" <crillus7@.hotmail.com> wrote in message
news:O$93Kq9SDHA.1724@.TK2MSFTNGP10.phx.gbl...
> Are you trying to put a selected index?
> "Robin Bonin" <robin@.guavatools.com> wrote in message
> news:Sr6dnWpfNfAlKIiiXTWJiA@.eatel.net...
> > I have a data grid with multiple rows. Each row has a drop down box. I
> need
> > it to select the correct item for each row. What I am trying to figure
> out,
> > is can I pass a value to the onLoad event for the dropdownlist?
> > OnLoad="loadDefault(Container.DataItem("dropValue"))"
Just set the selected index in the code behind: myDropDown.SelectedIndex =
intSelectedIndex

--
S. Justin Gengo, MCP
Web Developer / Programmer

Free Code Library At:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche

"Robin Bonin" <robin@.guavatools.com> wrote in message
news:foidna-hLOZ1JIiiXTWJjg@.eatel.net...
> I know the value of the selectedIndex, and that is what I'm trying to
> select.
>
> "Cristian Suazo" <crillus7@.hotmail.com> wrote in message
> news:O$93Kq9SDHA.1724@.TK2MSFTNGP10.phx.gbl...
> > Are you trying to put a selected index?
> > "Robin Bonin" <robin@.guavatools.com> wrote in message
> > news:Sr6dnWpfNfAlKIiiXTWJiA@.eatel.net...
> > > I have a data grid with multiple rows. Each row has a drop down box. I
> > need
> > > it to select the correct item for each row. What I am trying to figure
> > out,
> > > is can I pass a value to the onLoad event for the dropdownlist?
> > > > OnLoad="loadDefault(Container.DataItem("dropValue"))"
> >

passing a variable to frame from a datagrid...

Hi,
what i want to do is when i click on an item on a datagrid,the selected item would be sent to other frame.
I use javascript to send data to other frame. But problem is when i select item, first javascript called and then method called. Do you know how to call method first and then javascript function..or do you have any idea to do same thing?

Thank you very much!are you dnamically loading a new page in the frame?

if so, pass parameters in the url like "page.aspx?param=value"

then in the page, look at the Request.Params property to get the values.

or set a session variable in the main page, and read it out in the frame page
No, the page in the frame is not dynamically loading.
Do you know how to refresh a page in a frame from other frame?

thanks