var txt = $find("<%= txtValue.ClientID %>");
var item = eventArgs.get_item();
var value = item.get_value();
switch(value)
{
case "CUST_NU":
txt.MaxLength = 8;
break;
case "NAME":
txt.MaxLength = 30;
break;
case "CIC":
txt.MaxLength = 4;
break;
case "INVOICE_NU":
txt.MaxLength = 10;
break;
}
Then checked for the maxlength via alert(txt.MaxLength) and it shows the new maxlength value but the textbox still doesn't change to the new length.
onclientRequestSuccess does not seem to have the updated firstDayStart(). I thought I had figured it out, but its not working:
As I navigate in the calendar, changing months, it does not reflect the right day - what am I doing wrong?
function onClientRequestSuccess(scheduler, eventArgs) {
if (typeof loadList == 'function') {
var start = scheduler.get_firstDayStart();
var end = start;
var curView = scheduler.get_selectedView();
if (curView == 0) { // day view
end.setHours(start.getHours() + 24);
} else if (curView == 1) { // week view
end.setHours(start.getHours() + (24 * 7));
} else if (curView == 2) { // week view
end.setMonth(start.getMonth() + 1);
// need to find out if we are on a Saturday.. If not, we need to add days until we get there
}
alert(start + " **- " + end);
loadList(start.getTime(), end);
}
}
protected
void
rgGeneralSearch_ItemDataBound(
object
sender, GridItemEventArgs e)<br> {<br><br>
if
(e.Item
is
GridDataItem)<br> {<br> GridDataItem gridDataItem = (GridDataItem)e.Item;<br> Button btnAdd =<br> (Button)gridDataItem[
"Add"
].FindControl(
"btnAdd"
);<br> RadNumericTextBox txtQuantity =<br> (RadNumericTextBox)gridDataItem[
"Quantity"
].FindControl(
"txtQuantity"
);<br><br><br>
//btnAdd.Attributes["onclick"] = "btnAddClick('" + txtQuantity.ClientID + ", "+ rgGeneralSearch.MasterTableView.GetColumn("Code") + "')";<br> btnAdd.Attributes["onclick"] = "btnAddClick('" + txtQuantity.ClientID + "', '"+ e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Code"] +"')";<br> //btnAdd.Attributes["href"] = "#";<br> btnAdd.Attributes.Add("ajax", "");<br> }<br> }
function
btnAddClick(Quantity, Code) {<br> alert($get(Quantity).value);<br> alert(Code);<br><br>
var
SenderType = 1;<br>
var
SenderId = 22;<br>
var
ProductId = 333;<br>
var
CustomerId = 99;<br>
var
SalesmanId = 88;<br>
var
DiscSpecial = 23;<br>
var
TerminalNumber = 234;<br><br>
var
webMethod =
"http://localhost:5261/WS/Basket_WS.asmx/InsertBasket"
; <br>
var
parameters =
"{'SenderType':'"
+ SenderType +
"', 'SenderId':'"
+ SenderId +
"', 'ProductId':'"
+ ProductId +
"', 'CustomerId':'"
+ CustomerId +
"', 'SalesmanId':'"
+ SalesmanId +
"', 'Quantity':'"
+ 22 +
"','DiscSpecial':'"
+ DiscSpecial +
"','TerminalNumber':'"
+ TerminalNumber +
"'}"
; <br> $.ajax({<br> type:
"GET"
,<br> url: webMethod,<br> data: parameters,<br> contentType:
"application/json; charset=utf-8"
,<br> dataType:
"json"
,<br> success: OnGetSuccess,<br> error: OnGetError<br> });<br>}
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
Hi folks
Can anybody point me in the right direction, please? I have an ASP.NET content page that loads a master page, and I need each to be linked to their own separate external javascript files. If I use the RadScriptManager on the content page (as I have already been doing successfully for existing content page code), it doesn't load the external javascript file from the master page. Therefore I decided I needed to include the RadScriptManager in the master page, and link to it from the content page with a standard ScriptManagerProxy control. The problem is: the content page won't load with the ASP.NET code I am trying to use, with the RadScriptManager in the master page, and the ScriptManagerProxy in the content page. I just get:
That error reads to me as though the proxy control can't find the RadScriptManager in the master page, or doesn't recognize it as a replacement for the standard ASP ScriptManager.
Could anyone clarify, is this configuration I am trying to use actually supported? If so, where exactly in the markup of the two pages should the RadScriptManager and ScriptManagerProxy declarations go? Or do they need to be added programatically for this to work? If someone could point me to a working example, that would be great - the RadControls documentation just says, 'Yes it works', but I can't find an example anywhere.
Regards
Dim dupOptionTop As RadButton = New RadButton()
dupOptionTop.GroupName = dgr.Cells(lnColumn).Text
dupOptionTop.ID = dupFile.FILEID
dupOptionTop.AutoPostBack = False
dupOptionTop.ButtonType = RadButtonType.ToggleButton
dupOptionTop.ToggleType = ButtonToggleType.Radio
dupOptionTop.ForeColor = Color.Brown
Dim dupOption As RadButtonToggleState = New RadButtonToggleState()
dupOptionTop.Text = dupFile.FILEID
dupOptionTop.ToggleStates.Add(dupOption)
dupOptionTop.ToggleStates.Add(dupOption)
dgr.Cells(lnMsgColumn + 1).Controls.Add(dupOptionTop)
Dim _options = New List(Of RadButton)
ViewState.Add("options", _options)
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |