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.
ES 2.0.6.0
I have a GDBG and I want to change the display text of a column based on the value of a non-displayed column in the same row. Which event will allow me to do this?
Sean
ADAdministrator Syncfusion Team July 11, 2004 06:32 PM UTC
You can try PrepareViewStyleInfo. If e.ColIndex points to the column you want to format, then set e.Style.Text to whatever you want to see.
SGSean GreerJuly 11, 2004 06:56 PM UTC
That got me half way there. When the grid intially renders the value that is displayed is the value that I provided via PVSI. However, then I click on the cell I see the actual underlying value and not the value provided by PVSI. The cell type is Static.
Any thoughts?
ADAdministrator Syncfusion Team July 11, 2004 09:25 PM UTC
To handle setting the text when the cell becomes current, you can subcribe to CurrentCellInitializeControlText and do the work there setting e.ControlText toyour desired text and also setting e.Cancel = true so the grid will not reset things.
ADAdministrator Syncfusion Team July 12, 2004 05:06 AM UTC
You can do it using a single event in grid.Model.QueryCellInfo using code similar to what you put in PrepareViewStyleInfo.
(If you are trying to change cell 1,1, and if you subscribe to the event AFTER you set the DataSource of the grid, then you will have to do something like call this.gridDataBoundGrid1.CurrentCell.ResetCurrentCellWithoutDeactivate() to reset the current cell so its value can be modified through QueryCellInfo since it was already set when you set the DataSource. You can make this call right after you subscribe to teh event).