The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I have DataBoundGrid binded to table in DataSet. I am adding unbound column to GridBoundColumns collection. When I''m trying to set value to the cell in unbound column - the cell remains empty.
.....
int unboundColIdx = 2;
gridDataBoundGrid1[1,unboundColIdx].Text = "aaa";
.....
What I have to do in order to display constant values in unbound column?
Thanks,
Alex.
ADAdministrator Syncfusion Team December 17, 2003 01:08 PM UTC
You would need to handle the grid.Model.QueryCellInfo event and if e.ColIndex points to your unbound column and e.RowIndex > 0, then set e.Style.Text to the value you want to see for this row.
GSGreg ShometteJanuary 23, 2004 09:37 PM UTC
Is there an other event that I can use instead of QueryCellInfo. When I use QueryCellInfo event everytime I touch the grid it fires, I need to enter a value in my qty column and after the value changes in the qty column I would like to have a unbound calculated column.
Thanks
ADAdministrator Syncfusion Team January 23, 2004 10:34 PM UTC
QueryCellInfo is the place you need to do this. The event is fired everytime something needs teh value of a cell. You should use e.ColIndex and e.RowIndex to control exactly when you hit your code to provide the value for your unbound column.
You could store the calculations in some structure like an array or arraylist or hashtable, and do the calculations and store the calculated values into your structure in a CuurentCellAcceptedChanges event (for example). Buy you still will have to handle QueryCellInfo to provide the values from your structure when the QueryCellInfo requests one of your unbound columns.
CHchinniFebruary 6, 2004 02:44 AM UTC
Where do i find this event grid.Model.QueryCellInfo event can anyone send me an example of this
ADAdministrator Syncfusion Team February 6, 2004 07:50 AM UTC
Do a ''Find in Files'' on QueryCellInfo in the Syncfusion\Essential Suite\Grid\Samples folder and you will get 80 or 90 hits for samples uses of this event.
If you are using it in a GridDataBoundgrid, try the Grid\Samples\DataBound\GDBGMultiHeader sample.
The virtual grid tutorials are another straight-forward example, but it is based on a GridCotrol. But the idea is the same.