基于父/子Gridview中的选择Ask RequiredField验证 [英] Based up on Selection Ask RequiredField Validation in Parent / child Gridview
本文介绍了基于父/子Gridview中的选择Ask RequiredField验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的父网格中有一个嵌套的Gridview,我有一个复选框,子网格中的页脚模板有一个下拉列表. DropDown的默认值为选择".下一个按钮.
根据下拉选择记录,必须将记录添加到子网格行中.
如果我当时选择了父网格复选框,那么子网格的行数为零,然后单击下一步"按钮,要求进行必填字段验证.
谁能帮我解决这个问题..
提前谢谢...
Hi,
I have a nested Gridview in my Parent Grid i have a checkbox and in my child grid i have a dropdown in footer template. Default value of DropDown is "Select". And one button for next page.
Based upon dropdown selection records has to be Added into child grid rows.
if i select the parent grid checkbox at that the time childgrid have zero rows then Click on Next button it''s ask the required field validation .
Can any one help me to solve this..
Thankx in advance...
推荐答案
嗨pranathis012,
在这里,您要做的是在urcheckedchanged中进行编码..服务器端事件中的代码为
Grdviiew.Showfooter = false; //当你想隐藏它的时候
而当您隐藏它时,请更改该字段的属性
CauseValidation ="false"
反之亦然,当您想显示自己的网格脚注并且需要验证时..
这是解决方案..希望您知道如何触发网格内部控件的事件. 谢谢
Hi pranathis012,
here you have to do is to code in ur checkedchanged.. Code in the serverside event as
Grdviiew.Showfooter = false; //When ever u want to hide it
And the when you are making it hide change the attribute of that field
CauseValidation = "false"
Do it vice versa when you want to show your gridfooter and you need validation..
This is the solution .. Hope you kno how to fire the event of a control which is inside a grid..
Thanks
这篇关于基于父/子Gridview中的选择Ask RequiredField验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文