GridTextColumn with Numeric Keyboard

Good-Morning,

Is it possible to load numeric keyboard when clicking on a particular GridTextColumn cell? 
If so is it possible to provide me with a solution.

Thank-you

1 Reply

SS Sivaraman Sivagurunathan Syncfusion Team January 31, 2018 06:28 PM UTC

 Hi Wayne, 
 
Thanks for using Syncfusion Support. 
 
We have checked your query. you can achieve your requirement by writing a custom renderer for TextView and override the OnEnteredEditMode. We have prepared sample based on your requirement and attached for your reference you can download the same  from the below link.  
 
 
 
dataGrid.CellRenderers.Remove("TextView"); 
dataGrid.CellRenderers.Add("TextView", new GridCellTextViewRendererExt()); 
 
public class GridCellTextViewRendererExt : GridCellTextViewRenderer 
{ 
    public GridCellTextViewRendererExt() 
    { 
    } 
    public override void OnInitializeEditView(DataColumnBase dataColumn, SfEntry view) 
    { 
        base.OnInitializeEditView(dataColumn, view); 
    } 
 
    protected override void OnEnteredEditMode(DataColumnBase dataColumn, View currentRendererElement) 
    { 
        base.OnEnteredEditMode(dataColumn, currentRendererElement); 
        if (dataColumn.GridColumn.MappingName == "OrderID" && dataColumn.RowIndex == 1) 
            (currentRendererElement as SfEntry).Keyboard = Keyboard.Numeric; 
        else 
            (currentRendererElement as SfEntry).Keyboard = Keyboard.Text; 
    } 
} 
 
 
 
Regards, 
Sivaraman  
 


Loader.
Up arrow icon