I have a grid that uses a MaskedTextField for a Zip Code column defined as:
If you look at the attached screen shot of what it looks like in Edit mode, you'll see that the text box used during edit is sized well beyond the width of the column. I have tried changing it to the following but it has no impact.
Any ideas on how I can get this text box to display using 98% of the field's width like I do all of the other fields? I'm using the same approach for the other fields which work perfectly, only the MaskedColumn exhibits this behavior.
I know I made previous post regarding the error that occurs by using this code ('GridMaskedColumnEditor -> MaskedTextBox' declaration causes an error during runtime); so I'm hoping that someone else has used a different approach that has gotten around this.
Thanks.
<telerik:GridMaskedColumn ConvertEmptyStringToNull="False" DataField="ZipCode" DataFormatString="{0:#####}" FilterControlAltText="Filter ZipCode column" HeaderText="Zip Code" Mask="#####" SortExpression="ZipCode" UniqueName="ZipCode" EmptyDataText="" ShowSortIcon="False"> <ColumnValidationSettings EnableRequiredFieldValidation="True"> <RequiredFieldValidator ErrorMessage="* Required"></RequiredFieldValidator></ColumnValidationSettings> <HeaderStyle Wrap="False" HorizontalAlign="Left" Width="80px" CssClass="grid-header" /> <ItemStyle Width="100%" HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle></telerik:GridMaskedColumn>If you look at the attached screen shot of what it looks like in Edit mode, you'll see that the text box used during edit is sized well beyond the width of the column. I have tried changing it to the following but it has no impact.
<telerik:GridMaskedColumn ConvertEmptyStringToNull="False" DataField="ZipCode" DataFormatString="{0:#####}" FilterControlAltText="Filter ZipCode column" HeaderText="Zip Code" Mask="#####" SortExpression="ZipCode" UniqueName="ZipCode" EmptyDataText="" ShowSortIcon="False" ColumnEditorID="txtGridEdit_Zip"> <ColumnValidationSettings EnableRequiredFieldValidation="True"> <RequiredFieldValidator ErrorMessage="* Required"></RequiredFieldValidator></ColumnValidationSettings> <HeaderStyle Wrap="False" HorizontalAlign="Left" Width="80px" CssClass="grid-header" /> <ItemStyle Width="100%" HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle></telerik:GridMaskedColumn><telerik:GridMaskedColumnEditor runat="server" ID="txtGridEdit_Zip"> <MaskedTextBox LabelCssClass="" LabelWidth="0px" Width="98%" Mask="#####" DataFormatString="{0:#####}" DisplayMask="#####" HideOnBlur="True" /></telerik:GridMaskedColumnEditor>Any ideas on how I can get this text box to display using 98% of the field's width like I do all of the other fields? I'm using the same approach for the other fields which work perfectly, only the MaskedColumn exhibits this behavior.
I know I made previous post regarding the error that occurs by using this code ('GridMaskedColumnEditor -> MaskedTextBox' declaration causes an error during runtime); so I'm hoping that someone else has used a different approach that has gotten around this.
Thanks.