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.
How can I access a grid cell (in GGC) that corresponds to a particular field (specified by name) of the particular Record?
Cell is needed to set text to. This should make all handlers (such as ApplyFormattedText) execute.
Basically the behavior should be similar to typing text right into the cell except for the cell should not be activated (focused). I suppose the only way to do this is to refer the cell by CellStyleInfo object. How can I get this object for the field of a record?
The grid control may have several top level tables. It also should support grouping by any number of fields as well as related nested tables.
ADAdministrator Syncfusion Team January 19, 2007 09:05 AM UTC
Hi Alexander,
We appreciate your kindly patience.
You can get the cell value of particular field in a record by using GetValue method. The following is the code snippet. >>>>>>>>>>> Code Snippet <<<<<<<<<< object obj = r.GetValue(“Column1”); >>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<
You can set the value to the cell of a record, by using SetValue method. The following is the code snippet. >>>>>>>>>>> Code Snippet <<<<<<<<<< object obj = r.SetValue("Column1",10); >>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<
Also please refer to our evaluation center articles for more details http://www.syncfusion.com/support/evalcenter/default.aspx?cNode=5
Kindly let us know if you need any further assistance. Have a nice day.
Best regards, Madhan
APAlexander PolyakovJanuary 19, 2007 02:03 PM UTC
Cells we need to change have custom CellModel. This CellModel defines custom formatting rules. E.g. column data type is Int32, but the cell displays "One" for value of 1, "Two" for 2 etc. User can type "One" in the cell and the value will be properly converted to 1 and then set to the Record. r.SetValue("Column1", 1). The value "One" cannot be set to record's column of type Int32.
How can I determine ColIndex and RowIndex for the record and the column to use the following code snippet: tableControl.Model[RowIndex, ColIndex].Text = 'One';
If there any other way to set the text so CellModel.ApplyFormatedText has been executed.
ADAdministrator Syncfusion Team January 22, 2007 09:20 AM UTC
Hi Alexander,
Thanks for your response.
You can achieve the intended behavior by two ways. First way is to maintain a separate hash table with key as the user input value and resultant of the hash table to be the integer value. For example, “One” can be made as key and integer ‘1’ can be made has the value. The TableControlCurrentCellValidating can be handled and user input can be validated and respective value can be set accordingly.