Can any solve this?????
-
I want to connect dataset table (returning dataset form a web services) with a table in a datagrid. The problem is I just want to use a selected amount of columns from the dataset. Any ideas would be appreciated Thanks :)
Are you autogenerating the columns in the datagrid? Just so I understand. You are populating the datagrid with one dataset and want to add another dataset (from a webservice)? Have you look at the merge method?
-
I want to connect dataset table (returning dataset form a web services) with a table in a datagrid. The problem is I just want to use a selected amount of columns from the dataset. Any ideas would be appreciated Thanks :)
You need to create your to add a table styles object to the tablestyles collection. This will allow you to specify column mappings and so on. Of course you could set the width to 0 and that would also hide them This way is better in that you can create custom columns like check bools combos and what not example: DataGridTableStyle newStyle = new DataGridTableStyle(); newStyle.MappingName = "CCheckInList"; // This is the name of the table newStyle.ColumnHeadersVisible = true; DataGridTextBoxColumn gridColumn = new DataGridTextBoxColumn(); gridColumn.MappingName = "Dispatcher"; // This is the column name gridColumn.NullText = "Must Assign"; gridColumn.HeaderText = "Dispatcher"; gridColumn.Width = 100; newStyle.GridColumnStyles.Add(gridColumn); TableStyles.Clear(); this.TableStyles.Add(newStyle); I'm not an expert yet, but I play one at work. Yeah and here too.
-
I want to connect dataset table (returning dataset form a web services) with a table in a datagrid. The problem is I just want to use a selected amount of columns from the dataset. Any ideas would be appreciated Thanks :)