This is a migrated thread and some comments may be shown as answers.

Grid

2 Answers 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dharmesh
Top achievements
Rank 1
Dharmesh asked on 12 Dec 2007, 06:29 AM
Sir,

I am using telerik gird control with bound column to insert and update record in database, but i want to valid those filed using requiredfield and customvalidation field.

plz. kindly help me, how to go through the validation with bounded column in grid control

Dharmesh    

2 Answers, 1 is accepted

Sort by
0
Shaun Peet
Top achievements
Rank 2
answered on 12 Dec 2007, 06:36 AM
Hello Dharmesh,

I think you need to convert the GridBoundColumn to a GridTemplateColumn.  After you do that, you can put the necessary validators in the <EditItemTemplate> for something as follows:

<telerik:GridTemplateColumn>
    <ItemTemplate>
        <asp:label runat="server" Text='<%# Bind("dbField") %>' />
    </ItemTemplate>
    <EditItemTemplate>
        <asp:textbox runat="server" ID="txt" Text='<%# Bind("dbField") %>' />
        <asp:requiredfieldvalidator runat="server" ControlToValidate="txt" ErrorMessage="Required" />
    </EditItemTemplate>
</telerik:GridTemplateColumn>
0
Dharmesh
Top achievements
Rank 1
answered on 12 Dec 2007, 07:12 AM
Hello Shaun Peet,

Actually i want to validate through GridBoundColumn filed, and one link aviable in telerik.com, but some object i can't access in particular method.

if you know how to access those filed Id then help me

http://www.telerik.com/community/forums/thread/b311D-hhbcb.aspx

waiting for reply.
Dharmesh
Tags
Grid
Asked by
Dharmesh
Top achievements
Rank 1
Answers by
Shaun Peet
Top achievements
Rank 2
Dharmesh
Top achievements
Rank 1
Share this question
or