Multiple control validation in radgrid
Hi say I have a couple of fields in my RadGrid:
<telerik:GridTemplateColumn HeaderText="ProductName" >
<EditTemplate>
<asp:TextBox ID="info" runat="server" Text='<%# Bind("ProductName") %>' />
</EditTemplate>
</telerik:GridTemplateColumn >
<telerik:GridDropDownColumn DataField="CategoryID" DataSourceID="SqlDataSource1"
HeaderText="Category" ListTextField="CategoryName" ListValueField="CategoryID"
UniqueName="CategoryID" ColumnEditorID="GridDropDownColumnEditor1">
</telerik:GridDropDownColumn>
What I want to achieve here i开发者_如何学Gos to have some validation that says the textbox is a required field if the item in the dropdown box is set to a certain value say "Jam".
I'm not sure how to do the validation across these two controls. Any suggestions?
No worries, I managed to sove it by doing a couple of FindControl commands in the CustomValidator ServerValidate method.
Finding a combobox:
((RadComboBox)((CustomValidatore)source).FindControl("TextBoxName"))
精彩评论