I want to show the table data on the UI in F&O form without using the grid view or it’s data source properties.
I have 4 tables, each with different columns. I also want to maintain the visibility of columns in the code (sometimes I want to show 4 columns, and the count may change).
for (int i = 3; i < 10; i++)
dgDtl.Columns[i].Visible = false;
Column visibility is maintained in the above ASP .Net core.
Did you look at the code in this class? It uses dictTable & dictField & creates form elements at run time. Is there a specific part of code you don’t understand?
This functionality is complex to implement. If you are not able to understand this code even a little bit, I would suggest first break down the code in parts, learn about all elements used in each part of this code. You can google search each & you will find multiple blogs for them with examples. Implement those individually in jobs & see how they work. If you have specific questions after this, we can help you with them. But I cannot explain the code line by line here.
If this feature is urgent to implement for a project, you need to look for a different solution to implement this.