Hi,
We are currently using a RadListbox in our software as follow:
<telerik:RadListBox ID="MyListBox" runat="server" OnItemDataBound="BindMyItems" EnableDragAndDrop="false" AutoPostBackOnReorder="true"
AllowReorder="true" OnReordering="ReOrderMyItems" ViewStateMode="Disabled">
<ItemTemplate>
<telerik:RadTextBox ID="MyTextBox" runat="server" />
</ItemTemplate>
</telerik:RadListbox>
My challenge is, when the RadTextBox has got focus and we press shit+ctrl+ <- (back arrow) for selecting the text in the RadTextBox the RadTextBox are removed from the RadListBox. We have a client KeyPress event on the RadTextBox that is added in the codebehind. When this combination of keys are pressed the KeyPress event is triggered, but I get the ctrl key and then the shift key and that is it. It seems like I am not able to catch the combination of the keypress and therefore I am struggling a bit preventing the RadTextBox from being removed
This is how I add the KeyPress event in the codebehing, I am adding it in the BindMyItems(); For IE I am using onkeydown and other browsers I am using onkeypress.
Code behind adding of attribute : MyTextBox.Attributes.Add(lBrowser.Browser == "IE" ? "onkeydown" : "onkeypress", "return MyKeyPressEvent(this, event)");
My Question is, is there a way of catching this keypress combination to prevent this from happening?
Kind Regards,
David.
We are currently using a RadListbox in our software as follow:
<telerik:RadListBox ID="MyListBox" runat="server" OnItemDataBound="BindMyItems" EnableDragAndDrop="false" AutoPostBackOnReorder="true"
AllowReorder="true" OnReordering="ReOrderMyItems" ViewStateMode="Disabled">
<ItemTemplate>
<telerik:RadTextBox ID="MyTextBox" runat="server" />
</ItemTemplate>
</telerik:RadListbox>
My challenge is, when the RadTextBox has got focus and we press shit+ctrl+ <- (back arrow) for selecting the text in the RadTextBox the RadTextBox are removed from the RadListBox. We have a client KeyPress event on the RadTextBox that is added in the codebehind. When this combination of keys are pressed the KeyPress event is triggered, but I get the ctrl key and then the shift key and that is it. It seems like I am not able to catch the combination of the keypress and therefore I am struggling a bit preventing the RadTextBox from being removed
This is how I add the KeyPress event in the codebehing, I am adding it in the BindMyItems(); For IE I am using onkeydown and other browsers I am using onkeypress.
Code behind adding of attribute : MyTextBox.Attributes.Add(lBrowser.Browser == "IE" ? "onkeydown" : "onkeypress", "return MyKeyPressEvent(this, event)");
My Question is, is there a way of catching this keypress combination to prevent this from happening?
Kind Regards,
David.