This is a migrated thread and some comments may be shown as answers.

Keyboard display on selected item

1 Answer 96 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 12 Sep 2019, 09:17 PM

I am trying to display the keyboard when a user clicks on the row you will see I am using xamrian dialog kit to launch a popup. However I have tried to display the keyboard which you will see below.

 

I tried using the following  but the keyboard is still not showing until the user enters the dialog kit field.

 

           new Entry()
           {
               Keyboard = Keyboard.Numeric
           };

 

 

private async void GrdMultipleBins_SelectionChanged(object sender, Telerik.XamarinForms.DataGrid.DataGridSelectionChangedEventArgs e)
   {
 
       if (grdMultipleBins.SelectedItem != null)
       {
 
           isSplitBin = true;
           var item = grdMultipleBins.SelectedItem as StockTakeAllItems;
           lblBin.Text = item.BinName;
           StockSheetCountItemId = item.StocktakeCountShtItemID;
           lblbarCode.Text = item.Barcode.ToString();
           lblStockCode.Text = item.Code;
           lblDescription.Text = item.Name;
           lblBin.Text = item.BinName;
           lblUomText.Text = item.StockUnitName;
 
           new Entry()
           {
               Keyboard = Keyboard.Numeric
           };
 
           var resultQty = await Plugin.DialogKit.CrossDiaglogKit.Current.GetInputTextAsync("Fuel", $"Please goto Bin {item.BinName} , and enter the visible stock of the item." + item.Name, null, Keyboard.Numeric);
           decimal.TryParse(resultQty, out decimal qtyCounted);
 
           if (resultQty == null) // hack user cancled here
           {
 
 
           }
 
           lblQtys.Text = qtyCounted.ToString();
           StockTakeTransaction stockTake = new StockTakeTransaction();
           stockTake.StockTakeCountSheetItemId = item.StocktakeCountShtItemID;
           stockTake.Quantity = qtyCounted;
 
 
           SaveFunction(sender, e);
       }
 
 
   }

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 13 Sep 2019, 10:25 AM

Hello David,

The reason behind this behavior is because the keyboard is shown when the DataGrid is in edit mode. Let me explain in details: the keyboard is shown if you double tap on a cell and the DataGrid CellDoubleTap command is executed (which triggers begin edit command).

Solution:

You can show the keyboard when DataGrid Cell is tapped. So you will need to execute the BeginEdit command on CellTap. More details how this could be achieved can be found at the following thread from our forum:Single tap to edit cell.

I hope this will help.

Regards,
Didi
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DataGrid
Asked by
David
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or