Dropdownlist should trigger the panel
-
hello every body i have a datagrid which is inside an Update panel, which contains a Dropdownlist with options "YES" and "No". on the Other End i have 2 panels namely p1 and p2 which is outside the UpdatePanel where p1 and p2 on form load visiblibity is set to False now my intention is to make p2 visbile=true on selecting the Dropdownlist which is inside the Datagrid Ex if dropdownlist ="YES" then p1.visible=true else p2.visible= false Thanks in Advance DevKranth
-
hello every body i have a datagrid which is inside an Update panel, which contains a Dropdownlist with options "YES" and "No". on the Other End i have 2 panels namely p1 and p2 which is outside the UpdatePanel where p1 and p2 on form load visiblibity is set to False now my intention is to make p2 visbile=true on selecting the Dropdownlist which is inside the Datagrid Ex if dropdownlist ="YES" then p1.visible=true else p2.visible= false Thanks in Advance DevKranth
hi write the bubble event means write one protected functions like protected void visiblePanel(object sender, EventArgs e) { if dropdownlist ="YES" then p1.visible=true else p2.visible= false } in html set autopostback of drp to true and set the on OnSelectedIndexChanged = visiblePanel
-
hello every body i have a datagrid which is inside an Update panel, which contains a Dropdownlist with options "YES" and "No". on the Other End i have 2 panels namely p1 and p2 which is outside the UpdatePanel where p1 and p2 on form load visiblibity is set to False now my intention is to make p2 visbile=true on selecting the Dropdownlist which is inside the Datagrid Ex if dropdownlist ="YES" then p1.visible=true else p2.visible= false Thanks in Advance DevKranth
In this case, you can use another Updatepanel to place those P1 and P2 in that Updatepanel. If not possible, then you can use javacript by registering it with Scriptmanager.registerClientScriptblock. I think one of the above method solve your problem. Regards, Amar Gujarathi cfoamar23@gmail.com
-
hi write the bubble event means write one protected functions like protected void visiblePanel(object sender, EventArgs e) { if dropdownlist ="YES" then p1.visible=true else p2.visible= false } in html set autopostback of drp to true and set the on OnSelectedIndexChanged = visiblePanel
hi laxmikant thanks for the response ... as u said i did the Same but the problem is when i debug the code the panels state are changing but it is not reflected in the Form...
-
In this case, you can use another Updatepanel to place those P1 and P2 in that Updatepanel. If not possible, then you can use javacript by registering it with Scriptmanager.registerClientScriptblock. I think one of the above method solve your problem. Regards, Amar Gujarathi cfoamar23@gmail.com
hi amar thanks for u response.i think the first Case u said is not going to happen coz when i add an update panel to the P1 and p2 it gives me a message saying u have to add another Update panel the second option i am not clear can u briefly explain me..
-
hi amar thanks for u response.i think the first Case u said is not going to happen coz when i add an update panel to the P1 and p2 it gives me a message saying u have to add another Update panel the second option i am not clear can u briefly explain me..
hi devkranth, For that you have to use javascript, first you need to find out the P1 and P2 id of the panel using javascript eg. function switchpanel(panelno) { var p1=document.getElementById("P1"); //find out P1 with its client ID var p2=document.getElementById("P1"); //find out P2 with its client ID if (panelno==1) { p1.style.display="block"; p2.style.display="none"; } else { p1.style.display="none"; p2.style.display="block"; } call this script on dropdown_change event with scriptmanager as previously mentioned. }