Welcome Guest Search | Active Topics | Sign In | Register

MaskEditColumns Options
AndreaZ
Posted: Wednesday, December 17, 2008 12:57:56 AM
Rank: Advanced Member
Groups: Member

Joined: 10/20/2008
Posts: 75
Hello,
I have a maskedit columns in a grid

<eo:MaskedEditColumn AllowResize="False" HeaderText="Da Versare" MinWidth="80" Width="-1" Name="C_importoriga">
<MaskedEdit runat="server" ControlSkinID="None" ID="importoriga">
<eo:MaskedEditSegment Decimals="2" MaxValue="999999" SegmentType="Number" />
</MaskedEdit>
<CellStyle CssText="background-color: #FFFF99; text-align: right" />
</eo:MaskedEditColumn>

and when i click an a buttoncolumn:

Private Sub Grid1_ItemCommand(ByVal sender As Object, ByVal e As EO.Web.GridCommandEventArgs) Handles Grid1.ItemCommand
If e.CommandName = "MyCommandName" Then
Dim C_importoriga As EO.Web.MaskedEditColumn = CType(Grid1.Columns(8), EO.Web.MaskedEditColumn)
Dim importoriga As EO.Web.MaskedEdit = CType(C_importoriga.MaskedEdit.FindControl ("importoriga"), EO.Web.MaskedEdit)
'e.Item.Cells.Item(8).Value = e.Item.Cells.Item(5).Value
importoriga.Text = e.Item.Cells.Item(5).Value
End If
End Sub

I have to put 'e.Item.Cells.Item(5).Value' in the maskeit columns (8) and I have to do the possibility tio edit this value, but If I use importoriga.Text = e.Item.Cells.Item(5).Value don't run and If I use 'e.Item.Cells.Item(8).Value = e.Item.Cells.Item(5).Value I lost the maskedit!

How can I do?
thanks
eo_support
Posted: Thursday, December 18, 2008 1:42:04 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

You should never use the MaskedEdit control directly. There is only one MaskedEdit control for all rows, not one for each cell. So you should always use Cells.Items(index).Value.

I am not sure what you mean by "losing the maskedit". The maskedit is only activated when the cell enters edit mode.

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.