467,180 Members | 1,036 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,180 developers. It's quick & easy.

to get hidden field value onrowcommand

Expand|Select|Wrap|Line Numbers
  1. protected void ItemCategoryListView_RowCommand(object source, GridViewCommandEventArgs e)
  2.         {
  3.  
  4.  
  5.             if (e.CommandName == "EDITITEM")
  6.             {
  7.  
  8.                 btnSave.Visible = false;
  9.                 btnUpdate.Visible = true;
  10.                 GridViewRow row = (GridViewRow)(((Control)e.CommandSource).NamingContainer);
  11.  
  12.                 int RowIndex = row.RowIndex;
  13.  
  14.                 string hd = (row.FindControl("HiddenField1") as HiddenField).Value; 
  15.                     if (hd == "1")
  16.                     {
  17.                         ddlLevel.Enabled = false;
  18.                         ddlItemTypeMaster.Enabled = false;
  19.                         ddlItemParentCategoryName.Enabled = false;
  20.                     }
  21.                }}
Aug 28 '18 #1
  • viewed: 1959
Share:
1 Reply
zmbd
Expert Mod 4TB
devisr:
Are you asking a question or just posting code?
If you have a question then you need to actually ask it within the post and provide a bit of explanation. If you are merely posting code, there are other sites which specialize in cataloging and posting code snippets wherein your code would have a better life :)
Aug 29 '18 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Rauf ul Hassan | last post: by
4 posts views Thread by PJ6 | last post: by
1 post views Thread by fatima.issawi@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.