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

Allow null or no data insert for a item int32

2 Answers 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Pierre asked on 30 Jun 2010, 03:53 PM
Hi everybody,

I have some simple problem during my data insertion. I use one item grid as int32 and the data is mandatory by the grid. How to allow my user to no insert anythink if no need ? Actually is returning one error if no data added in this cell.

Thanks for your tip.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 01 Jul 2010, 12:57 PM
Hello Pierre,

I am not quite sure about your scenario. I guess you have one mandatory field in grid which cannot be left as blank and want to notify the user about this. If that the case you can add the RequiredFieldValidator control to that field. Please refer the following documentation which illustrates on how to add validator.

Adding a validator to an edit field in Telerik RadGrid

Hope this helps, feel free to ask if you have any more queries.
Princy.
0
Pierre
Top achievements
Rank 1
answered on 01 Jul 2010, 02:24 PM
Hi Princy,

It's not mandatory in my base but the grid is demanding the item. How i can allow null values during automatic Edit/Insert?
This discount column is null if user not need. Only add to one cell no others. Actually everytime need to add zero.

 <telerik:GridBoundColumn UniqueName="Days_promo"  HeaderText="Discount(%)" 
                        DataField="Days_promo" DataType="System.Int32"
                        <ItemStyle  Width="70px" /> 
                    </telerik:GridBoundColumn>     
 
Thanks.
Tags
Grid
Asked by
Pierre
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Pierre
Top achievements
Rank 1
Share this question
or