|
Rank: Advanced Member Groups: Member
Joined: 4/22/2008 Posts: 75
|
OK, I copied and pasted from the check Box column demo and it not working for me. its doesnt detec that a cell have gone form unchecked to a checked state. I have 2 cells form my Db that im testing it with. I have spent some time on this any ideas whats going wrong. Here is sample code
Code: Visual Basic.NET
Protected Sub btnUpdateAssociations_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpdateAssociations.Click
Dim item As EO.Web.GridItem
For Each item In sAssociationGrid.CheckedItems
MsgBox("Test")
Next item
End Sub
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Loren wrote:I copied and pasted from the check Box column demo and it not working for me. The sample works as is. So in order to trouble shoot the problem, we definitely need you to compare the sample and your code to find out the difference. Do it step by step and it should not be difficult to find out the triggering point. Loren wrote:its doesnt detec that a cell have gone form unchecked to a checked state. Can you elaborate what you mean by that? How do you know it does detects a cell have gone from unchecked to a checked state? Loren wrote:I have 2 cells form my Db that im testing it with. I have spent some time on this any ideas whats going wrong. Here is sample code
Code: Visual Basic.NET
Protected Sub btnUpdateAssociations_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpdateAssociations.Click
Dim item As EO.Web.GridItem
For Each item In sAssociationGrid.CheckedItems
MsgBox("Test")
Next item
End Sub
Your code looks fine to us except that we do not know what MsgBox does for you. The only thing we can think of is, CheckedItems returns all items that are checked on the FIRST CheckBoxColumn, so if you have multiple CheckBoxColumns, other columns will have no effect on CheckItems. In that case you need to walk through all items and check the cell values on that specific column. Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
BTW: We have sent you a new build yesterday. Please check your private messages for details.
|
|
Rank: Advanced Member Groups: Member
Joined: 4/22/2008 Posts: 75
|
OK, If i change
Code: Visual Basic.NET
For Each item In sAssociationGrid.CheckedItems
-TO-
Code: Visual Basic.NET
For Each item In sAssociationGrid.ChangedItems
I get the MsgBox as expected. The message Box is just being used to test and see if it runs as expected. Which it isnt. What im trying to do is a user select down the list which items to cheeck. I then want to loop through all checked Items and update my database. The only think i can this of is that the checkbox is having issue becuase it has a datasource. I pull a bit field of 1 or 0 if one it makes the check box as Checked as works. let me test to see if i remove the DataFiled property and if it works if so this maybe another but like the button text one i submitted.
|
|
Rank: Advanced Member Groups: Member
Joined: 4/22/2008 Posts: 75
|
Nope it still isnt working. The demo on the site works but when i make a test project and identical it isntwortk on my build version
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi Loren,
There is no reason for identical code to produce different result. So something must be different somewhere, either directly in your code or in your project. Try load and run our sample project directly and see what you get.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 4/22/2008 Posts: 75
|
OK works when i create a new project on the new build only. I will work on it and get back to you if needed. Thnx for the quick build and the fix for the SQLData Sources and binding them
|
|
Rank: Advanced Member Groups: Member
Joined: 4/22/2008 Posts: 75
|
Having Issues with the new Build i was sent. Now it works fine for the DataSourceID so that i dont have to manually bind it be now i can add my static menu Items anymore. only the DtatSource items show up.
EDITED:
If i manually databind it works again. I was told it would auto databind but thats ok.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
That's normal. Data binding always wipe out everything and recreate it from the database. Automatic data binding occurs rather late so it happens after you add the static menu items. The workaround for this situation is to call DataBind before adding your static items. The difference with the new build is that you no longer need to set DataSource when you have already set DataSouceID.
|
|
Rank: Advanced Member Groups: Member
Joined: 4/22/2008 Posts: 75
|
Ok but im still having the Grid issue detecting the ItemsChecked. it works on the Same project if i do something like grid.Changeditems or Grid.Itesm but not CheckedItems. Can we do the Web Chat and i show you whats happening?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Of course. Please check your PM for meeting link.
|
|