Hi,
the summary dialog enables me only to check the Count summary type while others are disabled. Setting summary for the grid via API, i.e.
SummarySettings maxSummary = e.Layout.Grid.DisplayLayout.Bands[0].Summaries.Add(tmpCol.Key, SummaryType.Maximum, tmpCol);
works fine and grid displays sum, max, min etc.
What's wrong there? I supoose there is a problem reading data type for columns in the underlying DataTable, am I wrong?
Thanks
Sounds likely it thinks your datatype is a string.
Nick
Yeah, certain options are disabled if the column is non-numeric.
Hi Mike,
I am facing similar problem, Can you please give an example of implementation of PropertyDescriptor?
Regards,
Prasad.
The grid just looks at the PropertyDescriptor types returning by the BindingManager. This should be the same type as your the DataType of the column in your DataTable.
Yes, it sounds like. For some reasons we use ADODB.Recordset as the vehicle between database and application. A conversion to DataTable to be feed into grid is done by the procedure below.
I took a look at ds.GetXml() output - looks like the DataSet knows certain columns are a type of int. Could you please give me a point to check in the dataset metadata to verify data types UltraGrid's reads?
Just note we found another issue while using column selector feature. On some systems the column selector dialog gets red-crossed saying it can not read fields fro the DataSet (the same ADORS originating data used there).
public static DataTable ADORSToDataTable(ADODB.Recordset ADORs){ DataSet ds = new DataSet(); OleDbDataAdapter oleDbDataAdapter1 = new OleDbDataAdapter(); oleDbDataAdapter1.MissingSchemaAction = MissingSchemaAction.AddWithKey; oleDbDataAdapter1.Fill(ds, ADORs, "RecordSet"); Debug.Print(ds.GetXml()); if (ds.Tables.Count > 0) return ds.Tables[0]; else return null; }