In my website project I have a top-level file called "Common.cs" that is shared by all the forms in the project. It contains common code that needs to access the Website UI. I'd like to dynamically create a dialog box that will allow the user to enter additional comments in the event of an error.
I've written some code that is not crashing but yet no RadWindow is appearing. Here's the crux of what I have so far:
And here's a sample call to the method:
Hoping someone can tell me why the RadWindow is not appearing,
Robert
P.S. In case it helps, here's displayed info from jQuery when I'm stepping through client-side code:
? $('div[id$=_rwNewMuckpile]')[0].id
"ctl00_ContentPlaceHolder1_Mucking_rwNewMuckpile"
endsWith: function String$endsWith(suffix) {
/// <summary locid="M:J#String.endsWith" />
/// <param name="suffix" type="String"></param>
/// <returns type="Boolean"></returns>
var e = Function._validateParams(arguments, [
{name: "suffix"
startsWith: function String$startsWith(prefix) {
/// <summary locid="M:J#String.startsWith" />
/// <param name="prefix" type="String"></param>
/// <returns type="Boolean"></returns>
var e = Function._validateParams(arguments, [
{name: "pre
trim: function String$trim() {
/// <summary locid="M:J#String.trim" />
/// <returns type="String"></returns>
if (arguments.length !== 0) throw Error.parameterCount();
return this.replace(/^\s+|\s+$/g, '');
}
trimEnd: function String$trimEnd() {
/// <summary locid="M:J#String.trimEnd" />
/// <returns type="String"></returns>
if (arguments.length !== 0) throw Error.parameterCount();
return this.replace(/\s+$/, '');
}
trimStart: function String$trimStart() {
/// <summary locid="M:J#String.trimStart" />
/// <returns type="String"></returns>
if (arguments.length !== 0) throw Error.parameterCount();
return this.replace(/^\s+/, '');
So something "appears" to be there but if I make this call: $find($('div[id$=_rwNewMuckpile]')[0].id)
then I get 'null'. :-(
I've written some code that is not crashing but yet no RadWindow is appearing. Here's the crux of what I have so far:
public
static
void
ShowErrorDialog(
string
msg, Constants.ErrorCode category,
string
location, Control parent)<br> {<br> RadWindow rw =
new
RadWindow();<br> rw.ID =
"rwErrorHandling"
;<br> rw.VisibleOnPageLoad =
true
;<br> rw.CssClass =
"errorDialog2"
;<br> rw.Behaviors = WindowBehaviors.Move;<br> rw.EnableShadow =
true
;<br> rw.VisibleStatusbar =
false
;<br> rw.VisibleTitlebar =
true
;<br> rw.Visible =
true
;<br>
//rw.AutoSize = true;<br> rw.Width = 300;<br> rw.Height = 200;<br> rw.Modal = true;<br> <br> // Much more code here to create the contents of the dialog box<br> <br> parent.Page.Controls[0].FindControl("form1").Controls.Add(rw);<br> }
And here's a sample call to the method:
Website.Common.ShowErrorDialog(
"Test message"
, Constants.ErrorCode.UnexpectedRecordCount,
"buttonTest"
, Page);
Hoping someone can tell me why the RadWindow is not appearing,
Robert
P.S. In case it helps, here's displayed info from jQuery when I'm stepping through client-side code:
? $('div[id$=_rwNewMuckpile]')[0].id
"ctl00_ContentPlaceHolder1_Mucking_rwNewMuckpile"
endsWith: function String$endsWith(suffix) {
/// <summary locid="M:J#String.endsWith" />
/// <param name="suffix" type="String"></param>
/// <returns type="Boolean"></returns>
var e = Function._validateParams(arguments, [
{name: "suffix"
startsWith: function String$startsWith(prefix) {
/// <summary locid="M:J#String.startsWith" />
/// <param name="prefix" type="String"></param>
/// <returns type="Boolean"></returns>
var e = Function._validateParams(arguments, [
{name: "pre
trim: function String$trim() {
/// <summary locid="M:J#String.trim" />
/// <returns type="String"></returns>
if (arguments.length !== 0) throw Error.parameterCount();
return this.replace(/^\s+|\s+$/g, '');
}
trimEnd: function String$trimEnd() {
/// <summary locid="M:J#String.trimEnd" />
/// <returns type="String"></returns>
if (arguments.length !== 0) throw Error.parameterCount();
return this.replace(/\s+$/, '');
}
trimStart: function String$trimStart() {
/// <summary locid="M:J#String.trimStart" />
/// <returns type="String"></returns>
if (arguments.length !== 0) throw Error.parameterCount();
return this.replace(/^\s+/, '');
So something "appears" to be there but if I make this call: $find($('div[id$=_rwNewMuckpile]')[0].id)
then I get 'null'. :-(