Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Learning to use JavaScript with ASP.Net
Message
From
21/05/2009 15:16:15
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
Application:
Web
Miscellaneous
Thread ID:
01400821
Message ID:
01401411
Views:
38
Paul,

This function being called has a parameter and I bet that is why it isn't running.
// This is to place the newly added row in edit mode
function EditAfterNew(grdId) {
    // Cause the new row to be placed in Edit mode with Template
    var oGrid = igtbl_getGridById(gridId);
    var lastRow = oGrid.rows.getRow(oGrid.Rows.length - 1);
    lastRow.Activate();

    // Edit the row
    oGrid.BeginEditTemplate();
}
It is called by this.
  // Inject the script in the page to call EditAfterNew
Type csType = this.GetType();
string csName = "TruckEditorScript";

// Get the ClientScriptManager reference from Page
ClientScriptManager csm = Page.ClientScript;

// Check if script is registered
if (!csm.IsStartupScriptRegistered(csType, csName))
{
	string csScript = string.Format("EditAfterNew('{0}');", this.grdTrucks.ClientID);
	Page.ClientScript.RegisterClientScriptBlock(csType, csName, csScript, true);
}
Is there any way to get a reference and pass that parameter? Or alternatively is there a way to obtain it within the function without it being passed in?
Thanks
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform