HI,
I have added the radgrid and have the insert command. I do not have the ajax added to the page. when a new item is added, item.extractvalues count is empty. How to retrieve the inserted values.
Below is the current code:
How to fix this?
Thanks
I have added the radgrid and have the insert command. I do not have the ajax added to the page. when a new item is added, item.extractvalues count is empty. How to retrieve the inserted values.
Below is the current code:
<
telerik:RadGrid
ID
=
"radgrid1"
runat
=
"server"
EnableViewState
=
"true"
ShowFooter
=
"True"
OnInsertCommand
=
"radgrid1_InsertCommand"
OnNeedDataSource
=
"radgrid1_NeedDataSource"
>
<
MasterTableView
DataKeyNames
=
"ProductNumber"
AutoGenerateColumns
=
"false"
EditMode
=
"InPlace"
CommandItemDisplay
=
"TopAndBottom"
CommandItemSettings-AddNewRecordText
=
"Add New Item"
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
>
</
telerik:GridEditCommandColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this product?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
ConfirmDialogHeight
=
"100px"
ConfirmDialogWidth
=
"220px"
>
</
telerik:GridButtonColumn
>
<
telerik:GridTemplateColumn
DataField
=
"ProductNumber"
HeaderText
=
"Product Number"
UniqueName
=
"ProductNumber"
Visible
=
"true"
>
<
InsertItemTemplate
>
<
telerik:RadTextBox
ID
=
"RadtxtPrdNumber"
runat
=
"server"
Text
=
""
>
</
telerik:RadTextBox
>
</
InsertItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadTextBox
ID
=
"RadtxtPrdNumber"
runat
=
"server"
Text
=
""
>
</
telerik:RadTextBox
>
</
EditItemTemplate
>
<
ItemTemplate
>
<
telerik:RadTextBox
ID
=
"RadtxtPrdNumber"
ReadOnly
=
"true"
runat
=
"server"
Text
=
""
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
</
ClientSettings
>
</
telerik:RadGrid
>
protected
void
radgrid1_InsertCommand(
object
sender, GridCommandEventArgs e)
{
GridEditableItem item = e.Item
as
GridEditableItem;
Hashtable values =
new
Hashtable();
item.ExtractValues(values);
}
How to fix this?
Thanks