Login  
Search All Forums
Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
AuthorForum: PowerWEB LiveControls for ASP.NET
Topic: livedatagrid not changing cell visible as expected
jackday

From: richmond, VA USA
Posts: 3
Member Since: 05/07/06
posted February 28, 2009 12:29 PM

I have 1 livedatagrid with 4 colums of bound data and 3 button columns. On page_load I bind the data as expected, my problem is managing the visibility of the button cells on page_load so that btnColumn 1 is visible and btnColumn 2 and btnColumn 3 are not visible.

What I am trying to achieve seems simple. When btn in btnColumn 1 is clicked, hide that cell and make the cells in btnColumn 2 and btnColumn 3 for that e.Item in the itemcommand visible.

Here is how I hide the buttons on Page_Load:
_____________________________________________________
Public Sub hideButtons()
    Dim i, ct As Integer
    If Me.LiveDataGrid1.PageSize < Me.LiveDataGrid1.Items.Count Then
      ct = Me.LiveDataGrid1.PageSize
    Else
      ct = Me.LiveDataGrid1.Items.Count
    End If
    For i = 0 To ct - 1


       Me.LiveDataGrid1.Items(i).Cells(5).Visible = False 'Confirtm
       Me.LiveDataGrid1.Items(i).Cells(6).Visible = False 'Cancel


    Next
  End Sub
______________________________________________________

The commandName for btnColumn 1 is "select". Here is the ItemCommand code:

Protected Sub LiveDataGrid1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles LiveDataGrid1.ItemCommand

    If e.CommandName = "Select" Then

      e.Item.Cells(4).Visible = False
      e.Item.Cells(5).Visible = True
      e.Item.Cells(6).Visible = True
          
    End If
  End Sub

Again, the expected behavior would be btnColumn1 visible on page_Load with btnColumn2 and btnColumn3 hidden. Clicking on a cell in btnColumn1 would make the cell not visible and make the cells in btnColumn2 and btnColumn 3 visible.

The observed behavior is that all 3 buttons display on page_Load. If I click cell in btnColumn1, all 3 buttons are not longer visible and text from the adjacent cells is now moved into the cells where the buttons were.

Any help is greatly appreciated.
Jamie Powell (Admin)

From: Rome, NY USA
Posts: 448
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted March 2, 2009 4:06 PM

Hello. This request needs to be handles directly through our administrative procedures prior to response. Please contact sales@dart.com regarding this issue. Thank you.
Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX