423,688 Members | 1,879 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,688 IT Pros & Developers. It's quick & easy.

to get hidden field value onrowcommand

P: 1
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
Share this Question
Share on Google+
1 Reply


zmbd
Expert Mod 5K+
P: 5,285
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.