Hi,
We have found the following behavior with Web Grid, and want to confirm if the same is a bug.
Created an Unbound column of CheckBox Type, and placed a 'Test Postback' on the page (outside the WebGrid).
Check one or more Check Boxes
Click 'Test Postback'
It works fine for the first postback.
User sees Check Boxes selected still.
Click 'Test Postback' again
This empties unchecks all Check Boxes in the Column.
Can somebody tell me if this behavior is by design or is a bug?
Also, is there any solution as we need to keep the CheckBox selection as is across all postbacks (Except converting the unbound column to a bound column and preserving its state in source data object).
Regards,
MPVBRao.
Did you add the unbound column in code or in the designer?
If you added the column in code, how did you do it? It's possible that the column isn't being stored in ViewState. Depending on how you created the column object, this might be an expected result. The following post provides more details on this behavior, and how to get around it:https://es.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/52172/ultracombo-with-dropdownlist-style-has-missing-borders#52172
It is defined in design as given below,
<igtbl:UltraGridColumn Key="Select" Type="CheckBox" DataType="System.Boolean" Width="1%"
AllowUpdate="Yes">
<Header Caption="Select">
<RowLayoutColumnInfo OriginX="7" />
</Header>
<Footer>
</Footer>
</igtbl:UltraGridColumn>
Thanks & Regards,
Hello,
I just want to refer to a similar thread I've seen recently and that can provide some help/clues:
http://forums.infragistics.com/forums/p/13065/48331.aspx
I was also able to reproduce that behaviour, but at this point I am not sure if it is by design or a bug - e.g. if the developer should be responsible for keeping the state of unbound checkbox columns. You may want to check out if the client-side approach works better for you. Alternatively you can move to unbound mode or manually take care of the state of the column (e.g. put a list of boolean values in the Session / ViewState / Cache of the application and the restore after postback).
Or, you can contact our Developer Support directly via this link - this way the question will most probably be referred to development for a more complete answer.
http://es.infragistics.com/Support/default.aspx
Sorry for the inconvenience.
Hi Rumen,
I have already gone through that discussion.
Still there is an unanswered question posted by rickloyd
Thats why I raised a new question/thread.
Yes, this is correct, I believe at this point this should go for review to development so that we can see if this is considered a bug or not. Were you able to submit a ticket to Developer Support so this can go through the official channels (this forum is considered peer-to-peer and community resource and while we do our best to help here as well, some issue like that that cannot be resolved over the forums need to go through the official channels) ?
I have the same problem in my project. Any solution yet?
Regards
Bjarte Karlsen
CEO iSentio AS.
I have double checked this problem with development and this is considered not a bug. Depending on your scenario (I am assuming you are using InitializeDataSource event) you may need to persist manually (with code) the values of the checkboxes - this can be for example ArrayList or List of boolean values in Session / Cache / ViewState and then restore, since databinding essentially clears grid row data.
I think Vince described that best with this
<quote>
"Since you're using the InitializeDataSource event, the grid is implicitly calling DataBind() on every postback. Since you're not persisting the value in these checkboxes in any way, they're lost on the postback that occurs after the postback where they were changed. I see two options. One is to persist the value of the checkbox on each row in some fashion. The other is to not use the InitializeDataSource event, and thus take direct control as to when you call the grid's DataBind() event."
</quote>
I see two options. One is to persist the value of the checkbox on each row in some fashion. The other is to not use the InitializeDataSource event, and thus take direct control as to when you call the grid's DataBind() event."
so, which event do we have access to the datagrid rows and its values before InitializeDataSource is called to rebind to persist value of the checkbox?
The below is the conversation on the support case I opened regarding this issue.
Support Request CAS-14180-IB3NB9
Your case has been closed.
If you feel that your issue is still not resolved, you can reopen this case within the next 30 days, using the "Reopen" button when viewing this case at the "My Support Requests" page of our website.
After 30 days, the case cannot be reopened. If you need further assistance after this timeframe, please submit a new support request, and refer to this case number.
Please take a moment to provide feedback to Infragistics regarding the quality of support you have received regarding this case, using the following web page:
http://www.zoomerang.com/survey.zgi?p=WEB2282WD5HGKE
Thank you for getting back with an update on the issue. From the description of the issue it seems that you want to get the status of the checkbox even after postback.
I would request you to please save the state to any variable or hiddenField so that it can be latter on reset and you can retrieve it.
This is the expected behavior and in order to get the state you would have to save it.
You can refer the online help articles that I have provided in the last reply.
I apologize for the inconvenience that this might cause you.
Sincerely,GauravDeveloper Support Engineer
Thank you for submitting your issue with Infragistics Developer Support.
From the description of the issue and the forum link that you have prvided it seems that the checkbox state in the unbound column in WebGrid is getting lost after the second postback and also you are not getting the checked state after the first postback however, they appear checked.
I would like to inform you that this is a known issue. As you have the Unbound checkbox column in the WebGrid it keeps state checked because of the viewstate property but it is only for the display purpose. But if you again do a postback then it would not get the checkboxes as checked because before second postback you have not changed the state.
Now if you want that the state should persist across numerous postbacks then you would have to save the modified state of the checkbox either to the database or to any other data source from where you can again maintain the state.
For updating you can refer the following knowledge base article:
<http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=1104&_ga=2.147349239.1913332359.1564406253-1977778533.1538057382><http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=3455&_ga=2.147349239.1913332359.1564406253-1977778533.1538057382><http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=5937&_ga=2.147349239.1913332359.1564406253-1977778533.1538057382>
Hope this will help you.
This case has been submitted as a trial case. While we will naturally get to this as quickly as possible, we are sure you understand that our priorities are first to paid priority support customers, then to paid customers, and then to trial customers. We know that once you are finished evaluating our product(s), and become a paying customer, you will appreciate the order in which we have set these priorities.
If you have a license key, please register it to your Infragistics member profile at the following page:
<http://devcenter.infragistics.com/Support/KnowledgeBase.Aspx?_ga=2.147349239.1913332359.1564406253-1977778533.1538057382>
Once you have registered your license key, future support requests you submit for the corresponding version of the product will be connected to the appropriate level of support for that license.
If you are unable to register your license key for some reason, such as that it is already registered to another user, please contact our Registrations department at the following email address: registrations@infragistics.com
Checkbox state is being lost in second Postback.
We have a grid for which InitializeDataSource event is handled,
It contains an unbound editable checkbox column.
When user selects one or more checkboxes in the column and clicks a button to postback, it work fine for the first time and displays the checkboxes checked properly.
When user click the button postback again, the resulting screen clears the checkboxes, and through code also we are unable to get its checked state as shown before the second postback.
Also please refer to 'Steps to Reproduce'
Could you tell me if this behavior is by design or is a bug?
Reference: https://es.infragistics.com/community/forums/f/ultimate-ui-for-asp-net/67715/ultrawebgrid-checkbox-event-problem#67715
As said by Vince McDonald on the above forum thread, if the grid is rebinding in every postback (as we are handling InitializeDataSource event), it has to empty checkboxes even for the first time too, but it is persisting values for the first, not persisting there on.
Could you tell me if this behavior is by design or is a bug?, and any fix if available.
A sample page to reproduce the behavior is attached.
Thanks for the update.
I raised a support case for this, and will post the complete conversation here once it gets resolved.