Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I need to catch the KeyUp event in my column which is in a DataGrid.

 

I am only able to catch the KeyPress event or TextChanged event

which I have successfully attached to each of my columns (DataGridTextBox.TextBox) in the DataGrid.

 

What can be wrong with catching KeyUp?

Is it something that catches this event instead of my target?

Posted

thomas,

 

To handle keyboard events only at the form level and not allow other controls to receive keyboard events, set the KeyPressEventArgs.Handled property in your form's KeyPress event-handling method to true. Certain keys, such as the TAB, RETURN, ESCAPE, and arrow keys are handled by controls automatically. In order to have these keys raise the KeyDown event, you must override the IsInputKey method in each control on your form. The code for the override of the IsInputKey would need to determine if one of the special keys is pressed and return a value of true.

 

 

checkout the following link

http://www.codeproject.com/cs/miscctrl/dotnetcolorpicker.asp

search for how to override the IsInputKey

You're either a one or a zero. Alive or dead.
Posted

Good day Thomas10001,

 

How do you catch the itemchange of a column in the datagrid?

 

The scenario is I have a dropdownlistbox column and beside it is a textbox whose value is dependent on the selected value in the dropdownlistbox. These two fields are contained in a datagrid.

 

Could you help me? You said on your first thread that you are able to catch the TextChanged event. This might help me in my problem.

 

Could you give me a sample code for this?

 

Thanks. :)

Posted
Sorry I dont have the code available at this computer. But its easy to do if you do it in the design mode. Select your listbox and click on the events button in the property window. Then find the TextChanged event and enter a name for the method that (will be created) called when TextChanged occurs.
  • 3 weeks later...
Posted

Thanks. But my project is in Net so I didn't find the events button in th property window.

 

But what I did was to make a public sub event: example uf_changed() and called it in the html code like this:

 

<asp:DropDownList id="ddlrano" tabIndex="2" runat="server" Width="80px" AutoPostBack="True" OnSelectedIndexChanged="uf_changed"></asp:DropDownList>

 

This now works.

 

Thanks. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...