<
telerik:RadGrid
ID
=
"grdSalesLeads"
GridLines
=
"None"
runat
=
"server"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
PageSize
=
"30"
AllowAutomaticUpdates
=
"True"
AllowPaging
=
"True"
AllowSorting
=
"true"
AllowFilteringByColumn
=
"true"
AutoGenerateColumns
=
"False"
DataSourceID
=
"dsSalesLeads"
CellSpacing
=
"0"
OnItemCommand
=
"grdSalesLeads_ItemCommand"
OnItemDataBound
=
"OnItemDataBoundHandler"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
/>
<
MasterTableView
AutoGenerateColumns
=
"False"
CommandItemDisplay
=
"Bottom"
DataKeyNames
=
"SalesID"
DataSourceID
=
"dsSalesLeads"
EditMode
=
"InPlace"
>
<
CommandItemSettings
ShowExportToWordButton
=
"true"
ShowExportToExcelButton
=
"true"
ShowExportToCsvButton
=
"true"
/>
<
RowIndicatorColumn
Visible
=
"True"
FilterControlAltText
=
"Filter RowIndicator column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Visible
=
"True"
FilterControlAltText
=
"Filter ExpandColumn column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
>
<
ItemStyle
CssClass
=
"MyImageButton"
/>
</
telerik:GridEditCommandColumn
>
<
telerik:GridBoundColumn
DataField
=
"SalesID"
DataType
=
"System.Decimal"
FilterControlAltText
=
"Filter SalesID column"
HeaderText
=
"SalesID"
ReadOnly
=
"True"
SortExpression
=
"SalesID"
UniqueName
=
"SalesID"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"ProspectName"
HeaderText
=
"ProspectName"
SortExpression
=
"ProspectName"
>
<
ItemTemplate
>
<%#DataBinder.Eval(Container.DataItem, "ProspectName")%>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"cbProspects"
EnableLoadOnDemand
=
"True"
DataTextField
=
"ProspectName"
OnItemsRequested
=
"cbProspects_ItemsRequested"
DataValueField
=
"ProspectName"
AutoPostBack
=
"true"
HighlightTemplatedItems
=
"true"
Height
=
"140px"
Width
=
"220px"
DropDownWidth
=
"420px"
OnSelectedIndexChanged
=
"OnSelectedIndexChangedHandler"
>
<
HeaderTemplate
>
<
ul
>
<
li
class
=
"col1"
>Prospect Name</
li
>
<
li
class
=
"col2"
>Contact Name</
li
>
</
ul
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
ul
>
<
li
class
=
"col1"
>
<%# DataBinder.Eval(Container, "Text")%>
</
li
>
<
li
class
=
"col2"
>
<%# DataBinder.Eval(Container, "Attributes['TargetContact']")%></
li
>
</
ul
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"PhoneNumber"
FilterControlAltText
=
"Filter PhoneNumber column"
HeaderText
=
"Phone Number"
SortExpression
=
"PhoneNumber"
UniqueName
=
"PhoneNumber"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Website"
FilterControlAltText
=
"Filter Website column"
HeaderText
=
"Website"
SortExpression
=
"Website"
UniqueName
=
"Website"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"TargetContact"
FilterControlAltText
=
"Filter TargetContact column"
HeaderText
=
"Target Contact"
SortExpression
=
"TargetContact"
UniqueName
=
"TargetContact"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Title"
FilterControlAltText
=
"Filter Title column"
HeaderText
=
"Title"
SortExpression
=
"Title"
UniqueName
=
"Title"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Industry"
FilterControlAltText
=
"Filter Industry column"
HeaderText
=
"Industry"
SortExpression
=
"Industry"
UniqueName
=
"Industry"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"SourcedBy"
FilterControlAltText
=
"Filter SourcedBy column"
HeaderText
=
"Sourced By"
SortExpression
=
"SourcedBy"
UniqueName
=
"SourcedBy"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Address"
FilterControlAltText
=
"Filter Address column"
HeaderText
=
"Address"
SortExpression
=
"Address"
UniqueName
=
"Address"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"City"
FilterControlAltText
=
"Filter City column"
HeaderText
=
"City"
SortExpression
=
"City"
UniqueName
=
"City"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PostalCode"
FilterControlAltText
=
"Filter PostalCode column"
HeaderText
=
"Postal Code"
SortExpression
=
"PostalCode"
UniqueName
=
"PostalCode"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ListID"
FilterControlAltText
=
"Filter ListID column"
HeaderText
=
"List ID"
SortExpression
=
"ListID"
UniqueName
=
"ListID"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"DateAdded"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter DateAdded column"
HeaderText
=
"Date Added"
SortExpression
=
"DateAdded"
UniqueName
=
"DateAdded"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this lead?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
>
<
ItemStyle
HorizontalAlign
=
"Center"
CssClass
=
"MyImageButton"
/>
</
telerik:GridButtonColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
></
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
></
FilterMenu
>
</
telerik:RadGrid
>
Hi,
I am trying to use the below code to focus on a RadNumericTextBox contained within the item template of a panel bar item when the item expands.
The javascript finds the control correctly but the focus call does nothing. Can anyone please give me any info on why the focus does not land in the control?
Thanks
Gavin.
function
OnItemExpand(sender, args)
{
var
itm = args.get_item();
if
(itm.get_value() ==
"9"
)
{
var
ctrl = itm.findControl(
"txtEpiID"
);
if
(ctrl !=
null
)
{
ctrl.focus();
}
}
}
I have a grid that is used to display meta-data for files that have been uploaded to my app. I have two GridButtonColumns in the grid: one to Delete the doc shown on the row, and another to Save/View the doc.
I got the Delete command to work fine using the Command="Delete" attribute on the GridButtonColumn (shown below). However, I'm having some difficulty telling the grid to use a custom handler that I've written on the second GridButtonColumn. All I need to know how to do is to assign a custom handler to the GridButtonColumn where I can then ignore the validators on the page and open the file.
Any input is greatly appreciated. Thanks.
Marty
Grid:
<telerik:RadGrid ID="GrdDocs" runat="server" GridLines="None" ShowGroupPanel="True" |
AutoGenerateColumns="False" AllowPaging="True" OnNeedDataSource="GrdDocs_OnNeedDataSource" |
OnDeleteCommand="GrdDocs_OnDelete"> |
<HeaderContextMenu EnableTheming="True"> |
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
</HeaderContextMenu> |
<MasterTableView DataKeyNames="DocumentID"> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</RowIndicatorColumn> |
<ExpandCollapseColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridBoundColumn DataField="DocumentID" EmptyDataText="&nbsp;" HeaderText="Document ID" |
UniqueName="column" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="FileName" EmptyDataText="&nbsp;" HeaderText="File Name" |
UniqueName="column1"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="DateUploaded" EmptyDataText="&nbsp;" HeaderText="Date Uploaded" |
UniqueName="column2"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="AddedBy" EmptyDataText="&nbsp;" HeaderText="Added By" |
UniqueName="column3"> |
</telerik:GridBoundColumn> |
<telerik:GridButtonColumn ButtonType="LinkButton" Text="Delete" UniqueName="colDelete" |
CommandName="Delete"> |
</telerik:GridButtonColumn> |
<telerik:GridButtonColumn ButtonType="LinkButton" Text="Save/View" UniqueName="colSave" > |
</telerik:GridButtonColumn> |
</Columns> |
</MasterTableView> |
<FilterMenu EnableTheming="True"> |
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
</FilterMenu> |
</telerik:RadGrid> |