|
Mahimam wrote: Can we display the dropDownlist in the Header row of GridView? and checkboxes are for each row.
Yes, you can. Use TemplateColumn to do that.
|
|
|
|
|
Hi everyone!
i'm hving a ajax calender extender attached to a textbox.To txtbox i'm populating the selected date from calender control,now i want to restrict the user from entering any data manually into the txtbox.Could any one tell me how to do that ..
Thanks in advance
|
|
|
|
|
SunithaNallana wrote: i want to restrict the user from entering any data manually into the txtbox.Could any one tell me how to do that ..
return false onkeypress of textbox.
asp:textbox id="txt" runat="server" onkeypress="return false;"
|
|
|
|
|
My web page is working fine. But In the status bar, I am getting Done with other symbol (not IE symbol).
If I dbl click I am getting the following things in the window.
Line: 562
Char: 41
Error: expected ')'
Code 0
Url:...........frmBAFeedback.aspx
But My page is working fine according to the requirement. If I find the line number 562 in the view source by right clicking in the web page, all the things are fine. What I have to do for this?
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: Line: 562
Char: 41
Error: expected ')'
Code 0
Url:...........frmBAFeedback.aspx
This is a javascript error. Do you use javascript on this page or any ajax control?
regard
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Yes I am using java scripts on my page.
Balasubramanian K.
|
|
|
|
|
The script have to be fire on page load event...,
then call that script in body onload..,
either if u want to call that script during some event fire,
then do it in eventcontrol.attributes.add("event","function");
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
I have two functions.
function funEnableOrDisableTxtBox(objTextbox, objRadiobutton)
{
}
function funIsTextBoxEmpty()
{
}
I hv writn the follwong in page load
----
rbRndQRSSPoor.Attributes.Add("onClick", "funEnableOrDisableTxtBoxmstxtRndPoor1,rbRndQRSSPoor);")
btnSubmit.Attributes.Add("onClick", "return funIsTextBoxEmpty();")
---
Like this, I am calling this same function from other radio buttons click event also. If I comment this attributes.add, my page is loading well. But If I comment the body of the function, I am getting the error. Simply, I tried by giving the function name with out any body like mentioned above. Eventhough, I am getting Done with error. What to do? I think my problem is in attribute?
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: rbRndQRSSPoor.Attributes.Add("onClick", "funEnableOrDisableTxtBoxmstxtRndPoor1,rbRndQRSSPoor);")
Look at above code.
You have missed "("
It should be
funEnableOrDisableTxt(BoxmstxtRndPoor1,rbRndQRSSPoor);
regard
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
No. No. I might missed to type in message board. '(' is there already
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: No. No. I might missed to type in message board. '(' is there already
Ok.So post your javascript function with code
please don't forget to vote on the post that helped you.
|
|
|
|
|
Problem is.........
I 've 4 radio buttons for Excellent, Good, Avg, Poor and one text box. If user select the poor, my txt box should be enabled and got focus. This is the requirement. So, I am calling this function for each radio buttons by passing arg.
rbRndQRSSPoor.Attributes.Add("onClick", "funEnableOrDisableTxtBox(mstxtRndPoor1,rbRndQRSSPoor);")
rbRndQRSSExc.Attributes.Add("onClick", "funEnableOrDisableTxtBox(mstxtRndPoor1,rbRndQRSSPoor);")
rbRndQRSSGood.Attributes.Add("onClick", "funEnableOrDisableTxtBox(mstxtRndPoor1,rbRndQRSSPoor);")
rbRndQRSSAvg.Attributes.Add("onClick", "funEnableOrDisableTxtBox(mstxtRndPoor1,rbRndQRSSPoor);")
function funEnableOrDisableTxtBox(objTextbox, objRadiobutton)
{
if (objRadiobutton.checked == true)
{
objTextbox.disabled = false;
objTextbox.focus()
}
else
{
objTextbox.disabled = true;
objTextbox.value = "";
}
}
on the above, I am passing the same args for all the dif radio buttons. Is not a proper way?.
Balasubramanian K.
|
|
|
|
|
Take RadioButtonList and call javascript onclick event and check Poor item is checked or not and make disabled true or false.
<asp:radiobuttonlist id="rbtn" runat="server" repeatdirection="horizontal" onclick="chk();" >
<asp:listitem text="Poor" value="0"></asp:listitem>
<asp:listitem text="Exc" value="1"></asp:listitem>
<asp:listitem text="Good" value="2"></asp:listitem>
<asp:listitem text="Avg" value="3"></asp:listitem>
</asp:radiobuttonlist>
<asp:textbox id="txt" runat="server" ></asp:textbox>
javascript function
function chk()
{
if(document.getElementById('rbtn_0').checked)
{
document.getElementById('txt').disabled=false;
document.getElementById('txt').focus();
}
else
{
document.getElementById('txt').disabled=true;
document.getElementById('txt').value='';
}
}
please don't forget to vote on the post that helped you.
modified on Friday, June 27, 2008 3:23 AM
|
|
|
|
|
Hi i am using gridview selection index change event...,
when i click a cell value, those values coming to my textbox,
same time page getting refresh...,
So which row i selected from the gridview its going down...,
using scrollbar i am seeing which one is selected...,
instead of that how to maintain gridview which one has been selected...,
Gridview Maintain Selected row after Postback
it mean its have to be auto scroll and have to point the place which row has been selected...,
how to do this?
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
modified on Friday, June 27, 2008 1:18 AM
|
|
|
|
|
Is the gidview inside a scrolling pane(whatever) or the scroll bar you talking about is the browser's scroll bar?
|
|
|
|
|
hai sherin,
me too the same problem in all case (textbox, gridview).
i speaking about Browser's scroll bar.
help me - KARAN
thanks in advance
|
|
|
|
|
Can you use
MaintainScrollPositionOnPostback=true
at page directive
|
|
|
|
|
Thanks a lot sherin.
it helps me a lot and i implemented
Thanks for understanding!
|
|
|
|
|
I want to call a java script function when my web page is loaded. What I have to do this. I tried like this...........
But I am getting error such like, funEnableTxtBox is not a member of asp.net
What I have to do?. Thanks in adv.
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: funEnableTxtBox is not a member of asp.net
I highly doubt that was the error. Perhaps if you post the actual message, we can help more ?
Where does this function come from ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
'funEnableTxtBox' is not a member of ASP.frmBAFeedback. This is the actual error, I faced.
I have written my function in design page-source view of frmBAFeedback.aspx file
function funEnableTxtBox()
{
if(document.getElementById("rbRndQRSSPoor").checked==true)
{
var a;
a=document.getElementById("mstxtRndPoor1").value;
if (a == "")
{
alert("Please enter the reason for poor.");
document.getElementById("mstxtRndPoor1").focus()
return false;
}
}
}
I called this fun by other way (onClick event of radiobutton). It is working fine. But I need, "Is there any option to call this function when page loads?"
Balasubramanian K.
|
|
|
|
|
What new one suggested is what I was going to suggest, too
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yes. It is working fine. Tnx
Balasubramanian K.
|
|
|
|
|
use that onload event in body tag
it mean call that javascript function in body onload event
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Thank you Mr. It is working fine
Balasubramanian K.
|
|
|
|