Home All Groups Group Topic Archive Search About

How to pass the selected row of a datagrid to another form

Author
14 Feb 2005 6:10 PM
ALI-R
hi all.
Can someone help me with this?
I have a Datagrid, and i would like to doubkle click on a cell and open
another form sending all the fields in that cell to the form for future
work, how can i do this?


Thanks for you help

Author
14 Feb 2005 6:32 PM
Elton Wang
doubkle click?

Are you talking about Win form or Web form?

Elton Wang

>-----Original Message-----
>hi all.
>Can someone help me with this?
>I have a Datagrid, and i would like to doubkle click on a
cell and open
>another form sending all the fields in that cell to the
form for future
Show quoteHide quote
>work, how can i do this?
>
>
>Thanks for you help
>
>
>.
>
Author
14 Feb 2005 6:57 PM
Eliyahu Goldin
It's pretty straightforward. Use ItemDataBind event to setup ondblclick
client event for every data row click. Something like

        private void dgSelection_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
        {
            ListItemType itemType = e.Item.ItemType;
            if ((itemType == ListItemType.Pager) ||
                (itemType == ListItemType.Header) ||
                (itemType == ListItemType.Footer))
            {
                return;
            }
            e.Item.Attributes["ondblclick"] = "onRowDblClick(this)";
        }

Javascript function onRowDblClick will look like this:
function onRowDblClick (row){
  call showModalDialog ("AnotherForm.aspx", row, "<features>");
  }

Eliyahu

Show quoteHide quote
"ALI-R" <new***@microsoft.com> wrote in message
news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
> hi all.
> Can someone help me with this?
> I have a Datagrid, and i would like to doubkle click on a cell and open
> another form sending all the fields in that cell to the form for future
> work, how can i do this?
>
>
> Thanks for you help
>
>
Author
14 Feb 2005 7:45 PM
Elton Wang
It is pretty good.

Elton Wang

Show quoteHide quote
>-----Original Message-----
>It's pretty straightforward. Use ItemDataBind event to
setup ondblclick
>client event for every data row click. Something like
>
>        private void dgSelection_ItemDataBound(object
sender,
>System.Web.UI.WebControls.DataGridItemEventArgs e)
>        {
>            ListItemType itemType = e.Item.ItemType;
>            if ((itemType == ListItemType.Pager) ||
>                (itemType == ListItemType.Header) ||
>                (itemType == ListItemType.Footer))
>            {
>                return;
>            }
>            e.Item.Attributes["ondblclick"]
= "onRowDblClick(this)";
>        }
>
>Javascript function onRowDblClick will look like this:
>function onRowDblClick (row){
>  call showModalDialog ("AnotherForm.aspx",
row, "<features>");
>  }
>
>Eliyahu
>
>"ALI-R" <new***@microsoft.com> wrote in message
>news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
>> hi all.
>> Can someone help me with this?
>> I have a Datagrid, and i would like to doubkle click on
a cell and open
>> another form sending all the fields in that cell to the
form for future
Show quoteHide quote
>> work, how can i do this?
>>
>>
>> Thanks for you help
>>
>>
>
>
>.
>
Author
14 Feb 2005 10:13 PM
ALI-R
I tried this:
> >Javascript function onRowDblClick will look like this:
> >function onRowDblClick (row){
> >  call showModalDialog ("AnotherForm.aspx",
> row, "<features>");

I got an script error ,I replaced it with this and it worked (did u write
psudo code)?
window.showModalDialog("AnotherForm.aspx",row);

thanks
Show quoteHide quote
"Elton Wang" <anonym***@discussions.microsoft.com> wrote in message
news:145b01c512cd$caa4a2b0$a501280a@phx.gbl...
> It is pretty good.
>
> Elton Wang
>
> >-----Original Message-----
> >It's pretty straightforward. Use ItemDataBind event to
> setup ondblclick
> >client event for every data row click. Something like
> >
> >        private void dgSelection_ItemDataBound(object
> sender,
> >System.Web.UI.WebControls.DataGridItemEventArgs e)
> >        {
> >            ListItemType itemType = e.Item.ItemType;
> >            if ((itemType == ListItemType.Pager) ||
> >                (itemType == ListItemType.Header) ||
> >                (itemType == ListItemType.Footer))
> >            {
> >                return;
> >            }
> >            e.Item.Attributes["ondblclick"]
> = "onRowDblClick(this)";
> >        }
> >
> >Javascript function onRowDblClick will look like this:
> >function onRowDblClick (row){
> >  call showModalDialog ("AnotherForm.aspx",
> row, "<features>");
> >  }
> >
> >Eliyahu
> >
> >"ALI-R" <new***@microsoft.com> wrote in message
> >news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
> >> hi all.
> >> Can someone help me with this?
> >> I have a Datagrid, and i would like to doubkle click on
> a cell and open
> >> another form sending all the fields in that cell to the
> form for future
> >> work, how can i do this?
> >>
> >>
> >> Thanks for you help
> >>
> >>
> >
> >
> >.
> >
Author
14 Feb 2005 10:19 PM
Eliyahu Goldin
Yes, it was a sort a pseudocode.

Show quoteHide quote
"ALI-R" <new***@microsoft.com> wrote in message
news:OmgjyJuEFHA.2728@TK2MSFTNGP10.phx.gbl...
> I tried this:
> > >Javascript function onRowDblClick will look like this:
> > >function onRowDblClick (row){
> > >  call showModalDialog ("AnotherForm.aspx",
> > row, "<features>");
>
> I got an script error ,I replaced it with this and it worked (did u write
> psudo code)?
> window.showModalDialog("AnotherForm.aspx",row);
>
> thanks
> "Elton Wang" <anonym***@discussions.microsoft.com> wrote in message
> news:145b01c512cd$caa4a2b0$a501280a@phx.gbl...
> > It is pretty good.
> >
> > Elton Wang
> >
> > >-----Original Message-----
> > >It's pretty straightforward. Use ItemDataBind event to
> > setup ondblclick
> > >client event for every data row click. Something like
> > >
> > >        private void dgSelection_ItemDataBound(object
> > sender,
> > >System.Web.UI.WebControls.DataGridItemEventArgs e)
> > >        {
> > >            ListItemType itemType = e.Item.ItemType;
> > >            if ((itemType == ListItemType.Pager) ||
> > >                (itemType == ListItemType.Header) ||
> > >                (itemType == ListItemType.Footer))
> > >            {
> > >                return;
> > >            }
> > >            e.Item.Attributes["ondblclick"]
> > = "onRowDblClick(this)";
> > >        }
> > >
> > >Javascript function onRowDblClick will look like this:
> > >function onRowDblClick (row){
> > >  call showModalDialog ("AnotherForm.aspx",
> > row, "<features>");
> > >  }
> > >
> > >Eliyahu
> > >
> > >"ALI-R" <new***@microsoft.com> wrote in message
> > >news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
> > >> hi all.
> > >> Can someone help me with this?
> > >> I have a Datagrid, and i would like to doubkle click on
> > a cell and open
> > >> another form sending all the fields in that cell to the
> > form for future
> > >> work, how can i do this?
> > >>
> > >>
> > >> Thanks for you help
> > >>
> > >>
> > >
> > >
> > >.
> > >
>
>
Author
14 Feb 2005 10:28 PM
ALI-R
I finally passed it to the modal form,in there I don't know how to set it to
a text box?

Show quoteHide quote
"Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
news:uwLcsLuEFHA.3416@TK2MSFTNGP10.phx.gbl...
> Yes, it was a sort a pseudocode.
>
> "ALI-R" <new***@microsoft.com> wrote in message
> news:OmgjyJuEFHA.2728@TK2MSFTNGP10.phx.gbl...
> > I tried this:
> > > >Javascript function onRowDblClick will look like this:
> > > >function onRowDblClick (row){
> > > >  call showModalDialog ("AnotherForm.aspx",
> > > row, "<features>");
> >
> > I got an script error ,I replaced it with this and it worked (did u
write
> > psudo code)?
> > window.showModalDialog("AnotherForm.aspx",row);
> >
> > thanks
> > "Elton Wang" <anonym***@discussions.microsoft.com> wrote in message
> > news:145b01c512cd$caa4a2b0$a501280a@phx.gbl...
> > > It is pretty good.
> > >
> > > Elton Wang
> > >
> > > >-----Original Message-----
> > > >It's pretty straightforward. Use ItemDataBind event to
> > > setup ondblclick
> > > >client event for every data row click. Something like
> > > >
> > > >        private void dgSelection_ItemDataBound(object
> > > sender,
> > > >System.Web.UI.WebControls.DataGridItemEventArgs e)
> > > >        {
> > > >            ListItemType itemType = e.Item.ItemType;
> > > >            if ((itemType == ListItemType.Pager) ||
> > > >                (itemType == ListItemType.Header) ||
> > > >                (itemType == ListItemType.Footer))
> > > >            {
> > > >                return;
> > > >            }
> > > >            e.Item.Attributes["ondblclick"]
> > > = "onRowDblClick(this)";
> > > >        }
> > > >
> > > >Javascript function onRowDblClick will look like this:
> > > >function onRowDblClick (row){
> > > >  call showModalDialog ("AnotherForm.aspx",
> > > row, "<features>");
> > > >  }
> > > >
> > > >Eliyahu
> > > >
> > > >"ALI-R" <new***@microsoft.com> wrote in message
> > > >news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
> > > >> hi all.
> > > >> Can someone help me with this?
> > > >> I have a Datagrid, and i would like to doubkle click on
> > > a cell and open
> > > >> another form sending all the fields in that cell to the
> > > form for future
> > > >> work, how can i do this?
> > > >>
> > > >>
> > > >> Thanks for you help
> > > >>
> > > >>
> > > >
> > > >
> > > >.
> > > >
> >
> >
>
>
Author
15 Feb 2005 8:15 AM
Eliyahu Goldin
It's not clear what exactly you are trying to achieve. Did you manage to
read the row parameter in the child form?

Eliyahu

Show quoteHide quote
"ALI-R" <new***@microsoft.com> wrote in message
news:O$%23e1RuEFHA.4052@TK2MSFTNGP09.phx.gbl...
> I finally passed it to the modal form,in there I don't know how to set it
to
> a text box?
>
> "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> news:uwLcsLuEFHA.3416@TK2MSFTNGP10.phx.gbl...
> > Yes, it was a sort a pseudocode.
> >
> > "ALI-R" <new***@microsoft.com> wrote in message
> > news:OmgjyJuEFHA.2728@TK2MSFTNGP10.phx.gbl...
> > > I tried this:
> > > > >Javascript function onRowDblClick will look like this:
> > > > >function onRowDblClick (row){
> > > > >  call showModalDialog ("AnotherForm.aspx",
> > > > row, "<features>");
> > >
> > > I got an script error ,I replaced it with this and it worked (did u
> write
> > > psudo code)?
> > > window.showModalDialog("AnotherForm.aspx",row);
> > >
> > > thanks
> > > "Elton Wang" <anonym***@discussions.microsoft.com> wrote in message
> > > news:145b01c512cd$caa4a2b0$a501280a@phx.gbl...
> > > > It is pretty good.
> > > >
> > > > Elton Wang
> > > >
> > > > >-----Original Message-----
> > > > >It's pretty straightforward. Use ItemDataBind event to
> > > > setup ondblclick
> > > > >client event for every data row click. Something like
> > > > >
> > > > >        private void dgSelection_ItemDataBound(object
> > > > sender,
> > > > >System.Web.UI.WebControls.DataGridItemEventArgs e)
> > > > >        {
> > > > >            ListItemType itemType = e.Item.ItemType;
> > > > >            if ((itemType == ListItemType.Pager) ||
> > > > >                (itemType == ListItemType.Header) ||
> > > > >                (itemType == ListItemType.Footer))
> > > > >            {
> > > > >                return;
> > > > >            }
> > > > >            e.Item.Attributes["ondblclick"]
> > > > = "onRowDblClick(this)";
> > > > >        }
> > > > >
> > > > >Javascript function onRowDblClick will look like this:
> > > > >function onRowDblClick (row){
> > > > >  call showModalDialog ("AnotherForm.aspx",
> > > > row, "<features>");
> > > > >  }
> > > > >
> > > > >Eliyahu
> > > > >
> > > > >"ALI-R" <new***@microsoft.com> wrote in message
> > > > >news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
> > > > >> hi all.
> > > > >> Can someone help me with this?
> > > > >> I have a Datagrid, and i would like to doubkle click on
> > > > a cell and open
> > > > >> another form sending all the fields in that cell to the
> > > > form for future
> > > > >> work, how can i do this?
> > > > >>
> > > > >>
> > > > >> Thanks for you help
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > >.
> > > > >
> > >
> > >
> >
> >
>
>
Author
15 Feb 2005 8:18 PM
ALI-R
That's eaxctly what I am going to do,I mean I'd like to read the row
paramtere in the child form and pass it to a textbox.
Thanks
Show quoteHide quote
"Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
news:uH6RNYzEFHA.3376@TK2MSFTNGP12.phx.gbl...
> It's not clear what exactly you are trying to achieve. Did you manage to
> read the row parameter in the child form?
>
> Eliyahu
>
> "ALI-R" <new***@microsoft.com> wrote in message
> news:O$%23e1RuEFHA.4052@TK2MSFTNGP09.phx.gbl...
> > I finally passed it to the modal form,in there I don't know how to set
it
> to
> > a text box?
> >
> > "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> > news:uwLcsLuEFHA.3416@TK2MSFTNGP10.phx.gbl...
> > > Yes, it was a sort a pseudocode.
> > >
> > > "ALI-R" <new***@microsoft.com> wrote in message
> > > news:OmgjyJuEFHA.2728@TK2MSFTNGP10.phx.gbl...
> > > > I tried this:
> > > > > >Javascript function onRowDblClick will look like this:
> > > > > >function onRowDblClick (row){
> > > > > >  call showModalDialog ("AnotherForm.aspx",
> > > > > row, "<features>");
> > > >
> > > > I got an script error ,I replaced it with this and it worked (did u
> > write
> > > > psudo code)?
> > > > window.showModalDialog("AnotherForm.aspx",row);
> > > >
> > > > thanks
> > > > "Elton Wang" <anonym***@discussions.microsoft.com> wrote in message
> > > > news:145b01c512cd$caa4a2b0$a501280a@phx.gbl...
> > > > > It is pretty good.
> > > > >
> > > > > Elton Wang
> > > > >
> > > > > >-----Original Message-----
> > > > > >It's pretty straightforward. Use ItemDataBind event to
> > > > > setup ondblclick
> > > > > >client event for every data row click. Something like
> > > > > >
> > > > > >        private void dgSelection_ItemDataBound(object
> > > > > sender,
> > > > > >System.Web.UI.WebControls.DataGridItemEventArgs e)
> > > > > >        {
> > > > > >            ListItemType itemType = e.Item.ItemType;
> > > > > >            if ((itemType == ListItemType.Pager) ||
> > > > > >                (itemType == ListItemType.Header) ||
> > > > > >                (itemType == ListItemType.Footer))
> > > > > >            {
> > > > > >                return;
> > > > > >            }
> > > > > >            e.Item.Attributes["ondblclick"]
> > > > > = "onRowDblClick(this)";
> > > > > >        }
> > > > > >
> > > > > >Javascript function onRowDblClick will look like this:
> > > > > >function onRowDblClick (row){
> > > > > >  call showModalDialog ("AnotherForm.aspx",
> > > > > row, "<features>");
> > > > > >  }
> > > > > >
> > > > > >Eliyahu
> > > > > >
> > > > > >"ALI-R" <new***@microsoft.com> wrote in message
> > > > > >news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
> > > > > >> hi all.
> > > > > >> Can someone help me with this?
> > > > > >> I have a Datagrid, and i would like to doubkle click on
> > > > > a cell and open
> > > > > >> another form sending all the fields in that cell to the
> > > > > form for future
> > > > > >> work, how can i do this?
> > > > > >>
> > > > > >>
> > > > > >> Thanks for you help
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >
> > > > > >.
> > > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Author
16 Feb 2005 9:17 AM
Eliyahu Goldin
You should do it on client side with javascript, for example in <body
onload...> event. The parameter is available as window.dialogArguments
property. Once you get it, you can set the value of the textbox in the same
javascript.

Eliyahu

Show quoteHide quote
"ALI-R" <new***@microsoft.com> wrote in message
news:%23U0vRu5EFHA.2832@TK2MSFTNGP14.phx.gbl...
> That's eaxctly what I am going to do,I mean I'd like to read the row
> paramtere in the child form and pass it to a textbox.
> Thanks
> "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> news:uH6RNYzEFHA.3376@TK2MSFTNGP12.phx.gbl...
> > It's not clear what exactly you are trying to achieve. Did you manage to
> > read the row parameter in the child form?
> >
> > Eliyahu
> >
> > "ALI-R" <new***@microsoft.com> wrote in message
> > news:O$%23e1RuEFHA.4052@TK2MSFTNGP09.phx.gbl...
> > > I finally passed it to the modal form,in there I don't know how to set
> it
> > to
> > > a text box?
> > >
> > > "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> > > news:uwLcsLuEFHA.3416@TK2MSFTNGP10.phx.gbl...
> > > > Yes, it was a sort a pseudocode.
> > > >
> > > > "ALI-R" <new***@microsoft.com> wrote in message
> > > > news:OmgjyJuEFHA.2728@TK2MSFTNGP10.phx.gbl...
> > > > > I tried this:
> > > > > > >Javascript function onRowDblClick will look like this:
> > > > > > >function onRowDblClick (row){
> > > > > > >  call showModalDialog ("AnotherForm.aspx",
> > > > > > row, "<features>");
> > > > >
> > > > > I got an script error ,I replaced it with this and it worked (did
u
> > > write
> > > > > psudo code)?
> > > > > window.showModalDialog("AnotherForm.aspx",row);
> > > > >
> > > > > thanks
> > > > > "Elton Wang" <anonym***@discussions.microsoft.com> wrote in
message
> > > > > news:145b01c512cd$caa4a2b0$a501280a@phx.gbl...
> > > > > > It is pretty good.
> > > > > >
> > > > > > Elton Wang
> > > > > >
> > > > > > >-----Original Message-----
> > > > > > >It's pretty straightforward. Use ItemDataBind event to
> > > > > > setup ondblclick
> > > > > > >client event for every data row click. Something like
> > > > > > >
> > > > > > >        private void dgSelection_ItemDataBound(object
> > > > > > sender,
> > > > > > >System.Web.UI.WebControls.DataGridItemEventArgs e)
> > > > > > >        {
> > > > > > >            ListItemType itemType = e.Item.ItemType;
> > > > > > >            if ((itemType == ListItemType.Pager) ||
> > > > > > >                (itemType == ListItemType.Header) ||
> > > > > > >                (itemType == ListItemType.Footer))
> > > > > > >            {
> > > > > > >                return;
> > > > > > >            }
> > > > > > >            e.Item.Attributes["ondblclick"]
> > > > > > = "onRowDblClick(this)";
> > > > > > >        }
> > > > > > >
> > > > > > >Javascript function onRowDblClick will look like this:
> > > > > > >function onRowDblClick (row){
> > > > > > >  call showModalDialog ("AnotherForm.aspx",
> > > > > > row, "<features>");
> > > > > > >  }
> > > > > > >
> > > > > > >Eliyahu
> > > > > > >
> > > > > > >"ALI-R" <new***@microsoft.com> wrote in message
> > > > > > >news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
> > > > > > >> hi all.
> > > > > > >> Can someone help me with this?
> > > > > > >> I have a Datagrid, and i would like to doubkle click on
> > > > > > a cell and open
> > > > > > >> another form sending all the fields in that cell to the
> > > > > > form for future
> > > > > > >> work, how can i do this?
> > > > > > >>
> > > > > > >>
> > > > > > >> Thanks for you help
> > > > > > >>
> > > > > > >>
> > > > > > >
> > > > > > >
> > > > > > >.
> > > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Author
16 Feb 2005 6:17 PM
ALI-R
but when I use the window.dialogArguments,it returns an "object".How can I
get the value of that object in my javascript code?


Show quoteHide quote
"Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
news:%234TNofAFFHA.3384@tk2msftngp13.phx.gbl...
> You should do it on client side with javascript, for example in <body
> onload...> event. The parameter is available as window.dialogArguments
> property. Once you get it, you can set the value of the textbox in the
same
> javascript.
>
> Eliyahu
>
> "ALI-R" <new***@microsoft.com> wrote in message
> news:%23U0vRu5EFHA.2832@TK2MSFTNGP14.phx.gbl...
> > That's eaxctly what I am going to do,I mean I'd like to read the row
> > paramtere in the child form and pass it to a textbox.
> > Thanks
> > "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> > news:uH6RNYzEFHA.3376@TK2MSFTNGP12.phx.gbl...
> > > It's not clear what exactly you are trying to achieve. Did you manage
to
> > > read the row parameter in the child form?
> > >
> > > Eliyahu
> > >
> > > "ALI-R" <new***@microsoft.com> wrote in message
> > > news:O$%23e1RuEFHA.4052@TK2MSFTNGP09.phx.gbl...
> > > > I finally passed it to the modal form,in there I don't know how to
set
> > it
> > > to
> > > > a text box?
> > > >
> > > > "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> > > > news:uwLcsLuEFHA.3416@TK2MSFTNGP10.phx.gbl...
> > > > > Yes, it was a sort a pseudocode.
> > > > >
> > > > > "ALI-R" <new***@microsoft.com> wrote in message
> > > > > news:OmgjyJuEFHA.2728@TK2MSFTNGP10.phx.gbl...
> > > > > > I tried this:
> > > > > > > >Javascript function onRowDblClick will look like this:
> > > > > > > >function onRowDblClick (row){
> > > > > > > >  call showModalDialog ("AnotherForm.aspx",
> > > > > > > row, "<features>");
> > > > > >
> > > > > > I got an script error ,I replaced it with this and it worked
(did
> u
> > > > write
> > > > > > psudo code)?
> > > > > > window.showModalDialog("AnotherForm.aspx",row);
> > > > > >
> > > > > > thanks
> > > > > > "Elton Wang" <anonym***@discussions.microsoft.com> wrote in
> message
> > > > > > news:145b01c512cd$caa4a2b0$a501280a@phx.gbl...
> > > > > > > It is pretty good.
> > > > > > >
> > > > > > > Elton Wang
> > > > > > >
> > > > > > > >-----Original Message-----
> > > > > > > >It's pretty straightforward. Use ItemDataBind event to
> > > > > > > setup ondblclick
> > > > > > > >client event for every data row click. Something like
> > > > > > > >
> > > > > > > >        private void dgSelection_ItemDataBound(object
> > > > > > > sender,
> > > > > > > >System.Web.UI.WebControls.DataGridItemEventArgs e)
> > > > > > > >        {
> > > > > > > >            ListItemType itemType = e.Item.ItemType;
> > > > > > > >            if ((itemType == ListItemType.Pager) ||
> > > > > > > >                (itemType == ListItemType.Header) ||
> > > > > > > >                (itemType == ListItemType.Footer))
> > > > > > > >            {
> > > > > > > >                return;
> > > > > > > >            }
> > > > > > > >            e.Item.Attributes["ondblclick"]
> > > > > > > = "onRowDblClick(this)";
> > > > > > > >        }
> > > > > > > >
> > > > > > > >Javascript function onRowDblClick will look like this:
> > > > > > > >function onRowDblClick (row){
> > > > > > > >  call showModalDialog ("AnotherForm.aspx",
> > > > > > > row, "<features>");
> > > > > > > >  }
> > > > > > > >
> > > > > > > >Eliyahu
> > > > > > > >
> > > > > > > >"ALI-R" <new***@microsoft.com> wrote in message
> > > > > > > >news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
> > > > > > > >> hi all.
> > > > > > > >> Can someone help me with this?
> > > > > > > >> I have a Datagrid, and i would like to doubkle click on
> > > > > > > a cell and open
> > > > > > > >> another form sending all the fields in that cell to the
> > > > > > > form for future
> > > > > > > >> work, how can i do this?
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> Thanks for you help
> > > > > > > >>
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > > >.
> > > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Author
16 Feb 2005 6:26 PM
Eliyahu Goldin
it's a variant. it will be of the same type you've passed. in your case you
will get the row.

Eliyahu

Show quoteHide quote
"ALI-R" <new***@microsoft.com> wrote in message
news:%23XJ%23KPFFFHA.2052@TK2MSFTNGP09.phx.gbl...
> but when I use the window.dialogArguments,it returns an "object".How can I
> get the value of that object in my javascript code?
>
>
> "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> news:%234TNofAFFHA.3384@tk2msftngp13.phx.gbl...
> > You should do it on client side with javascript, for example in <body
> > onload...> event. The parameter is available as window.dialogArguments
> > property. Once you get it, you can set the value of the textbox in the
> same
> > javascript.
> >
> > Eliyahu
> >
> > "ALI-R" <new***@microsoft.com> wrote in message
> > news:%23U0vRu5EFHA.2832@TK2MSFTNGP14.phx.gbl...
> > > That's eaxctly what I am going to do,I mean I'd like to read the row
> > > paramtere in the child form and pass it to a textbox.
> > > Thanks
> > > "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> > > news:uH6RNYzEFHA.3376@TK2MSFTNGP12.phx.gbl...
> > > > It's not clear what exactly you are trying to achieve. Did you
manage
> to
> > > > read the row parameter in the child form?
> > > >
> > > > Eliyahu
> > > >
> > > > "ALI-R" <new***@microsoft.com> wrote in message
> > > > news:O$%23e1RuEFHA.4052@TK2MSFTNGP09.phx.gbl...
> > > > > I finally passed it to the modal form,in there I don't know how to
> set
> > > it
> > > > to
> > > > > a text box?
> > > > >
> > > > > "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> > > > > news:uwLcsLuEFHA.3416@TK2MSFTNGP10.phx.gbl...
> > > > > > Yes, it was a sort a pseudocode.
> > > > > >
> > > > > > "ALI-R" <new***@microsoft.com> wrote in message
> > > > > > news:OmgjyJuEFHA.2728@TK2MSFTNGP10.phx.gbl...
> > > > > > > I tried this:
> > > > > > > > >Javascript function onRowDblClick will look like this:
> > > > > > > > >function onRowDblClick (row){
> > > > > > > > >  call showModalDialog ("AnotherForm.aspx",
> > > > > > > > row, "<features>");
> > > > > > >
> > > > > > > I got an script error ,I replaced it with this and it worked
> (did
> > u
> > > > > write
> > > > > > > psudo code)?
> > > > > > > window.showModalDialog("AnotherForm.aspx",row);
> > > > > > >
> > > > > > > thanks
> > > > > > > "Elton Wang" <anonym***@discussions.microsoft.com> wrote in
> > message
> > > > > > > news:145b01c512cd$caa4a2b0$a501280a@phx.gbl...
> > > > > > > > It is pretty good.
> > > > > > > >
> > > > > > > > Elton Wang
> > > > > > > >
> > > > > > > > >-----Original Message-----
> > > > > > > > >It's pretty straightforward. Use ItemDataBind event to
> > > > > > > > setup ondblclick
> > > > > > > > >client event for every data row click. Something like
> > > > > > > > >
> > > > > > > > >        private void dgSelection_ItemDataBound(object
> > > > > > > > sender,
> > > > > > > > >System.Web.UI.WebControls.DataGridItemEventArgs e)
> > > > > > > > >        {
> > > > > > > > >            ListItemType itemType = e.Item.ItemType;
> > > > > > > > >            if ((itemType == ListItemType.Pager) ||
> > > > > > > > >                (itemType == ListItemType.Header) ||
> > > > > > > > >                (itemType == ListItemType.Footer))
> > > > > > > > >            {
> > > > > > > > >                return;
> > > > > > > > >            }
> > > > > > > > >            e.Item.Attributes["ondblclick"]
> > > > > > > > = "onRowDblClick(this)";
> > > > > > > > >        }
> > > > > > > > >
> > > > > > > > >Javascript function onRowDblClick will look like this:
> > > > > > > > >function onRowDblClick (row){
> > > > > > > > >  call showModalDialog ("AnotherForm.aspx",
> > > > > > > > row, "<features>");
> > > > > > > > >  }
> > > > > > > > >
> > > > > > > > >Eliyahu
> > > > > > > > >
> > > > > > > > >"ALI-R" <new***@microsoft.com> wrote in message
> > > > > > > > >news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
> > > > > > > > >> hi all.
> > > > > > > > >> Can someone help me with this?
> > > > > > > > >> I have a Datagrid, and i would like to doubkle click on
> > > > > > > > a cell and open
> > > > > > > > >> another form sending all the fields in that cell to the
> > > > > > > > form for future
> > > > > > > > >> work, how can i do this?
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >> Thanks for you help
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >.
> > > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Author
14 Feb 2005 9:25 PM
ALI-R
I'm actually using a mobile form for that respect,but I think it has the
same fuctions as a win form.
What I did (which I don't like at all) is that I passed the caller form to
the child form's constructor(having the required fields defined as public in
the caller form)  ,,in the child form then I set the fields to the selected
row's values.

Can u suggest me a better way of doing that in windows forms?
Thanks (I like the asp.net version too:-))
Show quoteHide quote
"Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
news:e2T13asEFHA.3636@TK2MSFTNGP09.phx.gbl...
> It's pretty straightforward. Use ItemDataBind event to setup ondblclick
> client event for every data row click. Something like
>
>         private void dgSelection_ItemDataBound(object sender,
> System.Web.UI.WebControls.DataGridItemEventArgs e)
>         {
>             ListItemType itemType = e.Item.ItemType;
>             if ((itemType == ListItemType.Pager) ||
>                 (itemType == ListItemType.Header) ||
>                 (itemType == ListItemType.Footer))
>             {
>                 return;
>             }
>             e.Item.Attributes["ondblclick"] = "onRowDblClick(this)";
>         }
>
> Javascript function onRowDblClick will look like this:
> function onRowDblClick (row){
>   call showModalDialog ("AnotherForm.aspx", row, "<features>");
>   }
>
> Eliyahu
>
> "ALI-R" <new***@microsoft.com> wrote in message
> news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
> > hi all.
> > Can someone help me with this?
> > I have a Datagrid, and i would like to doubkle click on a cell and open
> > another form sending all the fields in that cell to the form for future
> > work, how can i do this?
> >
> >
> > Thanks for you help
> >
> >
>
>
Author
15 Feb 2005 12:55 AM
Elton Wang
For win form, your approach of passing caller to child
form via constructor is good. Or you can have a public
write only property in child form to pass caller to it.

For web form, you can save object to Session, then in new
page retrieve the object from Session.

HTH,

Elton Wang
elton_w***@hotmail.com

>-----Original Message-----
>I'm actually using a mobile form for that respect,but I
think it has the
>same fuctions as a win form.
>What I did (which I don't like at all) is that I passed
the caller form to
>the child form's constructor(having the required fields
defined as public in
>the caller form)  ,,in the child form then I set the
fields to the selected
Show quoteHide quote
>row's values.
>
>Can u suggest me a better way of doing that in windows
forms?
>Thanks (I like the asp.net version too:-))
>"Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote
in message
>news:e2T13asEFHA.3636@TK2MSFTNGP09.phx.gbl...
>> It's pretty straightforward. Use ItemDataBind event to
setup ondblclick
>> client event for every data row click. Something like
>>
>>         private void dgSelection_ItemDataBound(object
sender,
>> System.Web.UI.WebControls.DataGridItemEventArgs e)
>>         {
>>             ListItemType itemType = e.Item.ItemType;
>>             if ((itemType == ListItemType.Pager) ||
>>                 (itemType == ListItemType.Header) ||
>>                 (itemType == ListItemType.Footer))
>>             {
>>                 return;
>>             }
>>             e.Item.Attributes["ondblclick"]
= "onRowDblClick(this)";
>>         }
>>
>> Javascript function onRowDblClick will look like this:
>> function onRowDblClick (row){
>>   call showModalDialog ("AnotherForm.aspx",
row, "<features>");
>>   }
>>
>> Eliyahu
>>
>> "ALI-R" <new***@microsoft.com> wrote in message
>> news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
>> > hi all.
>> > Can someone help me with this?
>> > I have a Datagrid, and i would like to doubkle click
on a cell and open
>> > another form sending all the fields in that cell to
the form for future
Show quoteHide quote
>> > work, how can i do this?
>> >
>> >
>> > Thanks for you help
>> >
>> >
>>
>>
>
>
>.
>
Author
15 Feb 2005 2:44 AM
ALI-R
Thanks Elton,I'll remmeber it for web forms
Show quoteHide quote
"Elton Wang" <anonym***@discussions.microsoft.com> wrote in message
news:024e01c512f8$fde35290$a601280a@phx.gbl...
> For win form, your approach of passing caller to child
> form via constructor is good. Or you can have a public
> write only property in child form to pass caller to it.
>
> For web form, you can save object to Session, then in new
> page retrieve the object from Session.
>
> HTH,
>
> Elton Wang
> elton_w***@hotmail.com
>
>>-----Original Message-----
>>I'm actually using a mobile form for that respect,but I
> think it has the
>>same fuctions as a win form.
>>What I did (which I don't like at all) is that I passed
> the caller form to
>>the child form's constructor(having the required fields
> defined as public in
>>the caller form)  ,,in the child form then I set the
> fields to the selected
>>row's values.
>>
>>Can u suggest me a better way of doing that in windows
> forms?
>>Thanks (I like the asp.net version too:-))
>>"Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote
> in message
>>news:e2T13asEFHA.3636@TK2MSFTNGP09.phx.gbl...
>>> It's pretty straightforward. Use ItemDataBind event to
> setup ondblclick
>>> client event for every data row click. Something like
>>>
>>>         private void dgSelection_ItemDataBound(object
> sender,
>>> System.Web.UI.WebControls.DataGridItemEventArgs e)
>>>         {
>>>             ListItemType itemType = e.Item.ItemType;
>>>             if ((itemType == ListItemType.Pager) ||
>>>                 (itemType == ListItemType.Header) ||
>>>                 (itemType == ListItemType.Footer))
>>>             {
>>>                 return;
>>>             }
>>>             e.Item.Attributes["ondblclick"]
> = "onRowDblClick(this)";
>>>         }
>>>
>>> Javascript function onRowDblClick will look like this:
>>> function onRowDblClick (row){
>>>   call showModalDialog ("AnotherForm.aspx",
> row, "<features>");
>>>   }
>>>
>>> Eliyahu
>>>
>>> "ALI-R" <new***@microsoft.com> wrote in message
>>> news:Op92vBsEFHA.1188@tk2msftngp13.phx.gbl...
>>> > hi all.
>>> > Can someone help me with this?
>>> > I have a Datagrid, and i would like to doubkle click
> on a cell and open
>>> > another form sending all the fields in that cell to
> the form for future
>>> > work, how can i do this?
>>> >
>>> >
>>> > Thanks for you help
>>> >
>>> >
>>>
>>>
>>
>>
>>.
>>