Hi,
I am trying to add required field validation to 2 fields Tag and Description. When user clicks New or Edit, the EditMode is set to popup. Inside the popup, the user needs to populate the Tag and Description input boxes. If both or one is empty/null, then I want to display a message to the user that Tag/Description is a required field, much like the behavior of RequiredFieldValidator. I have found numerous server side examples but no client side examples to accomplish this.
Any and all suggestions are welcomed.
Thanks in advance...
<telerik:RadGrid ID=
"RadGridTagDetail"
runat=
"server"
AllowAutomaticDeletes=
"True"
AllowAutomaticInserts=
"True"
AllowAutomaticUpdates=
"True"
AllowFilteringByColumn=
"True"
AllowPaging=
"True"
DataSourceID=
"ObjectDataSourceTags"
GridLines=
"None"
style=
"margin-left: 13px"
Width=
"50%"
AutoGenerateColumns=
"False"
onitemdeleted=
"TagDetail_ItemDeleted"
oniteminserted=
"TagDetail_ItemInserted"
onitemupdated=
"TagDetail_ItemUpdated"
>
<HeaderContextMenu EnableAutoScroll=
"True"
></HeaderContextMenu>
<ClientSettings AllowRowsDragDrop=
"True"
>
<Selecting AllowRowSelect=
"True"
EnableDragToSelectRows=
"False"
/>
<Scrolling AllowScroll=
"True"
UseStaticHeaders=
"True"
/>
</ClientSettings>
<MasterTableView CommandItemDisplay=
"Bottom"
DataSourceID=
"ObjectDataSourceTags"
DataKeyNames=
"Id"
EditMode=
"PopUp"
>
<CommandItemSettings ExportToPdfText=
"Export to Pdf"
></CommandItemSettings>
<Columns>
<telerik:GridBoundColumn DataField=
"Id"
HeaderText=
"Tag"
SortExpression=
"Id"
UniqueName=
"Id"
>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField=
"Descr"
HeaderText=
"Description"
SortExpression=
"Descr"
UniqueName=
"Descr"
>
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings InsertCaption=
"Add new Tag"
PopUpSettings-Modal=
"false"
/>
<CommandItemTemplate>
<telerik:RadToolBar ID=
"RadToolBarTags"
Runat=
"server"
OnClientButtonClicking=
"RadToolBarTags_OnClientButtonClicking"
onbuttonclick=
"RadToolBarTags_ButtonClick"
>
<Items>
<telerik:RadToolBarButton runat=
"server"
CommandName=
"InitInsert"
Text=
"New"
>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton runat=
"server"
CommandName=
"EditSelected"
Text=
"Edit"
>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton runat=
"server"
CommandName=
"DeleteSelected"
Text=
"Delete"
>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton runat=
"server"
IsSeparator=
"true"
>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton runat=
"server"
Text=
"Close"
Value=
"close"
>
</telerik:RadToolBarButton>
</Items>
</telerik:RadToolBar>
</CommandItemTemplate>
</MasterTableView>
</telerik:RadGrid>