Column width of a DataGrid in Windows Mobile Application (Motorola MC55)
NickName:Malawirel Ask DateTime:2016-08-02T21:28:40

Column width of a DataGrid in Windows Mobile Application (Motorola MC55)

I try to adjust the column width of a DataGrid in C# for a Windows Mobile application that will run on a Motorola MC55.

I use the following code to do this:

dataGrid1.TableStyles.Clear();
DataGridTableStyle tableStyle = new DataGridTableStyle();
tableStyle.MappingName = t.TableName;
foreach (DataColumn item in t.Columns)
{
    DataGridTextBoxColumn tbcName = new DataGridTextBoxColumn();
    tbcName.Width = 100;
    tbcName.MappingName = item.ColumnName;
    tbcName.HeaderText = item.ColumnName;
    tableStyle.GridColumnStyles.Add(tbcName);
 }
 dataGrid1.TableStyles.Add(tableStyle);

This is running fine on the Windows Mobile 6.5.3. Professional Emulator. Unfortunately it is not working on the Motorola MC55.

On the MC55 the column width is even smaller compared to when I uncomment the code shown above.

Can you please help me to get this working on the MC55?

Copyright Notice:Content Author:「Malawirel」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/38721837/column-width-of-a-datagrid-in-windows-mobile-application-motorola-mc55

More about “Column width of a DataGrid in Windows Mobile Application (Motorola MC55)” related questions

Column width of a DataGrid in Windows Mobile Application (Motorola MC55)

I try to adjust the column width of a DataGrid in C# for a Windows Mobile application that will run on a Motorola MC55. I use the following code to do this: dataGrid1.TableStyles.Clear();

Show Detail

Windows Mobile 6.5 file system crash Motorola MC55 when running .NET CF 3.5 application

I have issues with .NET CF 3.5 application on Windows Mobile 6.5 on Motorola MC55 device. We have around 150 devices which run a barcode scanning application written in C# Compact Framework 3.5. The

Show Detail

MC55 Barcode Application

MC55 Barcode Application Please excuse my ignorance on this as I only came across this requirement a day ago and my programming knowledge is C and Unix. I want to write an application for the MC5...

Show Detail

Can a custom .net application be written for MC55

Is it possible to write a custom application that supports the .net framework for a Motorola MC55 mobile device. If so what version of the framework should be used? This device is attached to a PC...

Show Detail

Motorola MC55 Unique ID

In Motorola MC55, I'd like to get the factory or unique id or serial no of the scanner. How to code it in vb.net?

Show Detail

How to set "orange button" state on Motorola MC55

What I need is to activate "orange button" when user focus TextBox on the form. Orange button is hardware button to switch from one set of keys to another (on hardware keyboard). In this case I nee...

Show Detail

Symbol Motorola mc65 and datawedge

i have an windows mobile application written in c# compact framework which use barcode scanner. In fact that i need to keep my app device independent i don't use constructor's api but i handle scan...

Show Detail

INDOOR Location Using GSM or 2G network for windows mobile

I was wondering how can i get my indoor location using GSM mobile data or 2G network on a windows mobile device. If you could refer a Website/Application that can assist me.. Country: Lebanon Devi...

Show Detail

Column width of a DataGrid in a Windows Mobile Application

I'm having problems trying to adjust the width of a column of a datagrid. I used the answer posted here, but I can't solve it. I'm using a List of objects as a datasource. In this simple example, ...

Show Detail

Windows Forms mobile application: DataGrid with ComboBox column

I'm working on a Windows Mobile 5 application - C# .NET 3.5. Are you aware of some approach to having a ComboBox column within a DataGrid ? The user must be able to select certain values on certai...

Show Detail