Click here to Skip to main content
15,900,378 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: dropdownlist value from dataset is displayed incorrectly Pin
Naveed Kamboh18-Aug-06 3:07
Naveed Kamboh18-Aug-06 3:07 
GeneralRe: dropdownlist value from dataset is displayed incorrectly Pin
digsy_18-Aug-06 5:25
digsy_18-Aug-06 5:25 
AnswerRe: dropdownlist value from dataset is displayed incorrectly Pin
postmaster@programmingknowledge.com18-Aug-06 3:18
postmaster@programmingknowledge.com18-Aug-06 3:18 
QuestionAsp.net + Hiding Tree View nodes ? Pin
Naveed Kamboh18-Aug-06 2:58
Naveed Kamboh18-Aug-06 2:58 
AnswerRe: Asp.net + Hiding Tree View nodes ? Pin
Ryomin18-Aug-06 7:30
professionalRyomin18-Aug-06 7:30 
GeneralRe: Asp.net + Hiding Tree View nodes ? Pin
Naveed Kamboh22-Aug-06 23:42
Naveed Kamboh22-Aug-06 23:42 
Questionpopup menu on right click on datagrid Pin
248912818-Aug-06 2:55
248912818-Aug-06 2:55 
AnswerRe: popup menu on right click on datagrid Pin
RaghuSanta21-Aug-06 21:11
RaghuSanta21-Aug-06 21:11 
Create a div element and place the datagrid inside it. Then insert the below mentioned javascript(Popup menu script-Dynamicdrive.com) in the head of the page. Call this javascript from div element "oncontextmenu"


<Head>
<script language="javascript">
//DynamicDrive.com
var defaultMenuWidth="150px" //set default menu width.
var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT
linkset[0]='<a href="http://dynamicdrive.com">Dynamic Drive</a>'
linkset[0]+='<hr>' //Optional Separator
linkset[0]+='<a href="http://www.javascriptkit.com">JavaScript Kit</a>'
linkset[0]+='<a href="http://www.codingforums.com">Coding Forums</a>'
linkset[0]+='<a href="http://www.cssdrive.com">CSS Drive</a>'
linkset[0]+='<a href="http://freewarejava.com">Freewarejava</a>'

linkset[1]='<a href="http://msnbc.com">MSNBC</a>'
linkset[1]+='<a href="http://cnn.com">CNN</a>'
linkset[1]+='<a href="http://news.bbc.co.uk">BBC News</a>'
linkset[1]+='<a href="http://www.washingtonpost.com">Washington Post</a>'

////No need to edit beyond here

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie5||ns6)
document.onclick=hidemenu
</script>
<body>

<div oncontextmenu="showmenu(event,linkset[0]);return false;"><asp:datagrid id="DataGrid1"></asp:datagrid></div>
</body>

</Head>

Raghu
QuestionHI Pin
Arun Kumar Babu18-Aug-06 1:24
Arun Kumar Babu18-Aug-06 1:24 
AnswerRe: Useless subject Pin
Guffa18-Aug-06 1:34
Guffa18-Aug-06 1:34 
QuestionHow to download file from server? Pin
vanolviv18-Aug-06 1:23
vanolviv18-Aug-06 1:23 
AnswerRe: How to download file from server? Pin
_AK_18-Aug-06 1:37
_AK_18-Aug-06 1:37 
GeneralRe: How to download file from server? Pin
vanolviv18-Aug-06 1:46
vanolviv18-Aug-06 1:46 
GeneralRe: How to download file from server? Pin
_AK_18-Aug-06 1:48
_AK_18-Aug-06 1:48 
Questionreading excel spreadsheet and save to access database Pin
playout18-Aug-06 1:22
playout18-Aug-06 1:22 
QuestionHow to Disable "page cannot be refreshed without resending information..." warning. Pin
Sivaprasad C18-Aug-06 1:13
Sivaprasad C18-Aug-06 1:13 
AnswerRe: How to Disable "page cannot be refreshed without resending information..." warning. Pin
Guffa18-Aug-06 1:38
Guffa18-Aug-06 1:38 
Questionselected text Pin
nannapanenikamalnath18-Aug-06 1:13
nannapanenikamalnath18-Aug-06 1:13 
QuestionReturn Value from window.ShowModalDialog() [modified] Pin
Tom Lawrance18-Aug-06 1:00
professionalTom Lawrance18-Aug-06 1:00 
AnswerRe: Return Value from window.ShowModalDialog() Pin
Tom Lawrance18-Aug-06 1:53
professionalTom Lawrance18-Aug-06 1:53 
QuestionForms Authentication Question Pin
matthias s.18-Aug-06 0:41
matthias s.18-Aug-06 0:41 
AnswerRe: Forms Authentication Question Pin
minhpc_bk18-Aug-06 12:21
minhpc_bk18-Aug-06 12:21 
GeneralRe: Forms Authentication Question Pin
matthias s.22-Aug-06 21:17
matthias s.22-Aug-06 21:17 
QuestionASP.NET caching in NLB scenario Pin
K.P.Kannan18-Aug-06 0:39
K.P.Kannan18-Aug-06 0:39 
AnswerRe: ASP.NET caching in NLB scenario Pin
minhpc_bk18-Aug-06 12:23
minhpc_bk18-Aug-06 12:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.