A
Andrea Williams
My code is in a search box pop-up that is opened by a parent page. From the
search box, I need to be able to add code to a hyperlink in my datagrid (for
each row) that will call a client-side script that accepts the ID (primary
ID) and changes something in window.opener. I can add the javascript call
like so:
System.Web.UI.WebControls.HyperLinkColumn hypAddToSubmission = new
HyperLinkColumn();
hypAddToSubmission.DataNavigateUrlField = "ID");
hypAddToSubmission.Text = "Add";
hypAddToSubmission.NavigateUrl = "javascript:addAuthor(this);";
this.dgdUsers.Columns.Add(hypAddToSubmission);
Problem is, it doesn't get me the ID to utilize in the client script. I
don't want my ID to be visible to the user, but I need to be able to get the
ID so that I can pass it back to the parent page.
Is there a way to tell the data grid to add the ID into my NavigateUrl?
OR is there a way to add an <input type="hidden"> to a column to be utilized
by the clients-side script?
Any other ideas??
Thanks in advance!
Andrea
search box, I need to be able to add code to a hyperlink in my datagrid (for
each row) that will call a client-side script that accepts the ID (primary
ID) and changes something in window.opener. I can add the javascript call
like so:
System.Web.UI.WebControls.HyperLinkColumn hypAddToSubmission = new
HyperLinkColumn();
hypAddToSubmission.DataNavigateUrlField = "ID");
hypAddToSubmission.Text = "Add";
hypAddToSubmission.NavigateUrl = "javascript:addAuthor(this);";
this.dgdUsers.Columns.Add(hypAddToSubmission);
Problem is, it doesn't get me the ID to utilize in the client script. I
don't want my ID to be visible to the user, but I need to be able to get the
ID so that I can pass it back to the parent page.
Is there a way to tell the data grid to add the ID into my NavigateUrl?
OR is there a way to add an <input type="hidden"> to a column to be utilized
by the clients-side script?
Any other ideas??
Thanks in advance!
Andrea