选择所有复选框不起作用. [英] Select All Check box not Working.

查看:59
本文介绍了选择所有复选框不起作用.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我叫Vikash Gohil.

我已经使用ASP.net创建了一个Web应用程序.

在此,我使用了GridView,并在每行中都有一个复选框供选择.

另外,我在标题中提供了一个复选框,用于选择所有复选框.

问题是我的PC和办公室一切正常.

但是在客户端放置的一个处,全选"复选框不起作用.

我已经检查了Javascript设置,一切正常.

我还需要检查/启用其他功能才能使其正常工作.

任何人都遇到过这样的问题,请回复.

等待回复.

在此先谢谢您.

Hello, this is Vikash Gohil.

I have created a Web application using ASP.net.

In this I have used GridView, with a checkbox for selection in each row.

Also I have given a checkbox in header for selecting all the checkboxes.

The problem is everything works fine at my PC and in our office.

But at one the client places, the select all checkbox does not work.

I have checked the Javascript setting, it is all ok.

What else do I need to check/enable for this to work.

Anyone have faced such a problem, please reply.

Awaiting a reply.

Thanks in advance.

推荐答案

检查本文

选择/取消选择GridView内部的所有复选框 [ ^ ]
Check this article

Selecting / Deselecting all the CheckBoxes Inside a GridView[^]


感谢您的答复,

但我不想知道如何执行全选"功能.

我已经做到了,并且在我的办公室和其他客户端也能正常工作.

只是,它不适用于几个客户.

因此,我想知道除了启用Javascript之外,我们是否还需要在IE中进行其他设置以使其启用.
Thanks for your reply,

But I don''t want to know How to do the Select All functionality.

I have done that and is working fine at my office and at other client side as well.

it is only that, it is not working at a couple of clients.

So I wanted to know whether there is any other setting we need to do in IE to enable it in addition to enabling Javascript.


您好!您可以在下面使用代码片段:d希望对您有所帮助
hi you! you can using code snipet below :d hope this help you
'Sub checkall
    Public Sub MakeChecked(ByVal GridView As DataGridView, ByVal ColumnName As String)
        Dim UnCheckedItems = From Rows In GridView.Rows.Cast(Of DataGridViewRow)() Where CBool(Rows.Cells(ColumnName).Value) = False
        For Each item In UnCheckedItems
            item.Cells(ColumnName).Value = True
        Next
    End Sub
    'Sub uncheckall
    Public Sub MakeUnChecked(ByVal GridView As DataGridView, ByVal ColumnName As String)
        Dim UnCheckedItems = From Rows In GridView.Rows.Cast(Of DataGridViewRow)() Where CBool(Rows.Cells(ColumnName).Value) = True
        For Each item In UnCheckedItems
            item.Cells(ColumnName).Value = False
        Next
    End Sub


这篇关于选择所有复选框不起作用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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