Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
731
How to enter data in ultragird using javascript?
posted

i have 3 columns in ultrawebgrid

i have selected the row now i want to enter three values to those three columns using javascript please guide how????

how to set readonly property of specific column and after post back grid gets clear why?????

any suggesion would be appriciated....

Parents
No Data
Reply
  • 28464
    posted

    Hello,

    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:

    http://forums.infragistics.com/forums/p/9092/68843.aspx#68843

Children
No Data