I have a simple unbound webgrid with only one editable column. I have a webNumericEdit control linked to it. That works fine. Now I added a RangeValidator just to validate that any values in that editable column do not exceed 100. I also have a static label right after the validator.
I've had different behaviors as I've tried different configurations by right now what happens is that the validator doesn't show up but the label that is located after the grid moves down as if the validator was making space but it's just empty space.
Here is the code:
<table id="tbl" style="position:absolute; left:0px; top:60px; width:100%; text-align:center " runat="server">
<tr id="trTitle" style="height:60px"><td colspan="2">
<font size="3pt"><b>Proportion of Patients per Procedure Type</b></font>
</td>
</tr>
<tr><td colspan="2">
<igtbl:UltraWebGrid ID="grd" runat="server">
<Rows>
<igtbl:UltraGridRow Height=""><Cells>
<igtbl:UltraGridCell Text="Colonoscopy"></igtbl:UltraGridCell>
<igtbl:UltraGridCell Text=""/>
</Cells></igtbl:UltraGridRow>
<igtbl:UltraGridCell Text="EGD" />
<igtbl:UltraGridCell Text="" />
<igtbl:UltraGridCell Text="Dual Procedure"/>
<igtbl:UltraGridCell Text="" AllowEditing="No"><Style CssClass="DisabledCell"/></igtbl:UltraGridCell>
<igtbl:UltraGridCell Text="Total"/>
<igtbl:UltraGridCell Text="100%" AllowEditing="No"><Style CssClass="DisabledCell"/></igtbl:UltraGridCell>
</Rows>
<Bands>
<igtbl:UltraGridBand>
<RowStyle HorizontalAlign="Center"></RowStyle>
<Columns>
<igtbl:UltraGridColumn Width="200px" AllowUpdate="No" ><CellStyle BackColor="#E6F5FB" ForeColor="#00B9FF" HorizontalAlign="Left" /><HeaderStyle ForeColor="#00B9FF" /><Header Caption="Procedure" Fixed="true"></Header></igtbl:UltraGridColumn>
<igtbl:UltraGridColumn Width="150px" AllowUpdate="Yes" EditorControlID="WebNumericEdit1" Format="0\%" Type="Custom" >
<SelectedCellStyle>
<BorderDetails ColorLeft="#51626F" ColorTop="#51626F" WidthLeft="0px" WidthTop="0px" />
</SelectedCellStyle>
<HeaderStyle ForeColor="#00B9FF" />
<Header Caption="Proportion of patients"/>
<Validators><igtbl:ValidatorItem Value="RangeValidator1" /></Validators>
</igtbl:UltraGridColumn>
</Columns>
<AddNewRow View="NotSet" Visible="NotSet">
</AddNewRow>
</igtbl:UltraGridBand>
</Bands>
<DisplayLayout
AllowColSizingDefault="Fixed"
AllowColumnMovingDefault="OnServer"
AllowSortingDefault="No"
BorderCollapseDefault="Separate"
HeaderClickActionDefault="NotSet"
RowHeightDefault="20px"
RowSelectorsDefault="No"
SelectTypeRowDefault="None"
StationaryMargins="Header"
StationaryMarginsOutlookGroupBy="false"
TableLayout="Fixed" Version="4.00"
ViewType="Flat"
CellClickActionDefault="Edit"
LoadOnDemand="Xml">
<FrameStyle BackColor="Window" BorderColor="#51626F" BorderStyle="Solid" BorderWidth="1px"></FrameStyle>
<EditCellStyleDefault BorderStyle="None"
Font-Names="Verdana" Font-Size="14px" BorderWidth="0px" Wrap="true" HorizontalAlign="Center">
<Padding Left="3px" />
</EditCellStyleDefault>
<FooterStyleDefault BorderStyle="None" BorderWidth="0px"></FooterStyleDefault>
<HeaderStyleDefault BackColor="#E6F5FB" BorderStyle="Solid" HorizontalAlign="Center" VerticalAlign="Middle">
<BorderDetails ColorLeft="#51626F" ColorTop="#51626F" WidthLeft="0px"
WidthTop="0px" WidthBottom="1px" WidthRight="1px" />
</HeaderStyleDefault>
<RowStyleDefault BorderColor="#51626F" BorderStyle="Solid"
Font-Names="Verdana" Font-Size="14px" BorderWidth="1px" Wrap="true" HorizontalAlign="Center">
</RowStyleDefault>
<SelectedRowStyleDefault BackColor="#99CCFF" />
<GroupByBox Hidden="true" />
<AddNewBox Hidden="true" />
<FilterOptionsDefault AllowRowFiltering="No"></FilterOptionsDefault>
</DisplayLayout>
</igtbl:UltraWebGrid>
<asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="RangeValidator" ControlToValidate="grd" MinimumValue="0" MaximumValue="100"></asp:RangeValidator>
<igtxt:WebNumericEdit ID="WebNumericEdit1" runat="server" BorderStyle="None" BorderWidth="0px" Font-Size="14px"
Font-Names="Verdana" Height="20px" HorizontalAlign="Center" DataMode="Int"/>
<tr style="height:5px; text-align:right; width:73% "><td>
<small>Note: we need a disclaimer on dual procedure</small>
<td style="width:27%"></td>
</table>
Any clues on what I'm doing wrong will be appreciated.
Thanks
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
Hello ,
It has been a while since you have made your post, in case you still need of support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have reviewed your issue and I recommend in this case to use the webNumericEdit`s validation. You can set the min and max value and this way you don`t need to use RangeValidator.
For example:
<igtxt:WebNumericEdit ID="WebNumericEdit1" runat="server" BorderStyle="None" BorderWidth="0px"
Font-Size="14px" Font-Names="Verdana" Height="20px" HorizontalAlign="Center" MinValue="0" MaxValue="100"
DataMode="Int" />
I hope this information is helpful.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support