in Ultrawebgrid i want to have requried field validator like thing / client side validation on column[0] if user does not enter a value it should point out that perticular cell and stop execution... please guide how to achieve this?????
UltraWebGrid supports validators for columns, so you can just use RequiredFieldValidator to make sure the text entered for a columns is not empty (Null). Here is an example:
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="UltraWebGrid1" runat="server" ErrorMessage="ErrorMessage" EnableClientScript=true Display=Static> </asp:RequiredFieldValidator> <igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server" Height="200px" Width="325px" DataSourceID="SqlDataSource1"> <Bands> <igtbl:UltraGridBand> <Columns> <igtbl:UltraGridColumn BaseColumnName="CustomerID" IsBound="True" Key="CustomerID"> <Header Caption="CustomerID"> </Header> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="CompanyName" IsBound="True" Key="CompanyName"> <Header Caption="CompanyName"> <RowLayoutColumnInfo OriginX="1" /> </Header> <Validators> <igtbl:ValidatorItem Value="RequiredFieldValidator1" /> </Validators> <Footer> <RowLayoutColumnInfo OriginX="1" /> </Footer> </igtbl:UltraGridColumn>
More info can be found in the following forum thread: