Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
663 views
Hi,

I followed the instructions in the link http://www.telerik.com/help/aspnet/grid/grdvalidation.html but can not get a required validator to work.  I am using a form (rather than InPlace editing).  I am using a RadAjaxManager that is added at runtime-don't know if this would have an affect on this.  The message does not display next to the control I am validating, when I click the Update link in the form, it posts back to the server and re-displays the record before I modified the data (like remove the city to test the validator).  Here's the grid html snippet:

<telerik:RadGrid ID="RadGridCageCode" runat="server" AllowFilteringByColumn="False"AllowPaging="True" AllowSorting="True" GridLines="None" Skin="Vista" EnableAJAX="True" width="60%" AllowAutomaticDeletes="True"AllowAutomaticInserts="True" AllowAutomaticUpdates="True" OnItemCommand="RadGridCageCodeLookup_ItemCommand"DataSourceID="ObjectDataSourceCageCode" PagerStyle-Mode="NextPrevNumericAndAdvanced"OnItemDeleted="RadGridCageCodeLookup_ItemDeleted" OnItemDataBound="RadGridCageCodeLookup_ItemDataBound"OnDeleteCommand="RadGridCageCodeLookup_DeleteCommand" OnItemInserted="RadGridCageCodeLookup_ItemInserted"
OnInit="RadGridCageCodeLookup_Init" OnColumnCreated="RadGridCageCodeLookup_ColumnCreated" OnInsertCommand="RadGridCageCodeLookup_InsertCommand"
OnItemUpdated="RadGridCageCodeLookup_ItemUpdated" OnUpdateCommand="RadGridCageCodeLookup_UpdateCommand" onitemcreated="RadGridCageCodeLookup_ItemCreated" >

<ClientSettings >
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>

<PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
<MasterTableView AllowMultiColumnSorting="True" PageSize="15" CommandItemDisplay="TopAndBottom"AutoGenerateColumns="False" DataKeyNames="CageCodeID" DataSourceID="ObjectDataSourceCageCode">

<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn Visible="False" Resizable="False">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>

<Columns>

<telerik:GridEditCommandColumn ButtonType="ImageButton" UpdateImageUrl="~\RadControls\Skins\Vista\Grid\Update.gif" EditImageUrl="~\RadControls\Skins\Vista\Grid\Edit.gif" InsertImageUrl="~\RadControls\Skins\Vista\Grid\AddRecord.gif" CancelImageUrl="~\RadControls\Skins\Vista\Grid\Cancel.gif"
UniqueName="EditCommandColumn">
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="CageCodeID" DataType="System.Int32" HeaderText="CageCodeID" ReadOnly="True" SortExpression="ID" UniqueName="CageCodeID" Visible="false">
</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="ManufacturerID" DataType="System.Int32" HeaderText="Mfg ID" SortExpression="ManufacturerID" UniqueName="ManufacturerID" visible="false" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CageCode" HeaderText="Cage Code" SortExpression="CageCode" UniqueName="CageCode" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address" UniqueName="Address">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Address2" HeaderText="Address 2" SortExpression="Address2" UniqueName="Address2" ConvertEmptyStringToNull="false" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City" UniqueName="City"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Province" HeaderText="State" SortExpression="Province" UniqueName="State">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Zip" HeaderText="Zip Code" SortExpression="Zip" UniqueName="Zip" DataFormatString="{0:#####-0000}" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Phone" HeaderText="Phone Number" SortExpression="Phone" UniqueName="Phone">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Country" HeaderText="Country" SortExpression="Country" UniqueName="Country">
</telerik:GridBoundColumn>

<
telerik:GridButtonColumn ConfirmText="Are you sure you want to delete this record?" ButtonType="ImageButton" ImageUrl="~\RadControls\Skins\Vista\Grid\Delete.gif" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
<HeaderStyle Width="20px" />
</telerik:GridButtonColumn>

</Columns>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="false" />
</ClientSettings>

</telerik:RadGrid>

And the code behind to add the validator

protected void RadGridCageCodeLookup_ItemCreated(object sender, GridItemEventArgs e)

{

if (e.Item is GridEditableItem && e.Item.IsInEditMode)
{
    
GridEditableItem itemAddress = e.Item as GridEditableItem;
GridTextBoxColumnEditor editor = (GridTextBoxColumnEditor)itemAddress.EditManager.GetColumnEditor("City");
TableCell cell = (TableCell)editor.TextBoxControl.Parent;
RequiredFieldValidator validator = new RequiredFieldValidator();
editor.TextBoxControl.ID =
"address_req_val";
validator.ControlToValidate = editor.TextBoxControl.ID;
validator.ErrorMessage =
"Required";
validator.ID =
"valAddress";
validator.EnableClientScript =
true;
validator.Text =
"REQUIRED!";
validator.Enabled =
true;
validator.EnableViewState =
true;
cell.Controls.Add(validator);

}

}

Tonino
Top achievements
Rank 1
 answered on 05 Jan 2010
6 answers
218 views
Hi All;

I'm using RadListbox on couple of pages they all look & work fine on all IE7 & IE8 but when i open the same page in IE6 the listbox buttons are hidden behind the list..
Does any one know why this is happening or does any one to a work around for this. 


Regards;

Zeeshan Ahmed Khan
RNA Pharmacy Solutions
Phone: 1 (214) 736-4719
Zeeshan Ahmed Khan
Top achievements
Rank 1
 answered on 05 Jan 2010
2 answers
101 views
Hello!

I need my users to enter a title for a document. I am using the RadEditor as the input control for this value.

When the value is rendered on our website, it is wrapped in a hyperlink tag (<a>) and a style is applied to it which gives it a font of Arial.

However, when the users run the editor window, the text they enter is showing a font of Times New Roman. This is making them cry.

I tried setting the RadEditor.CssClass to ".arialstyle" and the ContentAreaCssFile points to the stylesheet containing this:

a, a:link, a:visited, .arialstyle
{
    font-family: Arial, Helvetica, Sans-Serif;
    color: #900;
    font-size: 10pt;
    font-weight: normal;
    text-decoration: none;
}

However when the page loads and I start typing in the editor, it's still in Times New Roman. Again, this is making them cry tears of hot rage which splash upon my brow and scald my tender skin. Please assist.

Rumen
Telerik team
 answered on 05 Jan 2010
1 answer
90 views

i used RadFileExplorer in Sharepoint 2007 as a webpart. but it seem that have some layou issue.

i attached an image from it.

Fiko
Telerik team
 answered on 05 Jan 2010
6 answers
216 views
Quick question.

Is the base style sheet used when creating a custom skin? Or can it be?

Thanks,
Mark.
Veselin Vasilev
Telerik team
 answered on 05 Jan 2010
1 answer
117 views
hi
  RequiredFieldValidator validator = new RequiredFieldValidator();
                editor.TextBoxControl.ID = "GridTextBoxRoleName";
                validator.ControlToValidate = editor.TextBoxControl.ID;
                validator.ErrorMessage = "Enter Role Name";
                validator.SetFocusOnError = true;
               cell.Controls.Add(validator);

but i want to popup insted of writing in inline how can i do i m writing this code in grid1_ItemCreated(object sender, GridItemEventArgs e)


thank you
Princy
Top achievements
Rank 2
 answered on 05 Jan 2010
1 answer
276 views
                <telerik:RadNumericTextBox ID="txtUURiferimento1"   
                                           runat="server" 
                                           Value='<%# Bind("CodUnitaUrbanisticaRiferimento1") %>'   
                                           NumberFormat-AllowRounding="false" 
                                           NumberFormat-DecimalDigits="0" 
                                           DataType="System.Int32?">  
                </telerik:RadNumericTextBox> 

When "DecimalDigits=0" is possible block decimal separetor how letter and special char are blocked?
Shinu
Top achievements
Rank 2
 answered on 05 Jan 2010
4 answers
122 views
Hi,

May I know is there any methods on how to integrate the RadCalender in the RadComboBox (please refer to attach file: dateRangeSelector.jpg)?

Thanks.
Simon
Telerik team
 answered on 05 Jan 2010
1 answer
166 views

Hi,
I am using RadComboBox,  and some of the text items populated into the combo are consist of two lines or more.
In the dropdown the behavior is as expected - the text is displayed along 2 or 3 lines, but when such an item is selected, the text is cut off and only the beginning of it is shown.

I was wondering if there is a way to make the InputCell show the full text along how many lines needed and to adjust itself appropriately
(something like a TextBox with TextMode="MultiLine" , but only when needed of course).

thanx,

Revital

Shinu
Top achievements
Rank 2
 answered on 05 Jan 2010
1 answer
104 views
Hi,

Before posting anything I would like to wish Telerik Team a very Happy New Year 2010.

Now my problem : )

I have a got a RadGrid  - each cell in the grid is filled with the alphabets of the WORD entered by the users. I am wondering is there anyway to change the back color of each cell?
For example
Let take a word "TELERIK" - Each letter in the word fills each cell of the grid. 

L E R

Could you please hint me how can I change the back color of the each cell? 

Many thanks.

Regards,
Milan G
Daniel
Telerik team
 answered on 05 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?