or
protected
void
ContactsGrid_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
((!e.Item.IsInEditMode) && (e.Item
is
GridDataItem))
{
GridDataItem dataItem = (GridDataItem)e.Item;
// Assuming my entity data source has a field named "dataFieldName", would be nice to access:
string
dataFieldValue = (
string
)dataItem(
"dataFieldName"
).Value;
// Would then find the GridTemplateColumn in order to fill in the ItemTemplate,
// which already know how to do...
}
}
<telerik:RadEditor ID="radEditor" runat="server" Enabled="false" Skin="Office2007" TextMode="MultiLine" Width="625px"></telerik:RadEditor>
radEditor.Enabled =
true;
radEditor.Width = 625;
radEditor.ToolsFile =
"RadEditorBasicToolSet.xml";
After I click on edit button, I have to click twice on text in the radeditor to edit. I don't want to click twice to edit the text. How can I fix that double click issue.
Thanks
<
telerik:GridTableView
runat
=
"server"
AllowSorting
=
"true"
DataKeyNames
=
"QuotationLineId"
Caption
=
"Quotation Lines"
Name
=
"QuotationLines"
PageSize
=
"10"
CommandItemDisplay
=
"Top"
AllowPaging
=
"true"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
AllowFilteringByColumn
=
"false"
ShowFooter
=
"True"
>
<
Columns
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
Reorderable
=
"False"
Resizable
=
"False"
ShowFilterIcon
=
"False"
ShowSortIcon
=
"False"
UniqueName
=
"EditButton"
ImageUrl
=
"~/Images/Edit.png"
CommandName
=
"Edit"
>
<
ItemStyle
Width
=
"20px"
HorizontalAlign
=
"Center"
VerticalAlign
=
"Middle"
/>
</
telerik:GridButtonColumn
>
<
telerik:GridBoundColumn
DataField
=
"QuotationLineId"
HeaderText
=
"Id"
UniqueName
=
"QuotationLineId"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
HeaderText
=
"Units"
DataField
=
"Units"
UniqueName
=
"Units"
ItemStyle-Width
=
"25px"
ItemStyle-HorizontalAlign
=
"Right"
HeaderStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:0.00}"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
HeaderText
=
"Description"
DataField
=
"Description"
UniqueName
=
"Description"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
HeaderText
=
"Cost"
DataField
=
"Cost"
UniqueName
=
"Cost"
ItemStyle-HorizontalAlign
=
"Right"
HeaderStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:c}"
ItemStyle-Width
=
"65px"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
HeaderText
=
"Price"
DataField
=
"Price"
UniqueName
=
"Price"
ItemStyle-HorizontalAlign
=
"Right"
HeaderStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:c}"
ItemStyle-Width
=
"65px"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCalculatedColumn
UniqueName
=
"TotalCost"
HeaderText
=
"Total Cost"
DataFields
=
"Units, Cost"
Expression
=
'{0}*{1}'
ItemStyle-HorizontalAlign
=
"Right"
HeaderStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:c}"
ItemStyle-Width
=
"65px"
Aggregate
=
"Sum"
FooterStyle-HorizontalAlign
=
"Right"
FooterAggregateFormatString
=
"{0:c}"
>
</
telerik:GridCalculatedColumn
>
<
telerik:GridCalculatedColumn
UniqueName
=
"TotalPrice"
HeaderText
=
"Total Price"
DataFields
=
"Units, Price"
Expression
=
'{0}*{1}'
ItemStyle-HorizontalAlign
=
"Right"
HeaderStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:c}"
ItemStyle-Width
=
"65px"
>
</
telerik:GridCalculatedColumn
>
<
telerik:GridCalculatedColumn
UniqueName
=
"Margin"
HeaderText
=
"Margin"
DataFields
=
"Cost, Price"
Expression
=
'1-({0}/{1})'
ItemStyle-HorizontalAlign
=
"Right"
HeaderStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:0.00%}"
ItemStyle-Width
=
"25px"
>
</
telerik:GridCalculatedColumn
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
Reorderable
=
"False"
Resizable
=
"False"
ShowFilterIcon
=
"False"
ShowSortIcon
=
"False"
UniqueName
=
"DeleteButton"
ImageUrl
=
"~/Images/Delete.png"
CommandName
=
"Delete"
ConfirmDialogType
=
"RadWindow"
ConfirmText
=
"Are you sure you want to delete this record?"
ConfirmTitle
=
"Delete record..."
ConfirmDialogHeight
=
"130px"
>
<
ItemStyle
Width
=
"20px"
HorizontalAlign
=
"Center"
VerticalAlign
=
"Middle"
/>
</
telerik:GridButtonColumn
>
</
Columns
>
</
telerik:GridTableView
>