Welcome Guest Search | Active Topics | Sign In | Register

Possible Grid Button Command Bug Options
ROI.Solutions
Posted: Monday, May 12, 2008 1:17:54 PM
Rank: Advanced Member
Groups: Member

Joined: 4/22/2008
Posts: 75
Can you please check on this for me. I have a Grid that is tied to my SQLDataSource and works fine. I have a ButtonColumn Called Primary Contact and is populatred by a data filed call "primaryContact" and that works fine. I leave the Button text blank in the Column editor because its going to be populated by the DataSource be in doing so when i use the onItem Command it doesnt send the command name just refreshes/postback to the page. I added a button text for initial load to A which gets overridden by the data source and it all works find. I shouldnt have to set and itial button text any insight helps.
ROI.Solutions
Posted: Monday, May 12, 2008 1:23:57 PM
Rank: Advanced Member
Groups: Member

Joined: 4/22/2008
Posts: 75
Acutally When i add Inital text it doesnt overiride the button text here is a sample of parts of my code


HERE I AM CHANGEING THE DB BIT OF 0 or 1 TO A YES OR NO AFTER DATABINDING
Code: Visual Basic.NET
Private Sub loadAssociation()
        oDataView = pAssociationData.Select(DataSourceSelectArguments.Empty)
        If oDataView.Count > 0 Then
            pAssociationGrid.DataSource = oDataView
            pAssociationGrid.DataBind()
            pAssociationGrid.Height = pAssociationGrid.ColumnHeaderHeight + (pAssociationGrid.ItemHeight * (pAssociationGrid.Items.Count + 1))
        Else
            pAssociationGrid.Visible = False
        End If

        oDataView = sAssociationData.Select(DataSourceSelectArguments.Empty)
        If oDataView.Count > 0 Then
            sAssociationGrid.DataSource = oDataView
            sAssociationGrid.DataBind()
            sAssociationGrid.Height = sAssociationGrid.ColumnHeaderHeight + (sAssociationGrid.ItemHeight * (sAssociationGrid.Items.Count + 1))
        Else
            sAssociationGrid.Visible = False
        End If

        For Each drv As EO.Web.GridItem In pAssociationGrid.Items
            If drv.Cells(4).Value = "0" Then
                drv.Cells(4).Value = "No"
            ElseIf drv.Cells(4).Value = "1" Then
                drv.Cells(4).Value = "Yes"
            End If
        Next

        For Each drv As EO.Web.GridItem In sAssociationGrid.Items
            If drv.Cells(4).Value = "0" Then
                drv.Cells(4).Value = "No"
            ElseIf drv.Cells(4).Value = "1" Then
                drv.Cells(4).Value = "Yes"
            End If
        Next
    End Sub


eo_support
Posted: Monday, May 12, 2008 1:36:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi Loren,

I am not exactly sure whether I got all your questions:

1. "I leave the Button text blank in the Column editor because its going to be populated by the DataSource". Is this working or not working as expected? This is a relatively new feature that has been added quite recently. So check the version first. If you already have the latest, check both DataField and DateFormat property. You can verify whether it works or not by adding an additional StaticColumn with the same DataField and DataFormat setting;

2. "when i use the onItem Command....". Do you mean OnItemCommand event? This was a bug but has been fixed in build 2007.2.51, which is currently available on our download page;

Thanks
ROI.Solutions
Posted: Monday, May 12, 2008 1:56:09 PM
Rank: Advanced Member
Groups: Member

Joined: 4/22/2008
Posts: 75
Sorry for the blu8bber above let me see if i can clarify better my apologies.

OK i created a Grid and it has a Button Column. The Value for the Button column is coming from an SQLDataSource Field call "primaryContact". In the SQl table primary Contact is Stored as a bit field of either 0=OFF or 1=ON. The Button Renders fine showing 1 or 0 as designated. When i click "Edit Columns" for the gird view i dont set the field for "Button text" just the type to "Psuh Button". The reason for setting text is useless since thw Datasource overrides this just fine. I se the ONItemCommand Event to raise a server event and tested it with a Simple Message Box and works like a charm. Heres the problem.

In the above snapshot of the code i go into the Grid and changed the Primary contact Column so say Yes and No instead of 0 and 1 and when i do this the onItemCommand Event no longer send the "CommandName"
eo_support
Posted: Monday, May 12, 2008 2:40:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi Loren,

Thanks for the clarification. We have confirmed that this is a bug. The bug occurs when the ButtonColumn's ButtonText is not set (thus populated from data source). If ButtonText is set, CommandName will be carried over correctly.

We will fix this issue as soon as possible. Please expect an update build soon.

Thanks
ROI.Solutions
Posted: Monday, May 12, 2008 3:43:59 PM
Rank: Advanced Member
Groups: Member

Joined: 4/22/2008
Posts: 75
Glad i could Help. How do i telll which build i am currently on?
eo_support
Posted: Monday, May 12, 2008 3:57:29 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi Loren,

You should see version number on Grid Builder (or any other builder)'s window title.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.