I'm sure I'm missing something stupid but I've been staring at this for too long . . .
I have a two-level hierarchical grid: invoices and shipments that are associated with each invoice. In the ItemCreated event for the grid I'm setting properties for a HyperLink column which will call a JavaScript funtion to open a shipment detail window. One parameter for this function is a piece of information (approvalStatus) that exists at the MasterTableView level rather than the DetailTables level. My efforts to retrieve this value have so far proven fruitless.
Any pearls of wisdom? Thank you in advance.
I have a two-level hierarchical grid: invoices and shipments that are associated with each invoice. In the ItemCreated event for the grid I'm setting properties for a HyperLink column which will call a JavaScript funtion to open a shipment detail window. One parameter for this function is a piece of information (approvalStatus) that exists at the MasterTableView level rather than the DetailTables level. My efforts to retrieve this value have so far proven fruitless.
Any pearls of wisdom? Thank you in advance.
| protected void grdInvoices_ItemCreated(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem) |
| { |
| //String approvalStatus = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["INVOICE_ID"].ToString(); |
| if (e.Item.OwnerTableView.Name == "DetailTable") |
| { |
| HyperLink viewLink = e.Item.FindControl("ViewLink") as HyperLink; |
| viewLink.Attributes["href"] = "#"; |
| viewLink.Text = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["shipment_id"].ToString(); |
| viewLink.Attributes["onclick"] = string.Format("return ShowProbillWindow('" + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["shipment_id"] + "', '" + approvalStatus + "');"); |
| } |
| } |
| } |