This question is locked. New answers and comments are not allowed.
Hi.
My question is: How to avoid the "null" text on columns that are nullable?
Example: My model is:
As show, DetalleInterconsulta is not requiered, and the posible values are null, empty or an string. When the user leave blank the field and insert it the grid show the row good. But when the user click the Edit Button, the blank field show "null". If I see the BD, sometimes the field is save as string "null" (not the NULL value).
This happens with all fields that are not required and the type is string. I'm using the last version of Telerik (2010.2.825.235).
I attach images for view.
Thanks.
My question is: How to avoid the "null" text on columns that are nullable?
Example: My model is:
[KnownType(
typeof
(ReferralViewModel))]
public
class
ReferralViewModel
{
[ScaffoldColumn(
false
)]
public
int
Id {
get
;
set
; }
[ScaffoldColumn(
false
)]
public
int
Rut {
get
;
set
; }
[Required(ErrorMessage =
"Campo obligatorio"
)]
[DisplayName(
"Observación Actual"
)]
[DataType(DataType.Text)]
public
string
AtencionObservacion {
get
;
set
; }
[DisplayName(
"Detalle Interconsulta"
)]
[DataType(DataType.Text)]
public
string
DetalleInterconsulta {
get
;
set
; }
}
As show, DetalleInterconsulta is not requiered, and the posible values are null, empty or an string. When the user leave blank the field and insert it the grid show the row good. But when the user click the Edit Button, the blank field show "null". If I see the BD, sometimes the field is save as string "null" (not the NULL value).
This happens with all fields that are not required and the type is string. I'm using the last version of Telerik (2010.2.825.235).
I attach images for view.
Thanks.
8 Answers, 1 is accepted
0
Daniel
Top achievements
Rank 1
answered on 14 Sep 2010, 03:21 AM
Any solution plis?
Thanks.
Thanks.
0
Accepted
Hi Daniel,
This issue will be fixed with the next official release of Telerik ASP.NET MVC components. The workaround is to hook up to the OnEdit(...) event and set appropriate value for the TextBox(or other controls).
Best wishes,
Hristo Germanov
the Telerik team
This issue will be fixed with the next official release of Telerik ASP.NET MVC components. The workaround is to hook up to the OnEdit(...) event and set appropriate value for the TextBox(or other controls).
Best wishes,
Hristo Germanov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Daniel
Top achievements
Rank 1
answered on 16 Sep 2010, 04:34 AM
Hristo.
Can you post a little example of
Thanks.
Can you post a little example of
DataType.Text
plis? (as show in the images).Thanks.
0
0
Daniel
Top achievements
Rank 1
answered on 16 Sep 2010, 02:52 PM
@Hristo and @Jigar.
Thanks!
Thanks!
0
Erik
Top achievements
Rank 1
answered on 12 Oct 2010, 12:28 PM
Hi Hristo and Jigar,
Could you confirm whether this issue should be resolved in version 2010.2.902? I am using it and the issue is still present. I am using PopUp as my edit mode, if that makes any difference.
Best regards,
Erik
Could you confirm whether this issue should be resolved in version 2010.2.902? I am using it and the issue is still present. I am using PopUp as my edit mode, if that makes any difference.
Best regards,
Erik
0
Hello Erik,
This issue is fixed in service pack version(2010.2.930) of Telerik APS.NET MVC components.
Best wishes,
This issue is fixed in service pack version(2010.2.930) of Telerik APS.NET MVC components.
Best wishes,
Hristo Germanov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Erik
Top achievements
Rank 1
answered on 12 Oct 2010, 12:56 PM
Hi Hristo,
Thank you very much for your prompt reply. I will download the 930 version as soon as I can then.
Best regards,
Erik
Thank you very much for your prompt reply. I will download the 930 version as soon as I can then.
Best regards,
Erik