
<ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
<Selecting AllowRowSelect="true" />
</ClientSettings>
Firstly let me apologise if this is such a simple issue but I am only just starting using Telerik controls. All of the controls we are making have to be server controls and I am having trouble finding sufficient documentation. I Cannot make these as a web control and that is all the examples I can find.
I have to make an address block as a server control using telerik radtextbox. This block has Address 1/2/3 City and Postcode and I need to validate what the user enters into the Postcode box.
I have added the text boxes with no problems - they work fine.
private RadTextBox _txtAddress1 = new RadTextBox();
private RadTextBox _txtAddress2 = new RadTextBox();
private RadTextBox _txtAddress3 = new RadTextBox();
private RadTextBox _txtCity = new RadTextBox();
private RadTextBox _txtPostcode = new RadTextBox();
(All have corresponding Public properties)
Once I start trying to work out How to validate the _txtPostCode I run into issues.
I thought I would declare _txtPostcode.RegularExpressionValidator but this is not a valid request.
I then declared a new RegularExpressionValidator.
_regularExpressionValidator.ID = "txtValidator";
_regularExpressionValidator.ErrorMessage = "Please enter valid Postcode";
_regularExpressionValidator.ValidationExpression ="^(([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9]?[A-Za-z])))) [0-9][A-Za-z]{2}))$";
_regularExpressionValidator.ControlToValidate = "_txtPostcode";
setup the TextChanged and validation options of the _txtPostcode
_txtPostcode.TextChanged += new EventHandler(_txtPostcode_TextChanged);
_txtPostcode.AutoPostBack = true;
_txtPostcode.CausesValidation = true;
But I now cannot get to the point that the text box is validated.
Any help would be greatly received - code examples would be fantastic - I find that once someone has shown me a full example once I can then amend this as I need for future requirements as well
Many Thanks
Wendy
$find("RadTabStrip1").set_selectedIndex(1);<telerik:RadGrid ID="TelerikRadGrid1" runat="server" ....> <MasterTableView ....> <Columns>
<telerik:GridBoundColumn DataField="CustomerID1DataField" HeaderText="CustomerID1HeaderText" UniqueName="Customer1UniqueName" Visible="false" /> </Columns> <NestedViewTemplate> <div> <telerik:RadGrid ID="TelerikRadGrid2" runat="server" ..... > <MasterTableView> <Columns>
<telerik:GridTemplateColumn HeaderText="Update" ColumnGroupName="Action" AllowFiltering="false"><HeaderStyle Width="40px" />
<ItemTemplate>
<asp:LinkButton ID="MatchButton" runat="server" Text="Match" OnClientClick="MatchConfirm()" OnClick="MatchButton_Click" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="CustomerID2DataField" HeaderText="CustomerID2Text" UniqueName="CustomerID2Unique" Display="false"></telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> </div> </NestedViewTemplate> </MasterTableView></telerik:RadGrid>public void MatchButton_Click(object sender, EventArgs e){
// How do I access the "CustomerID1DataField" in TelerikRadGrid1, from this event?
}I am trying to use the “Allow Automatic Updates” option on the Telerik RadGrid control in ASP.net. I thought this would be the easiest way to go but it isn’t working for me. I have a single table with all of the data that needs to be edited and I was going to just turn on the filtering for a quick and easy administrative console for this table. I am using a SQLDataSource as my data source for the grid. This is a single table so none of the hierarchy stuff applies.
Whenever I click edit, change some data and hit update the changes are removed from the form and nothing is updated. Any idea what I am doing wrong? I also don’t see a way to log or see any errors so this is all the info I have.
The sql query is a basic select * from table. No joins or anything.