User Profile & Activity

Eray Geveci Member
Page
of 2

Hello leo, 

the next button is an external button which loads a new view. i tried OnLostFocus but it wont fire when i press an asp.net button. how can i force the webgrid to save the informations?

but we need a solution for ie 11 to ie 8 users without the compatibility mode. 

Posted: February 19, 2014 4:24 AM
i tried it but still does't work.
the column in ms sql for the checkbox was numeric , i changed it to varchar and now it  works. thanks anyway for your help
Posted: December 3, 2012 6:42 AM

thanks for your answer, but the webgrid.refreshall() still resets the selected webcombo to the default value. i need to add the value after the refresh of the webgrid. 

thank you but i must check if the value that i entered in the webcombo exists in the datasource. 


when i enter a value it autocomplete it and the status is internal, but when i enter a value that is not in the datasource the status should change to external before adding. 

I found a solution, thanks anyway

 function WebCombo1_OnAfterItemSelected(controlId) {
            var WebCombo1 = ISGetObject("WebCombo1");
            var grid = ISGetObject("WebGrid1");
            grid.GetSelectedObject().ToRowObject().GetCell('NAME').SetText(WebCombo1.GetSelectedRow().cells[1].innerText, true);
            return true;
        }

 

Posted: November 20, 2012 2:57 AM

i activated the multiplecolums and it worked. thanks anyway

i tried your solution. when i debug the page i can see that it saves the correct name in this line:

gridCellCity.SetText(WebCombo2.GetSelectedRow().cells[1].innerText, true);

but the row is still empty. 

the datasource look like this:

        WebCombo1.DataSource = allUsers
        WebCombo1.DataTextField = "Trigram"
        WebCombo1.DataValueField = "Trigram"
        WebCombo1.DataBind()
        WebCombo2.DataSource = allUsers
        WebCombo2.DataTextField = "Name"
        WebCombo2.DataValueField = "Name"
        WebCombo2.DataBind()

 And here are the functions:

 function WebCombo1_OnAfterItemSelected(controlId) {
            var WebCombo1 = ISGetObject("WebCombo1");
            var WebCombo1_rowIdx = WebCombo1.GetSelectedRow().rowIndex;
            var grid = ISGetObject("WebGrid1");
            var gridRow = grid.GetSelectedObject().GetRowObject();
            var gridCell = gridRow.GetCells();
            var gridCellCity = gridCell.GetNamedItem("TRIGRAM");
            gridCellCity.SetText(WebCombo1.GetSelectedRow().cells[1].innerText, true);
            return true;
        }
        function WebCombo2_OnAfterItemSelected(controlId) {
            var WebCombo2 = ISGetObject("WebCombo2");
            var WebCombo2_rowIdx = WebCombo2.GetSelectedRow().rowIndex;
            var grid = ISGetObject("WebGrid1");
            var gridRow = grid.GetSelectedObject().GetRowObject();
            var gridCell = gridRow.GetCells();
            var gridCellCity = gridCell.GetNamedItem("NAME");
            gridCellCity.SetText(WebCombo2.GetSelectedRow().cells[1].innerText, true);
            return true;
        }

Webcombo 1

      <ISWebCombo:WebCombo ID="WebCombo1" runat="server" Height="20px" 
                UseDefaultStyle="True" Width="300px" DataMember="">
                <LayoutSettings EntryMode="AutoComplete" AlwaysShowAllRowsOnDropdown="true" ComboMode="MultipleColumns">
                <ClientSideEvents OnAfterItemSelected="WebCombo1_OnAfterItemSelected" />
                </LayoutSettings>
            </ISWebCombo:WebCombo>

 Webcombo 2

<ISWebCombo:WebCombo ID="WebCombo2" runat="server" UseDefaultStyle="True" 
             DataMember="" Height="20px" Width="300px">
        <LayoutSettings EntryMode="AutoComplete" AlwaysShowAllRowsOnDropdown="true" ComboMode="MultipleColumns">
        </LayoutSettings>
         </ISWebCombo:WebCombo>

 Webgrid

  <ISWebGrid:WebGridColumn Caption="Trigram" DataMember="TRIGRAM" Name="TRIGRAM" 
                        EditType="WebComboNET" WebComboID="WebCombo1" Width="200px" meta:resourcekey="Trigram">
                        </ISWebGrid:WebGridColumn>
                        <ISWebGrid:WebGridColumn Caption="Name" DataMember="NAME" Name="NAME"
                         EditType="WebComboNET" WebComboID="WebCombo2" Width="200px" meta:resourcekey="Name"
                            InputRequired="true">
                        </ISWebGrid:WebGridColumn>

 

 

All times are GMT -5. The time now is 4:26 PM.
Previous Next