Telerik RadDatePicker breaking on partial update - c#

I have searched and searched to no avail. I am using
<telerik:RadDatePicker ID="prev_startempdate" runat="server" Width="115px">
<Calendar ShowRowHeaders="False" Width="160" />
</telerik:RadDatePicker>
When my page first loads it works fine, but when the page does a partial update to show more fields depending on a certain answer the calendar popups stop working. If I manually type a date, they get removed from the box as well. Any help is appreciated.

Related

ASP.Net window control library not a ControlAxSourcingSite

I'm new in ASP.Net.
Recently I tried to create a window control library and to use it in aspx web page but it seem like cannot recognize as user control in the page.
I tried to use the user control from the sample web site "http:// www.4guysfromrolla.com/articles/052604-1.aspx" and it work!
Then when i try to debug and notice the different:
Sample user control from www.4guysfromrolla.com:
WinControl
. The user control i created:
objtest
My user control appear as {Object} instead of {ControlAxSourcingSite}.
and when i alert the parameter it only show me "undefined".
I'm not sure what am I missing or do wrong. I try to find out why but end up no clue...not even Google can help. It's really frustrated.
Hope there are some one can help me.
Sorry if I'm for asking stupid question.
sample code in aspx:
<object id="objtest" height="0" width="0" classid="uscControl/uscTest.dll#uscTest.uscTest" VIEWASTEXT>
<param name="Response" value="test" />
</object>
<object id="MyWinControl1" height="200" width="240" classid="uscControl/WinControls.dll#WinControls.WinTreeview" VIEWASTEXT>
<param name="sCode" value="My Code1"/>
</object>
to call:
<input type="button" value="CallTest" onclick="CallTest();" />
...
function CallTest() {
alert(window.document.getElementById("objtest").Response);
alert(window.document.getElementById("MyWinControl1").sCode);
}
Thanks God..finally i found out the answer by myself.
The main cause is when I create the window control library I did not modify the "AssemblyInfor.cs" to set [assembly: ComVisible(true)]. This is the main cause the object return undefined in aspx.
Hope it help the others as well :)

onclick event is not fired by input buttons inside a user controls

I've updated my .Net web application to use Framework 4.5, after the update, all the input buttons (not asp:Buttons), have stopped firing the onclick javascript code, this is only happening on those buttons that are inside a user control (.ascx).
Just for the record, user controls are neither being loaded dinamically nor inside update panels.
My buttons look like this
<input id="cb" onClick="myfunc()" type="button" value="Close" />
My user controls are included to the page as follows
<cc:actionbar id="theActionBar" runat="server"></cc:actionbar>
and the javascript function, which is also included within the user control, is
function myfunc() {
if (confirm("Before closing, please make sure you saved any changes.\nAre you sure you want to close?") == true) {
__doPostBack('theActionBar:theClose', '');
}
}
this works just fine on Framework 3.5 and previous versions.
any idea why is this happening??? or how can I solve this?? I have tried several suggestions I've found over the internet and nothing seems to work.
Thanks in advance.
.
I can't see an obvious reason, but have you considered simplifying your approach to avoid the custom javascript and hard-coded postback event reference? You can get exactly the same behaviour with an ASP.NET button's OnClientClick property:
<asp:Button runat="server" ID="btnClose" Text="Close" OnClick="btnClose_Click" OnClientClick="return confirm('Before closing, please make sure you saved any changes.\nAre you sure you want to close?')" />
Returning false from the OnClientClick code or function prevents the postback.
Switching to this approach may be preferable and may even solve your issue if it's something to do with the postback event reference.

Telerik RadAysncUpload Select button is not visible in Compatibility View

In my Telerik RadAsyncupload, when i switched to Compatbile view [IE8] "Select" button is not visible.
I tried to find the solution but the only update that i got is
http://www.telerik.com/help/aspnet-ajax/asyncupload-select-button-not-visible.html
Above solution didnt worked for me.
Any help!!
try using this
<telerik:radupload id="RadUpload1" runat="server" enablefileinputskinning="true"
inputsize="50" width="475px" ></telerik:radupload>
it might help you

Validation prevent check box to auto postback

I have following checkboxes on my page:
<asp:CheckBox ID="rbBuilding" runat="server" AutoPostBack="True" OnCheckedChanged="HandlerPackageOnCheckedChanged" Checked="True" CausesValidation="False" />
<asp:CheckBox ID="rbContent" runat="server" AutoPostBack="True" OnCheckedChanged="HandlerPackageOnCheckedChanged" CausesValidation="False" />
There is an logic on postback based on combination of checkboxes clicked. Everything is working fine except one case:
I'm opening additional telerik radwindow which has some validation within its own validation group. If I close the window with any validation error, then the first click on any of that checkboxes
does not do postpack.
Only FIRST click is not working. next time I click everything is working fine. I've tried to add check boxes to theirs own validation group and change casing validation to true. But behaviour is exactly the same. When I add test javascript method to onclick for that checkboxes then this method is fired without issue. There is just no postback.
I also tried to reset all validators for window validation group on window close, they are reset, but behaviour is not checking, and first click is not working.
UPDATE:
I've made one more check and realized it only happens if I do in javascript:
window.Page_ClientValidate("MyGroup")
Which I have to do before do some calculations on popup window.
During dynamic validators, when updating validatable controls eveything is working properly, even if validation fails. So the problem is *Page_ClientValidate*
I know this is an old question but I ran into almost the exact issue and thanks to the following link I was able to resolve the issue:
Issue with postbacks and clicking on controls twice
I ended up adding this code to my code behind to add a javascript event handler for the checkbox's click event:
Checkbox1.Attributes.Add("onclick", "checkboxChanged();");
I then added the following javascript:
function checkboxChanged(arg1) {
Page_BlockSubmit = false;
}
The checkbox in my situation was also set to have CausesValidation set to false but I don't think that's required for this fix. Hopefully this helps someone.

why click on the button is not working on IE?

I'm just preparing the release of a library site builded in asp.net:
http://213.133.103.5/gramma_prod/Site/Index.aspx
All it's working great on FF and Chrome but on IE the asp button click event is not working.
Please notice the most important buttons: "Adauga in cos" (Add to basket)...
I'm just struggling to find out the problem...
I've checked the forms to not have nested ones but they seems ok.
Could you provide any other ideea?
ps: I did not post any code because this problem occurs on all pages...
Thanks in advance.
Edit:
Code for "Add to basket"(Adauga in cos) button from the index:
<asp:ImageButton ID="imgBtnCosBooksFeatured" runat="server"
OnCommand="addProductToBasket_Click"
CommandName="Click" CommandArgument='<%# Eval("Carti_id").ToString()+","+Eval("Titlu").ToString()+","+Eval("Autor").ToString()%>'
ImageUrl="../Site/images/featured-cos.jpg" ToolTip="Adauga in cos" />
works ok on ff and chrome. Fails on IE :(
Are you sure, your button, have the click event, and enable post back?
I don't see any onclick event... here is the source. Am I missing something?
<div class="adauga">
<input type="image" name="Repeater2$ctl00$imgBtnCosBooksFeatured" id="Repeater2_ctl00_imgBtnCosBooksFeatured" title="Adauga in cos" src="../Site/images/featured-cos.jpg" style="border-width:0px;" />
</div>
SOLVED!!!
What a stupid thing: i had a user control for the header which contained a form tag. So basically, my index contained two form tags because the user control was included as well....Auchhhhhh!

Categories