开发者

Selected Value appear in the gridview

Using VB.Net (Windows Application)

Gridview and Textbox

When I enter the number or character in the textbox, that value should blink in the gridview.

For Example,

GridView has

 ID Name

001 Jagan
002 Raman
开发者_开发技巧003 Antony
........

. When the following data is entered, Textbox1.text = 01 (then ID:001 should Blink in Gridview), Textbox1.text =Raman (then Name: Raman should Blink in Gridview)

How can I do this?

Need VB.Net Code. Please help.


It's very simple.Add timer to your form,sets its interval to 100 millisecond and in timer1_Tick event toggles textbox appearance as below.

    int flag = 1;
    private void timer1_Tick(object sender, EventArgs e)
    {
        if (flag == 1)
        {
            textBox1.ForeColor = Color.Blue;
            textBox1.Font = new Font("Tahoma", 9, FontStyle.Bold);
            textBox1.BackColor = Color.WhiteSmoke;
            flag = 2;
        }
        else
        {
            textBox1.ForeColor = Color.Black;
            textBox1.Font = new Font("Tahoma", 9, FontStyle.Regular);
            textBox1.BackColor = Color.White;
            flag = 1;
        }

    }                  

You can apply more specific designing style which would blink your textbox's text.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜