Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Learning to use JavaScript with ASP.Net
Message
De
21/05/2009 15:16:15
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
ASP.NET
Application:
Web
Divers
Thread ID:
01400821
Message ID:
01401411
Vues:
37
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform