Combobox as editor inside grid - Clicking down arrow throws error

  1. #1

    Combobox as editor inside grid - Clicking down arrow throws error

    hi,
    I am using RowEditor functionality..

    Below is my Grid Panel code
    <ext:GridPanel ID="Grid_Education" runat="server" Border="true" Height="580" Title="">
    <Store>
    <ext:Store ID="Store_Education" runat="server" AutoLoad="true">
    <Reader>
    <ext:JsonReader>
    <Fields>
    <ext:RecordField Name="Degree" />
    <ext:RecordField Name="Institute" />
    <ext:RecordField Name="Grade_Percentage" />
    </Fields>
    </ext:JsonReader>
    </Reader>
    </ext:Store>
    </Store>
    <Plugins>
    <ext:RowEditor ID="RowEditor1" runat="server" SaveText="Update" />
    </Plugins>
    <View>
    <ext:GridView ID="GridView1" runat="server" MarkDirty="false" />
    </View>
    <TopBar>
    <ext:Toolbar ID="Toolbar1" runat="server">
    <Items>
    <ext:Button ID="Button1" runat="server" Text="ADD EDUCATION" Icon="UserAdd">
    <Listeners>
    <Click Fn="addDegree" />
    </Listeners>
    </ext:Button>
    <ext:Button ID="Button2" runat="server" Text="REMOVE EDUCATION" Icon="UserDelete">
    <Listeners>
    <Click Fn="removeDegree" />
    </Listeners>
    </ext:Button>
    </Items>
    </ext:Toolbar>
    </TopBar>
    <SelectionModel>
    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
    </SelectionModel>
    <ColumnModel>
    <Columns>
    <ext:RowNumbererColumn />
    <ext:Column Header="Degree" DataIndex="Degree" Width="220" Sortable="true">
    <Editor>
    <ext:ComboBox ID="Degree" runat="server" AllowBlank="false" DisplayField="DegreeName"
    ValueField="DegreeId" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All">
    <Store>
    <ext:Store runat="server" AutoLoad="true">
    <Reader>
    <ext:JsonReader>
    <Fields>
    <ext:RecordField Name="DegreeId" />
    <ext:RecordField Name="DegreeName" />
    </Fields>
    </ext:JsonReader>
    </Reader>
    </ext:Store>
    </Store>
    <Listeners>
    <Focus Scope="this" Handler="el.onTriggerClick();" Buffer="50" />
    </Listeners>
    </ext:ComboBox>
    </Editor>
    </ext:Column>
    <ext:Column DataIndex="Institute" Header="Institute / Certification Body">
    <Editor>
    <ext:TextField ID="Institute" runat="server" AllowBlank="false" />
    </Editor>
    </ext:Column>
    <ext:Column DataIndex="Grade_Percentage" Header="Grade / Percentage">
    <Editor>
    <ext:TextField ID="Grade_Percentage" runat="server" AllowBlank="false" />
    </Editor>
    </ext:Column>
    </Columns>
    </ColumnModel>
    </ext:GridPanel>



    Here is the script:
    <ext:XScript ID="XScript1" runat="server">
    <script type="text/javascript">
    var addDegree = function () {
    var grid = #{Grid_Education};
    grid.getRowEditor().stopEditing();

    grid.insertRecord(0, {
    Degree : "",
    Institute : "",
    Grade_Percentage : ""
    });

    grid.getView().refresh();
    grid.getSelectionModel().selectRow(0);
    grid.getRowEditor().startEditing(0);
    }
    </script>
    </ext:XScript>


    It throws some error in metadata of aspx file in the line : B=new Function(p,y,c+e+p+"; }")
    Microsoft JScript runtime error: Object doesn't support this action..
    Could some one help me on this....
    Last edited by Sunram; Sep 08, 2011 at 12:14 PM.

Similar Threads

  1. [CLOSED] Grid column hyperlink throws a JS error when clicked
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Feb 23, 2012, 2:52 PM
  2. Replies: 4
    Last Post: Jan 16, 2012, 1:14 AM
  3. Replies: 2
    Last Post: May 30, 2011, 6:53 AM
  4. [CLOSED] ComboBox inside a Grid (editor)
    By GmServizi in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Nov 19, 2009, 11:48 AM
  5. ComboBox Editor inside GridPanel
    By jsemple in forum 1.x Help
    Replies: 1
    Last Post: Feb 27, 2009, 12:58 PM

Posting Permissions