Hi there,
I have a RadGrid that displays a description radtextbox, and a percentage a radnumerictextbox
I want the user to be able to edit only existing rows by way of the inline.
This currently works with two exceptions.
1. Both textboxes appear blank when edit is clicked.
2. I need a way to perform validation against these boxes, to make sure they are not blank etc.
My aspx is as follows...
<
telerik:RadGrid
OnItemEvent
=
"rgMyGrid_ItemEvent"
ID
=
"rgMyGrid"
Width
=
"100%"
AllowPaging
=
"True"
PageSize
=
"8"
runat
=
"server"
AllowSorting
=
"True"
GridLines
=
"None"
AutoGenerateColumns
=
"True"
ShowStatusBar
=
"True"
CellSpacing
=
"0"
EnableViewState
=
"false"
AutoGenerateEditColumn
=
"true"
OnUpdateCommand
=
"rgMyGrid_UpdateCommand"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
<
MasterTableView
ShowFooter
=
"false"
DataKeyNames
=
"TaxID"
EditMode
=
"InPlace"
Width
=
"100%"
CommandItemDisplay
=
"Bottom"
HorizontalAlign
=
"NotSet"
AutoGenerateColumns
=
"false"
>
<
CommandItemTemplate
>
<
div
style
=
"padding: 5px 5px; text-align:left;"
>
<
asp:LinkButton
ID
=
"reloadTaxes"
Text
=
"Reset to Defaults"
CommandName
=
"Reload"
runat
=
"server"
OnCommand
=
"lbReload_Command"
></
asp:LinkButton
>
</
div
>
</
CommandItemTemplate
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"TaxID"
HeaderText
=
"TaxID"
UniqueName
=
"TaxID"
SortExpression
=
"TaxID"
Visible
=
"false"
></
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
DataField
=
"TaxDescription"
UniqueName
=
"TaxDescription"
HeaderText
=
"TaxDescription"
SortExpression
=
"TaxDescription"
HeaderStyle-Width
=
"128px"
ItemStyle-Width
=
"128px"
HeaderStyle-HorizontalAlign
=
"Center"
ItemStyle-HorizontalAlign
=
"Left"
>
<
ItemTemplate
>
<%#DataBinder.Eval(Container.DataItem, "TaxDescription")%>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadTextBox
Width
=
"128px"
runat
=
"server"
ID
=
"rgMyGrid_Description"
MaxLength
=
"20"
></
telerik:RadTextBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"TaxRate"
UniqueName
=
"TaxRate"
HeaderText
=
"TaxRate"
SortExpression
=
"TaxRate"
ItemStyle-Width
=
"56px"
HeaderStyle-HorizontalAlign
=
"Center"
ItemStyle-HorizontalAlign
=
"Left"
>
<
ItemTemplate
>
<%#DataBinder.Eval(Container.DataItem, "TaxRate")%>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadNumericTextBox
Width
=
"56px"
ID
=
"rgMyGrid_Amount"
Type
=
"Percent"
MinValue
=
"0"
MaxValue
=
"100"
MaxLength
=
"2"
NumberFormat-DecimalDigits
=
"0"
NumberFormat-GroupSeparator
=
","
Culture
=
"en-US"
runat
=
"server"
>
</
telerik:RadNumericTextBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
></
ClientSettings
>
<
FilterMenu
EnableTheming
=
"True"
>
<
CollapseAnimation
Duration
=
"200"
Type
=
"OutQuint"
></
CollapseAnimation
>
</
FilterMenu
>
</
telerik:RadGrid
>
Any suggestions would be a big help.
thanks