在C#中显示基于gridview行值的弹出窗口 [英] Show the popup based on gridview row value in C#

查看:67
本文介绍了在C#中显示基于gridview行值的弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有gridview如下





Selectdata学生名称月份Sub1 Sub2 Sub3总计



复选框215 Ram Jan 50 80 70 200



复选框123 Sam Jan 70 60 80 210



复选框123 Sam Feb 50 80 75 205



复选框150 Suresh Jan 70 80 90 240





i点击复选框并点击提交按钮,如果假设任何学生ID值出现不止一次意味着我想要显示弹出窗口。



例如在上面的gridview中,当我单击值学生ID 215的复选框并且单击提交按钮弹出时不应该出现。



当我点击值学生ID 123的复选框,然后单击提交按钮我想显示弹出窗口中的c#



W帽子我试过了:



我有gridview如下





Selectdata学生名称月份Sub1 Sub2 Sub3总计



复选框215 Ram Jan 50 80 70 200



复选框123 Sam Jan 70 60 80 210



复选框123 Sam Feb 50 80 75 205



Checkbox 150 Suresh Jan 70 80 90 240





i点击复选框并点击提交按钮,如果假设任何学生ID值不止一次出现就意味着我想显示弹出窗口。



例如在上面的gridview中,当我单击值学生ID 215的复选框时,单击提交按钮弹出窗口不应该出现。



当我点击值学生ID 123的复选框并单击提交按钮时,我想显示弹出的那个h要做的事情在c#

I have gridview as follows


Selectdata Studentid Name Month Sub1 Sub2 Sub3 Total

Checkbox 215 Ram Jan 50 80 70 200

Checkbox 123 Sam Jan 70 60 80 210

Checkbox 123 Sam Feb 50 80 75 205

Checkbox 150 Suresh Jan 70 80 90 240


i click the checkbox and click submit button if suppose any student id value appear more than once means i want to show the popup.

for example in the above gridview when i click the check box for the value student id 215 and click submit button pop up should not appear.

simliarily when i click the check box for the value student id 123 and click submit button i want to show the pop up for that how to do in c#

What I have tried:

I have gridview as follows


Selectdata Studentid Name Month Sub1 Sub2 Sub3 Total

Checkbox 215 Ram Jan 50 80 70 200

Checkbox 123 Sam Jan 70 60 80 210

Checkbox 123 Sam Feb 50 80 75 205

Checkbox 150 Suresh Jan 70 80 90 240


i click the checkbox and click submit button if suppose any student id value appear more than once means i want to show the popup.

for example in the above gridview when i click the check box for the value student id 215 and click submit button pop up should not appear.

simliarily when i click the check box for the value student id 123 and click submit button i want to show the pop up for that how to do in c#

推荐答案

Garbage in;垃圾输出。



如果您允许重复的学生ID,您会遇到输入问题。



您没有修复数据输入问题;你阻止它们。



如果你有一个正确的输入编辑/更新,你的问题将不存在。
Garbage in; garbage out.

You have an "input problem" if you are allowing duplicate "student ids".

You don't "fix" data entry problems; you prevent them.

Your "problem" wouldn't exist if you had a proper "input edit / update".


这篇关于在C#中显示基于gridview行值的弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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