javascript - C# hidden field loses value in code behind -
i trying modify example. added new column in grid , in company details fieldset. when change value fieldset want store database , update grid. in grid implement this:
<listeners> <selectionchange fn="onselectionchange" /> </listeners> where in function set hidden field id of selected row:
hdnselid.value = rec.get('siteid'); //by using alert here can see value stored correctly and when change value fieldset call directevent:
<directevents> <blur onevent="unnamed_event" /> </directevents> in codebehind in unnamed_event when try parse value of hidden field empty.
code
grid:
<ext:gridpanel id="sitegrid" runat="server" flex="8" storeid="storesites" cls="my-custom-grid"> <tools> <ext:tool type="refresh" tooltip="refresh" handler="#{storesites}.reload(); " /> </tools> <columnmodel> <columns> <ext:column id="site" runat="server" text="site" dataindex="title" flex="9" /> <ext:column id="siteid" runat="server" text="id" dataindex="siteid" flex="1" align="center" /> <ext:column id="clmassessment" runat="server" text="assessment" dataindex="assessment" flex="3" > <editor> <ext:textfield runat="server" id="txtassessment" /> </editor> </ext:column> </columns> </columnmodel> <listeners> <selectionchange fn="onselectionchange" /> </listeners> </ext:gridpanel> textarea in fieldset:
<ext:textarea id="txteditassessment" runat="server" fieldlabel="assessment" name="assessment" dataindex="assessment" editable="true" > <directevents> <blur onevent="unnamed_event" /> </directevents> </ext:textarea>
Comments
Post a Comment