When I try to retrive a cell value, its returning ' ' if the value is null. Is something wrong in the code?
why doesn't it just return empty string('') instead of ' '?
Thank you
Neelima
Private
Sub
RadgridDestination_SelectedIndexChanged(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
RadgridDestination.SelectedIndexChanged
Dim
row
As
GridDataItem = RadgridDestination.Items(RadgridDestination.SelectedIndexes(0))
btnUpdate.Visible =
True
uc_Addr.Visible =
True
btnAdd.Visible =
False
With
uc_Addr
' uc_Addr is an User Control
.Desc = row(
"Description"
).Text
.Addr1 = row(
"Address1"
).Text
.Addr2 = row(
"Address2"
).Text
'retuns ' ' if the cell value is null.
.State.SelectedValue = row(
"StateID"
).Text
.City.SelectedValue = row(
"CityID"
).Text
.Zip.SelectedValue = row(
"ZipID"
).Text
.Phone = row(
"Phone"
).Text
'retuns ' ' if the cell value is null.
End
With
End
Sub
<
telerik:RadGrid
ID
=
"RadgridDestination"
runat
=
"server"
AllowSorting
=
"True"
ShowGroupPanel
=
"True"
AutoGenerateColumns
=
"False"
Skin
=
"Sunset"
AllowPaging
=
"True"
GridLines
=
"None"
>
<
GroupingSettings
ShowUnGroupButton
=
"True"
/>
<
ClientSettings
AllowDragToGroup
=
"True"
allowcolumnsreorder
=
"True"
columnsreordermethod
=
"Reorder"
reordercolumnsonclient
=
"True"
>
</
ClientSettings
>
<
MasterTableView
EditMode
=
"InPlace"
DataKeyNames
=
"Destination_ID"
GroupLoadMode
=
"Client"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to Pdf"
></
CommandItemSettings
>
<
Columns
>
<
telerik:GridButtonColumn
CommandName
=
"Select"
Text
=
"Edit"
ButtonType
=
"ImageButton"
UniqueName
=
"column1"
ImageUrl
=
"Images/Edit.gif"
>
</
telerik:GridButtonColumn
>
<
telerik:GridBoundColumn
DataField
=
"Destination_ID"
HeaderText
=
"Destination_ID"
visible
=
"False"
UniqueName
=
"Destination_ID"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumn
DataField
=
"Addr_Desc"
HeaderText
=
"Description"
UniqueName
=
"Description"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Addr1"
HeaderText
=
"Address1"
UniqueName
=
"Address1"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Addr2"
HeaderText
=
"Address2"
UniqueName
=
"Address2"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"City"
HeaderText
=
"City"
UniqueName
=
"City"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"State"
HeaderText
=
"State"
UniqueName
=
"State"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Zip"
HeaderText
=
"Zip"
UniqueName
=
"Zip"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Phone"
HeaderText
=
"phone"
UniqueName
=
"Phone"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Start_Latitude"
HeaderText
=
"Lat"
UniqueName
=
"Lattitude"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Start_Longitude"
HeaderText
=
"Longt"
UniqueName
=
"Longitude"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"State_ID"
UniqueName
=
"StateID"
Visible
=
"false"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"City_ID"
UniqueName
=
"CityID"
Visible
=
"false"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Zip_ID"
UniqueName
=
"ZipID"
Visible
=
"false"
></
telerik:GridBoundColumn
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"Delete"
>
</
telerik:GridButtonColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
UniqueName
=
"EditCommandColumn1"
></
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>