그래서이 PDA 장치를 사용하는 회사의 창고 작업자를위한 작은 프로그램을 만들었습니다. http://www.thebarcodewarehouse.co.uk/Images/Product/Default/large/Honeywell-Dolphin60s-image1.jpgWindows Mobile 5.0 Datagrid 열 크기
은 그림에 도시 된 바와 같이이 윈도우 모바일 운영체제 5.0 를 가지며, 상세한 설명 및 부호 열은 동일한 크기를 갖는다. 나는 그것이 오래된 기술이라는 것을 알고 있지만 관리자는 설명 열을로드에서 더 넓게 만들 것을 주장합니다 (수동으로로드 한 후에는 더 크게 만들 수 있습니다).
본인은이 코드를 작성했습니다.
DataGridTableStyle ts = new DataGridTableStyle();
DataGridTextBoxColumn cs = new DataGridTextBoxColumn();
cs = new DataGridTextBoxColumn();
cs.MappingName = "Desc";
cs.HeaderText = "description";
cs.Width = 150;
ts.GridColumnStyles.Add(cs);
cs = new DataGridTextBoxColumn();
cs.MappingName = "Code";
cs.HeaderText = "code";
cs.Width = 50;
ts.GridColumnStyles.Add(cs);
cs = new DataGridTextBoxColumn();
cs.MappingName = "barcode";
cs.HeaderText = "barcode";
cs.Width = 90;
ts.GridColumnStyles.Add(cs);
DgView.TableStyles.Clear(); //DgView is the Datagrid
DgView.TableStyles.Add(ts);
DgView.DataSource = AllKinds.AsEnumerable().
OrderBy(x => x.Field<string>("Desc")).
Select(p => new
{
Description = p.Field<string>("Desc").Trim(),
Code = p.Field<string>("Code").Trim()
}).ToList();
DgView.DataSource를 설정 한 후 DgView 스타일을 설정해보십시오. 맵핑에 대한 DgView 내용을 다시 확인하십시오. BTW : 스크린 샷은 Windows Embedded Handheld 6.5 및 Windows Mobile 5를 실행하는 장치를 보여줍니다! – josef
오, 미안 해요. 내 프로젝트에 윈도우 모바일 5를 넣었습니다. 당신이 말한 것을 시도했지만,로드 할 때 열은 모두 같은 크기입니다. –
과제에 이상이 있어야합니다. 열 머리글을 보면 심지어 적용되지 않습니다. 스타일의 머리글은 "코드"와 "설명"이지만 머리글은 "코드"와 "설명"입니다. – josef