CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Disappear after AjaxRerender

General discussion

by etwoss » 23 Apr 2014 10:36

Hi

I have a strange problem.

My form has 3 dropdowns,with these dropdowns i filter a grid and also re-fill the dropdown values. To show the new content of the dropdowns i use AjaxReRender (with all possible params tested)

What happens?

First show is ok, then i select a value from the first dropdown, so dropdowns are re-calculated, This is done well as i see in codesite. When the form is shown two of the three are disapperead!! In Chrome the first one is there the other are gone! In IE the first and second are gone the last one is there!!!

So i still have 1 dropdown left. if i select a value there, the others are coming back (showing) and then all keeps working ok.

Very strange right?

The first picture shows the form when its shown first, then in the first combox i select 100000, the second image is the result in Chrome , the third in IE11
After selecting a record in the one combobox showing the result is image 4
After this everything is working ok

Code when method starts

Code: Select all
    IWCGJQComboBoxCostCentre.Items.Clear;
    IWCGJQComboBoxDepartment.Items.Clear;
    IWCGJQComboBoxCurrency.Items.Clear;


Then i fill the grid a fill three stringlists with possible values from the dropdowns
Then i fill the dropdowns based on the Stringlist and also set its index

Code: Select all
    FFilterValueCostCentreIndex := DEF_NUMBER;

    for i  := 0 to FConstCentreList.Count - 1 do
    begin
      if (FConstCentreList[i] = FFilterValueCostCentre) then
        FFilterValueCostCentreIndex := i + 1;

      IWCGJQComboBoxCostCentre.Items.AddOption(FConstCentreList[i], '');
    end;

    if (FFilterValueCostCentreIndex <> DEF_NUMBER) then
    begin
      IWCGJQComboBoxCostCentre.SelectedIndex := FFilterValueCostCentreIndex;
    end;

    if (FDepartmentList.Count > 0) then
    begin
      IWCGJQComboBoxDepartment.Items.AddOption('ALL', IntToStr(DEF_NUMBER));
    end;

    FFilterValueDepartmentIndex := DEF_NUMBER;

    for i  := 0 to FDepartmentList.Count - 1 do
    begin
      if (FDepartmentList[i] = FFilterValueDepartment) then
        FFilterValueDepartmentIndex := i + 1;

      IWCGJQComboBoxDepartment.Items.AddOption(FDepartmentList[i], '');
    end;

    if (FFilterValueDepartmentIndex <> DEF_NUMBER) then
    begin
      IWCGJQComboBoxDepartment.SelectedIndex := FFilterValueDepartmentIndex;
    end;

    if (FCurrenctList.Count > 0) then
      IWCGJQComboBoxCurrency.Items.AddOption('ALL', IntToStr(DEF_NUMBER));

    FFilterValueCurrencyIndex := DEF_NUMBER;

    for i  := 0 to FCurrenctList.Count - 1 do
    begin
      if (FCurrenctList[i] = FFilterValueCurrency) then
        FFilterValueCurrencyIndex := i + 1;

      IWCGJQComboBoxCurrency.Items.AddOption(FCurrenctList[i], '');
    end;

    if (FFilterValueCurrencyIndex <> DEF_NUMBER) then
    begin
      IWCGJQComboBoxCurrency.SelectedIndex := FFilterValueCurrencyIndex;
    end;

    IWCGJQComboBoxCostCentre.AjaxReRender(True,True);  // Tested with all combinations of True/False
    IWCGJQComboBoxDepartment.AjaxReRender(True,True);
    IWCGJQComboBoxCurrency.AjaxReRender(True,True);

You do not have the required permissions to view the files attached to this post.
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

Return to General - Archive

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.