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
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
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
|