Auto postback on checkbox ticked

3 replies. Last post: June 15, 2011 5:33 AM by Riendy Setiadi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hi,

 

I have this webgrid declaration

<ISWebGrid:WebGrid ID="ElementWebGrid" runat="server" Width="725px">
                    <LayoutSettings AllowColumnSizing="No" AllowContextMenu="False" Hierarchical="true">
                        <HeaderStyle Wrap="False" />
                    </LayoutSettings>
                    <RootTable DataMember="Elements" DataKeyField="ElementID">
                        <Columns>
                            <ISWebGrid:WebGridColumn Caption="Element" DataMember="Description"
                                EditType="NoEdit" Width="683px">
                            </ISWebGrid:WebGridColumn>
                        </Columns>
                        <ChildTables>
                            <ISWebGrid:WebGridTable DataMember="Rates" DataKeyField="RateID" AllowEdit="Yes">
                                <Columns>
                                    <ISWebGrid:WebGridColumn Caption="Rate Description" DataMember="RateDescription"
                                        EditType="NoEdit" Width="487px">
                                    </ISWebGrid:WebGridColumn>
                                    <ISWebGrid:WebGridColumn Caption="Rate" DataMember="Rate" Name="Rate"
                                        EditType="Custom" Width="60px" CustomEditorName="WebInputNET" CustomEditorServerId="WebInput1">
                                        <HeaderStyle HorizontalAlign="Center" />
                                    </ISWebGrid:WebGridColumn>
                                    <ISWebGrid:WebGridColumn Caption="Use LIVE Rate" DataMember="Edited" ColumnType="CheckBox"
                                        width="90px" EditType="Checkbox">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <CellStyle HorizontalAlign="Center" />
                                    </ISWebGrid:WebGridColumn>
                                </Columns>
                            </ISWebGrid:WebGridTable>
                        </ChildTables>
                    </RootTable>
                </ISWebGrid:WebGrid>
What I want to achieve is to make the "Rate" cell editable only when the checkbox in the other cell is ticked. Using the grid's UpdateRow event handler does not really do the job because the event only gets triggered when the user finish updating the row.
So what I am looking for is a javascript solution, but it seems there is no way to trigger a javascript function when the checkbox is ticked or unticked, or is there?
btw, the checkbox appears shrunken (smaller than normal size). Is there a way to make the checkbox normal size?
Regards,
Rudy
All times are GMT -5. The time now is 1:23 PM.
Previous Next