We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Change System Keyboard Language in GDBG

Hi, I have a GDBD and I would like to change the system keyboard input language from english to arabic when the user click a cell which has got the Right-To-Left style set to true, i would like to know which event is best to perform this action (CurrentCellChanging,CellClick,etc...), am using vb.net Regards, Osden.

3 Replies

AD Administrator Syncfusion Team February 1, 2005 12:47 PM UTC

I would try the CurrentCellControlGotFocus event. The control is passed in as e.Control.

OP Osden Pereira February 2, 2005 10:28 AM UTC

Hi Clay, We tried the event you had mentioned and also some other events, but the problem is, whenever a column is clicked or moved to, the first character is typed in the other language, example:if i move from a normal english field(left-to-right) to an arabic field(right-to left) the first character typed in the cell id english & then it types the rest in arabic & vice-versa. here is the code: -------------------------------------------- Dim Ci As CultureInfo Public Sub CurrentCellControlGotFocus(ByVal sender As Object, ByVal e As System.Windows.Forms.ControlEventArgs) Try If CType(sender, GridDataBoundGrid).Binder.InternalColumns(CType(sender, GridDataBoundGrid).CurrentCell.ColIndex).StyleInfo.RightToLeft = RightToLeft.Yes Then System.Windows.Forms.InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(Ci.CreateSpecificCulture("ar-SA")) Else System.Windows.Forms.InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(Ci.CreateSpecificCulture("en-US")) End If Catch Ex As Exception MsgBox(Ex.Message) End Try End Sub

AD Administrator Syncfusion Team February 2, 2005 10:42 AM UTC

Osdem, CurrentCellGotFocus is normally raised only after the first key was pressed. I see two alternative options: - You can set Grid.Model.Options.ActivateCurrentCellBehavior = GridCellActivateAction.SetCurrent. The CurrentCellGotFocus will be raised as soon as the current cell was moved. or - You can try handling the CurrentCellActivated event. That gets called right after the current cell was moved. At the time this event is called the textbox is not yet visible. The text will still be drawn static. The event is raised before the first key is pressed. One more thing: If you run into any trouble with the RichTextBox used inside cells set grid.Model.Options.UseRightToLeftCompatibleTextBox Stefan

Live Chat Icon For mobile
Up arrow icon