how to put checkboxes in datagrid in windows mobile 6 using c#?
dataset dsAgent=table;
DataTable dataTable = dsAgent.Tables[0];
DataGridTableStyle tableStyle = new DataGridTableStyle();
tableStyle.MappingName = dataTable.TableName;
GridColumnStylesCollection columnStyles = tableStyle.GridColumnStyles;
DataGridTextBoxColumn columnStyle = new DataGridTextBoxColumn();
columnStyle.MappingName = "FirstName";
columnStyle.HeaderText = "Name";
columnStyle.Width = 80;
columnStyles.Add(columnStyle);
//columnStyle = new DataGridTextBoxColumn();
//columnStyle.MappingName = "EmailAddress";
//columnStyle.HeaderText = "EmailID";
//columnStyle.Width = 150;
//columnStyles.Add(columnStyle);
columnStyle = new DataGridTextBoxColumn();
columnStyle.MappingName = "WorkPhone";
columnStyle.HeaderText = "PhoneNo";
columnStyle.Width = 150;
columnStyles.Add(columnStyle);
GridTableStylesCollection tableStyles = DataGrid.TableStyles;
tableStyles.Add(tableStyle);
DataGrid.PreferredRowHeight = 16;
DataGrid.RowHeadersVisible = false;
DataGrid.DataSource = dataTable;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…