Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <asp:FormView ID="fvWasteCollected" runat="server" SkinID="annualReportFormview" ViewStateMode="Disabled"
- HeaderText="Selected Waste Collected Detail" DataKeyNames="MRWCollectionReportDetailId" DefaultMode="Insert"
- DataSourceID="odsMRWWasteCollectedDetail" OnDataBound="fvWasteCollected_DataBound"
- OnItemCommand="fvWasteCollected_ItemCommand" OnItemInserted="fvWasteCollected_ItemInserted"
- OnItemUpdated="fvWasteCollected_ItemUpdated" OnItemDeleted="fvWasteCollected_ItemDeleted">
- <EditItemTemplate>
- <table class="detailstable">
- <asp:Panel ID="pnlOtherContractor" runat="server" Visible="false">
- <tr>
- <th></th>
- <td align="left">
- Blah Blah
- </td>
- </tr>
- </asp:Panel>
- </table>
- </EditItemTemplate>
- protected void fvWasteCollected_ItemCommand(object sender, FormViewCommandEventArgs e)
- {
- if (e.CommandName.Equals("Edit"))
- {
- ValidationSummaryWasteDetail.ValidationGroup = "WasteReceivedDetail";
- fvWasteCollected.ChangeMode(FormViewMode.Edit);
- gvCollectionEventDetail.Columns[0].Visible = false;
- DataRowView rowView = (DataRowView)fvWasteCollected.DataItem;
- DropDownList ddl = (DropDownList)fvWasteCollected.FindControl("ddl_MRWContractor");
- //Tried Panel pnlOtherContractor = (Panel)fvWasteCollected.FindControl("pnlOtherContractor");
- FormViewRow myFormRow = fvWasteCollected.Row;
- Panel pnlOtherContractor = (Panel)myFormRow.FindControl("pnlOtherContractor");
- var s_contractorId = rowView["MRWContractorId"].ToString();
- if (s_contractorId == "0")
- {
- pnlOtherContractor.Visible = true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement