Dynamically added columns in Radgrid headers text gets clears on psotback - telerik-grid

I have a Radgrid with some columns which are pre-defined in aspx template and some which are needed to dynamically add code based on some control events.
Now after Post-back or sorting in grid, the header text of the dynamically added columns gets cleared. And sometimes the values also get cleared. If I bind those columns again on postback then previous column shows system.row values and the new columns gets appended into existing layout.

Based on the documentation from Telerik, the dynamically created columns need to be added in the Init event.
Creating columns in the Page_Load event handler does not work for template columns. For the controls inside a template to persist their ViewState , the grid must be generated completely in the code-behind using the Page_Init event (see below). That way, template controls are instantiated before the LoadViewState event of the page.
You can try moving the adding of the columns in the Page_Init event. If all the columns that you are adding are template columns, this could definitely fix the issues you are having.
I hope this fix can resolve your problem.

Related

Ag-grid valueGetter does not fire when "Column" is out of view or hidden

Use: We use ag-grid like we would use excel on our client software. In it we have some custom calculations that I run with the valueGetter function. Our grid has over 50 ColumnDefs. This means that some of the columns are not in view until you scroll right or left respectively. All my functions work and I have no calculation issues.
Issue: When I edit a Value I have some columns that now need to fire the valueGetter. For the columns that are currently in view they fire and run the calcs without issues, however there are some columns that are out of view and some columns are hidden. On these specifically the grid will not run the value getter until it is in view or the hidden flag on the column has been set to false.
The main reason for this being an issue is that because the grid is so wide I have to hide and show certain columns as a "view Groups". I need to know if there is a gridOptions setting or grid Directive that I am missing? Or is there another solution where I can have the calculations for the entire runs when I edit a field.
ag-grid version 23.0.2
angular version 8
Not sure if you are using Adaptable with your AG Grid implementation but if you are then this might help:
We had this issue a while back and we solved it by moving the custom calculations out of AG Grid and into Adaptable's Calculated Columns which will evaluate whenever any relevant cell in the row updates.

CListCtrl items sorting when click on column header without using callback function

I have an mfc dialog-based application with a CListCtrl box in report view.
It has 4 columns, one is numeric value column and others are all text.
In my application I want to add sorting functionality when I click on any of the headers without using the callback function. And my list items are already populated in the listcontrol box from a database table when I start the application. Can anyone tell me how to do this?

Xpages Repeat Controls Tabular display

I have a situation wherein I need to display all documents in view. Issue is I need to display multivalued fields (can be achieved by modifying view column to display new line). Now issue comes when a column value is also multivalued. E.g. first column is created by looping through 50 fields (single value) and second column is created by looping through corresponding 50 fields but these fields are multivalued.
I am looking for ideas about how to nest repeats in this case. Issue is in first repeat I get the handle of documents but in nested one i am not able to get this handle to be able to loop through fields. And it is not simply one column or value I want to display, there are 4-5 such columns.
Any ideas are welcome.
Thanks in advance.
You want to start looking at a repeat control, not a view control. Have the outermost control loop through the entries in the view and populate the data source of a containing panel with a Notes document. Then inside the panel you only refer to the inner document data source.

How to populate 2 combobox in DevExpress grid?

I am developing a website in which I am using DevExpress controls. I need to add a row using AddNewRow event of the grid. Everything is working fine i.e the data is being saved in the database. But now I need to have 2 comboboxes in the grid itself. One should be populated automatically when we need to add a new row and the second should be populated on the selectedIndexChanged of the first combobox.
The second combobox shold be populated using the selected value of first combobox.
How can i populate the second combobox.
Thanks in Advance
Take a look at the Cascading Combo Boxes demo. I believe that demonstrates exactly what you needed.
Related example:
How to implement cascaded combo box columns in ASPxGridView without using templates.

XPages - Value Picker - Update Multiple fields

I would like to use a dominoViewValuePicker to update several fields with several values. I have seen that it is possible to add multiple values to the one field. Is it possible to select one document from a dominoViewValuePicker and then use multiple values from this document to update multiple fields on the XPage?
Certainly. Just set the onChange event to refresh those fields (preferably, they all go into a panel so that you can do a partial refresh rather than a full refresh) and compute the values (either from the script on the onChange or just by the formulas for determining those values in the first place).
If you do set up a panel for a partial refresh, make sure to give the panel an ID. By default panels are not given ID's and are not available to refresh.

Resources