网格视图按钮问题 [英] Grid view button Issue

查看:69
本文介绍了网格视图按钮问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


网页寄存之前
-----------------------------
我们已经开发了1个项目,即TNPDA.
因为我们拥有网格具有的gridview
显示/隐藏和取消三个按钮.
当我单击display hide时,将show.sql表标志更新为d.
当我单击隐藏"时,标志将更新为h,然后显示屏将显示积雪.
当按下取消标记时,将更新c.
行内命令事件

Hi,
Before Web Hosting
-----------------------------
We have developed 1 project Namely TNPDA.
In that We have gridview that grid has
Three buttons namely display/hide and cancel.
When I click display hide will show.sql table flag is update into d.
When I click hide means flag update into h then display will show snow.
When press cancel flag will update c.
In row command event

BLLSuggestion_Mast ObjApp = new BLLSuggestion_Mast();
            if (e.CommandName == "Display")
                ObjApp.UpdateTopic(Convert.ToInt16(e.CommandArgument), Session["FLG"].ToString());
            else if (e.CommandName == "Hide")
                ObjApp.UpdateTopic(Convert.ToInt16(e.CommandArgument), Session["FLG"].ToString());
            else if (e.CommandName == "Deny")
                ObjApp.UpdateTopic(Convert.ToInt16(e.CommandArgument), Session["FLG"].ToString());
            BindTopics();




行中数据绑定事件
------------------------




In row data bound event
------------------------

if (e.Row.RowType == DataControlRowType.DataRow)
          {

              Button objDisplay = (Button)e.Row.FindControl("btnApprove");
              Button objHide = (Button)e.Row.FindControl("btnHide");
              Button objCancel = (Button)e.Row.FindControl("btnCancel");
              if (dgTopics.DataKeys[e.Row.RowIndex].Values[1].ToString() == "A")
              {
                  objDisplay.Visible = false;
                  objHide.Visible = true;
                  objCancel.Visible = true;
              }
              else if (dgTopics.DataKeys[e.Row.RowIndex].Values[1].ToString() == "H")
              {
                  objDisplay.Visible = true;
                  objHide.Visible = false;
                  objCancel.Visible = true;
              }
              else if (dgTopics.DataKeys[e.Row.RowIndex].Values[1].ToString() == "C")
              {
                  objDisplay.Visible = true;
                  objHide.Visible = false;
                  objCancel.Visible = false;
              }
          }
      }



网页寄存后
-----------------------------
在Web托管之前但在Web托管之后,所有过程均正确完成.
当我按网格中的显示按钮时,标志也更改为D,但未显示隐藏按钮.
有人可以帮我吗?

谢谢和问候
Prabu T


[已编辑]代码包装在前置"标签中[/已编辑]



After Web Hosting
-----------------------------
All the process done properly before web hosting but after web hosted there.
When I press display button in the grid flag also changed into D but not shows the hide button.
Can any one help me?

Thanks and regards
Prabu T


Code is Wrapped in "pre" tags[/Edited]

推荐答案

请检查IIS服务器中的项目总数,然后托管完成
Please Check the Total Project in IIS Server then Hosting should be done


这篇关于网格视图按钮问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆