小编use*_*912的帖子

行过滤器中的多个参数

我试图在textchanged事件下将文本框作为Rowfilter放置!

下面的代码用于GRID以获取相应的Reg_Number Customer_Name在文本框中输入的代码!

wat的令人惊讶的事实是,这段代码直接采用了第二个论证

(即)
((DataTable)radGridView1.DataSource).DefaultView.RowFilter = "Reg_Number like '%" + radTextBoxControl1.Text + "%'";

试图改变线路,但不管我做了什么,它都会忽略第一个并取得第二个

我试图把AND放在一条线上,但是不行,请告诉我frnzz!

private void radTextBoxControl1_TextChanged(object sender, EventArgs e)
{
    try
    {
        ((DataTable)radGridView1.DataSource).DefaultView.RowFilter =
            "Customer_Name like '%" + radTextBoxControl1.Text + "%'";
        ((DataTable)radGridView1.DataSource).DefaultView.RowFilter =
            "Reg_Number like '%" + radTextBoxControl1.Text + "%'";
    }
    catch (Exception) { }
}
Run Code Online (Sandbox Code Playgroud)

c# winforms

5
推荐指数
1
解决办法
8874
查看次数

如何将HTML表格单元格转换为可编辑的文本框

基本上,我希望用户单击表格并编辑文本.

这是我跟随的Js小提琴:

http://jsfiddle.net/ddd3nick/ExA3j/22/

您可以在下面看到我放在一起的代码.我跟着一个JS小提琴,想到在我的页面中使用它.

当我双击单元格时没有任何反应,我不知道为什么不工作.

请帮助找到遗漏的东西!

<!DOCTYPE html>
<html>
<head>
    <title>Table</title>
<script type="text/javascript">

    $(function () {
    $("td").dblclick(function () {
        var OriginalContent = $(this).text();
        $(this).addClass("cellEditing");
        $(this).html("<input type='text' value='" + OriginalContent + "' />");
        $(this).children().first().focus();
        $(this).children().first().keypress(function (e) {
            if (e.which == 13) {
                var newContent = $(this).val();
                $(this).parent().text(newContent);
                $(this).parent().removeClass("cellEditing");
            }
        });
    $(this).children().first().blur(function(){
        $(this).parent().text(OriginalContent);
        $(this).parent().removeClass("cellEditing");
    });
        $(this).find('input').dblclick(function(e){
            e.stopPropagation(); 
        });
    });
});

</script>

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

</head>

<body>

<table class="editableTable">
        <thead>
            <tr>
                <th>Code</th>
                <th>Name</th>
                <th>Email</th>
                <th>Phone</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>001</td>
                <td>Shahid</td>
                <td>shahid@ssiddique.info</td>
                <td>012-234-2432</td> …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery html-table

3
推荐指数
1
解决办法
5927
查看次数

标签 统计

c# ×1

html ×1

html-table ×1

javascript ×1

jquery ×1

winforms ×1