Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
445
Checkbox column's inside webdatgrid posts back to server for several times
posted

Hi,

I have a webdatagrid with a checkbox column inside an ItemTemplate and a submit button as below

<Columns>

                <ig:TemplateDataField Key=" boolColumn">

                    <ItemTemplate>

                        <asp:CheckBox ID="CheckBox1" runat="server" AutoPostback="true" onCheckedChanged="CheckBox1_CheckedChanged"

                        Checked='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "boolColumn")%>'>

                        </asp:CheckBox>

                    </ItemTemplate>

                    <Header Text="boolColumn" />

                </ig:TemplateDataField>

  </Columns>

<asp:button ID="btnSave" text="Save" runat="server" onClick="SaveGrid"/>

So now,I have a bunch of records with a checkbox column and a postback happens when I check/uncheck a checkbox, as intended. But the problem here is, if I have my checkbox selected on 2 rows,  the postback happens for 2 times and if 3 checkboxes on 3 rows are selected, then the postback happens 3 times. On top of it, when I click my save button, the checkbox's "CheckChanged" event gets fired first and then the save event gets fired. 

Really wired. I dont understand why it happens, do you know why it is and have any solution for this?.

Parents
No Data
Reply
  • 49378
    posted

    Hello Nagaraj,

    Thank you for bringing this issue to our attention. Using the databinder appears to have a relation to the issue in this case. After investigating the scenario, I have asked our engineers to look into this matter further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 157288.  The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.

    You can also continue to send updates to this case at any time.

    You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site. 

    Please let me know if you need more information.

Children