Hi,
I have the following problem, in my RadGrid i have the operation update select and delete. Update and Select works fine. but the delete operation give me always the error that the parameter is null.
this is my grid
<
telerik:RadGrid
ID
=
"radGrid1"
AutoGenerateEditColumn
=
"True"
DataSourceID
=
"objectDataSource1"
runat
=
"server"
GridLines
=
"None"
Skin
=
"Office2010Blue"
AutoGenerateColumns
=
"False"
>
<
MasterTableView
AllowAutomaticUpdates
=
"True"
AllowAutomaticDeletes
=
"True"
CommandItemDisplay
=
"Top"
DataSourceID
=
"ObjectDataSource1"
>
<
CommandItemSettings
ShowAddNewRecordButton
=
"false"
/>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
>
<
ItemStyle
CssClass
=
"MyImageButton"
/>
</
telerik:GridEditCommandColumn
>
<
telerik:GridDropDownColumn
DataField
=
"AddressType"
DataSourceID
=
"objectDataSource1"
HeaderText
=
"Category"
ListTextField
=
"AddressType"
ListValueField
=
"AddressType"
UniqueName
=
"AddressType"
>
</
telerik:GridDropDownColumn
>
<
telerik:GridDropDownColumn
DataField
=
"CategoryType"
DataSourceID
=
"objectDataSource1"
HeaderText
=
"CategoryType"
ListTextField
=
"CategoryType"
ListValueField
=
"CategoryType"
UniqueName
=
"CategoryType"
>
</
telerik:GridDropDownColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"NotificationDate"
HeaderText
=
"NotificationDate"
UniqueName
=
"NotificationDate"
/>
<
telerik:GridCheckBoxColumn
DataField
=
"NoticeOfReceipt"
UniqueName
=
"NoticeOfReceipt"
HeaderText
=
"NoticeOfReceipt"
/>
<
telerik:GridBoundColumn
DataField
=
"id"
HeaderText
=
"id"
SortExpression
=
"id"
UniqueName
=
"id"
/>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this product?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
>
<
ItemStyle
HorizontalAlign
=
"Center"
CssClass
=
"MyImageButton"
/>
</
telerik:GridButtonColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
and this is my datasource
<
asp:ObjectDataSource
ID
=
"objectDataSource1"
TypeName
=
"ESTV.A3.Logic.AddressCaseRelationBll"
SelectMethod
=
"Select"
UpdateMethod
=
"Update"
DeleteMethod
=
"Delete"
runat
=
"server"
>
<
SelectParameters
>
<
asp:QueryStringParameter
Name
=
"addressId"
Type
=
"String"
Direction
=
"Input"
QueryStringField
=
"id"
>
</
asp:QueryStringParameter
>
</
SelectParameters
>
<
UpdateParameters
>
<
asp:Parameter
Name
=
"id"
Type
=
"String"
Direction
=
"Input"
/>
<
asp:Parameter
Name
=
"NotificationDate"
Type
=
"DateTime"
/>
<
asp:Parameter
Name
=
"NoticeOfReceipt"
Type
=
"Boolean"
/>
<
asp:Parameter
Name
=
"AddressType"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"CategoryType"
Type
=
"String"
/>
</
UpdateParameters
>
<
DeleteParameters
>
<
asp:Parameter
Name
=
"id"
Type
=
"String"
/>
</
DeleteParameters
>
</
asp:ObjectDataSource
>
in my DAO i have for the delete method the following code
public
void
Delete(
string
id)
{
Guid guidId =
new
Guid(id);
AddressCaseRelation addressCaseRelation = entityDao.GetById(guidId);
entityDao.Delete(addressCaseRelation);
entityDao.CommitChanges();
}
Regards