Site Search:
Sign in | Join | Help

This Blog

Syndication

Tags

No tags have been created or used yet.

Janus System

All things for all Janus products

Don't allow a field (or row) to be editable in a Janus grid, except in the new row

This code will allow a specific field to be editable in the new row in a Janus grid, but in the regular row it will not be editable. We do this by cancelling the edit in the 'EditingCell' event

    Private Sub GridEX1_EditingCell(ByVal sender As Object, ByVal e As Janus.Windows.GridEX.EditingCellEventArgs) Handles GridEX1.EditingCell
        Dim gridrow As Janus.Windows.GridEX.GridEXRow = Me.GridEX1.GetRow
        Dim strKey As String = e.Column.Key


        If gridrow.RowType = Janus.Windows.GridEX.RowType.Record And strKey = "itemnmbr" Then
            e.Cancel = True


        End If
    End Sub



 


 

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add

About Steve Gray

Steve is a seasoned (translate: old) developer in VB and ASP.NET. He spends most of his time in Dynamics GP, writing custom mods for consulting firms. Crystal reports, eConnect, VS Tools for Dynamics... anything that comes along.