|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to pass the selected row of a datagrid to another formhi 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 doubkle click?
Are you talking about Win form or Web form? Elton Wang >-----Original Message----- cell and open>hi all. >Can someone help me with this? >I have a Datagrid, and i would like to doubkle click on a >another form sending all the fields in that cell to the form for futureShow quoteHide quote >work, how can i do this? > > >Thanks for you help > > >. > 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 > > It is pretty good.
Elton Wang Show quoteHide quote >-----Original Message----- row, "<features>");>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", > } a cell and open> >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 >> another form sending all the fields in that cell to the form for futureShow quoteHide quote >> work, how can i do this? >> >> >> Thanks for you help >> >> > > >. > I tried this:
> >Javascript function onRowDblClick will look like this: I got an script error ,I replaced it with this and it worked (did u write> >function onRowDblClick (row){ > > call showModalDialog ("AnotherForm.aspx", > row, "<features>"); 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 > >> > >> > > > > > >. > > 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 > > >> > > >> > > > > > > > > >. > > > > > 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 > > > >> > > > >> > > > > > > > > > > > >. > > > > > > > > > > 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 > > > > >> > > > > >> > > > > > > > > > > > > > > >. > > > > > > > > > > > > > > > > > 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 > > > > > >> > > > > > >> > > > > > > > > > > > > > > > > > >. > > > > > > > > > > > > > > > > > > > > > > > > > > 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 > > > > > > >> > > > > > > >> > > > > > > > > > > > > > > > > > > > > >. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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 > > > > > > > >> > > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > >. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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 > > > > > > > > >> > > > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > >. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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 > > > > > > 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----- think it has the>I'm actually using a mobile form for that respect,but I >same fuctions as a win form. the caller form to>What I did (which I don't like at all) is that I passed >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 selectedShow quoteHide quote >row's values. row, "<features>");> >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", >> } on a cell and open>> >> 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 >> > another form sending all the fields in that cell to the form for futureShow quoteHide quote >> > work, how can i do this? >> > >> > >> > Thanks for you help >> > >> > >> >> > > >. > 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 >>> > >>> > >>> >>> >> >> >>. >>
Datagrid Dropdownlist in default in edit mode
"parent / child" datagrids Datagrid ... pain .... HELP! CancelCommand Not Firing! problem updating in datagrid ?? How to refresh a parent grid? Set column names to template grid at runtime HyperLink column datagrid Hyperlink Column Event Handler... Datagrid Footer now showing up correctly |
|||||||||||||||||||||||