Any help is appreciated, thanks in advance
Regards
KaranHi,
I have a emf image, on which I want to create certain hot spots such that when the mouse is clicked on one of the hot spot the context menu shows up
Kindly let me know what type of control can I use for this purpose to set as the target for the Context menu
e.g.
<telerik:ContextMenuControlTarget ControlID = "Hotspot1" />
I cant use ImageMaps as the individual maps dont carry an ID
(problem setting it as a targer)
When I use an empty div, the context menu only shows up when clicked on the border and on the text in the div, I want the div to be empty such that the image behind can be seen at all times, I dont want to fill in the Div with spaces as the image will be scaled, same problem with Panels
Any help is appreciated, thanks in advance
Regards
Karan
I am using the following GridMaskedColumn in my grid. It works great if I want to store my phone numbers in the DB with the special characters but I don't. So I'm stripping the extra characters of the mask off before inserting so a phone is stored as 9999999999 rather than (999) 999-9999.
My first question is why does this write the mask to the database in the first place? A mask is a mask - it should write what's IN the mask and not the mask itself.
Second question - How can I get DataFormatString to work when this column is displayed. Currently my phones are displayed literally as (###) ###-####" . The DataFormatString is not working.
<telerik:GridMaskedColumn Mask="(###) ###-####"
UniqueName="Phone"
HeaderText="Phone"
DataField="Phone"
CurrentFilterFunction="EqualTo"
DataFormatString="(###) ###-####"
FilterListOptions="VaryByDataType"
ForceExtractValue="None">
<ItemStyle Width="100px" />
</telerik:GridMaskedColumn>
I am using the RadWindowManager in my application to show a form for editing purposes when the uses selects a row from a RadGrid. When the user closes the edit form and returns to the main form (where the grid is located) I automatically refresh the grid by hooking a javascript function to the close event of the edit form, as shown in the last line of the following function:
function OpenEditForm(sender, eventArgs)
{
var MasterTableView = eventArgs.get_tableView();
var cell = MasterTableView.getCellByColumnUniqueName
(MasterTableView.get_dataItems()[eventArgs.get_itemIndexHierarchical
()], "BrokerID");
var oWnd = radopen("./BrokerMaint.aspx?ID=" + cell.innerHTML, "rwBrokerMaint");
oWnd.add_close(CloseEditForm);
}
Once the user returns back to the main form she can click a button the form that will force a refresh of the grid. The problem is that the refresh that is already occurring automatically may not have yet finished before she selects to refresh again. If this happens, I get an error: "Microsoft JScript runtime error: 'null' is null or not an object"
How do I prevent the RefreshGrid function from executing if a refresh is already taking place? Or, how do I stack one refresh event to occur after another one finishes?
The functions in my code are shown below:
<telerik:RadCodeBlock ID="cb1" runat="server">
<script language="javascript" type="text/javascript">
function CloseEditForm(sender, eventArgs)
{
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.AjaxRequestWithTarget('<%= RadGrid1.UniqueID %>',"RefreshData");
}
function RefreshGrid()
{
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.AjaxRequestWithTarget('<%= RadGrid1.UniqueID %>',"RefreshGrid");
}
</script>
</telerik:RadCodeBlock>
Thank You,
David Nowak
| var masterTable = $find("<%=RadGrid1.ClientID%>").get_masterTableView(); |
| var contactName = masterTable.getColumnUniqueNameByCellIndex( masterTable.get_dataItems()[0], 2); |
<%
@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
CodeFile="ClassPickNew.aspx.vb" Inherits="ClassPickNew" EnableViewStateMac="false"
EnableEventValidation="false" MaintainScrollPositionOnPostback="true" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%
@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<
asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<
telerik:RadGrid ID="rgMain" Skin="Outlook2007" runat="server" AllowPaging="False"
AllowSorting="True" AllowMultiRowSelection="false" AutoGenerateColumns="False"
OnItemCommand="rgMain_ItemCommand" HorizontalAlign="NotSet" AllowAutomaticDeletes="False"
AllowAutomaticInserts="False" AllowAutomaticUpdates="false" Width="100%" AllowFilteringByColumn="false"
ShowGroupPanel="False">
<ClientSettings ReorderColumnsOnClient="True" AllowColumnsReorder="True" ApplyStylesOnClient="True">
<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="1"
ScrollHeight="300px"></Scrolling>
<Resizing AllowRowResize="True" ClipCellContentOnResize="False" AllowColumnResize="True">
</Resizing>
</ClientSettings>
<MasterTableView DataKeyNames="ClassID" GridLines="None" AllowMultiColumnSorting="True"
AutoGenerateColumns="False" HorizontalAlign="NotSet" CommandItemDisplay="Top">
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldAlias="ClassDate" FieldName="ClassDate" FormatString="{0:D}"
HeaderText="Classes Offered"></telerik:GridGroupByField>
<telerik:GridGroupByField FieldAlias="StartTime" FieldName="StartTime" FormatString="{0:hh:mm tt}"
HeaderText=" "></telerik:GridGroupByField>
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="ClassDate" SortOrder="Ascending"></telerik:GridGroupByField>
<telerik:GridGroupByField FieldName="StartTime" SortOrder="Ascending"></telerik:GridGroupByField>
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<telerik:GridBoundColumn HeaderText="ClassSchedulingID" DataField="ClassSchedulingID"
SortExpression="ClassSchedulingID" UniqueName="ClassSchedulingID" Display="False"
ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="SlotCode" SortExpression="SlotCode" HeaderText="SlotCode"
DataField="SlotCode" Display="False" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ClassTitleFull" SortExpression="ClassTitleFull"
HeaderText="Class" DataField="ClassTitleFull">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ClassDate" SortExpression="ClassDate" HeaderText="ClassDate"
DataField="ClassDate" DataFormatString="{0:M/dd}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="StartTime" SortExpression="StartTime" HeaderText="StartTime"
DataField="StartTime" DataFormatString="{0:hh:mm tt}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="HandsOn" HeaderText="HandsOn" SortExpression="HandsOn"
UniqueName="HandsOn">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="Segment" HeaderText="Segment">
<ItemTemplate>
<%
--<asp:Label ID="lblSegment" runat="server"></asp:Label>--%>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn UniqueName="ClassFull" SortExpression="ClassFull" HeaderText="ClassFull"
DataField="ClassFull">
</telerik:GridBoundColumn>
<telerik:GridButtonColumn CommandName="Details" Text="Details" UniqueName="Details">
</telerik:GridButtonColumn>
<telerik:GridButtonColumn UniqueName="Select" Text="Select" CommandName="Select">
</telerik:GridButtonColumn>
</Columns>
<ExpandCollapseColumn ButtonType="ImageButton" Visible="true" UniqueName="ExpandColumn">
<HeaderStyle Width="19px"></HeaderStyle>
</ExpandCollapseColumn>
<RowIndicatorColumn ItemStyle-Width="0px" HeaderStyle-Width="0px" />
<CommandItemTemplate>
</CommandItemTemplate>
</MasterTableView>
</telerik:RadGrid>
</
asp:Content>
----------------------------------------------------Imports
System.Data.SqlClient
Imports
System.Data
Imports
Telerik.Web.UI
Sub
BindAvailableClasses()
Dim strConnection As String = ConfigurationManager.ConnectionStrings("MCHPEvents").ConnectionString
Dim cnMain As New SqlConnection(strConnection)
Try
Dim cmdMain As New SqlCommand("pr_Event_ListClassSchedulingInfo", cnMain)
cmdMain.CommandType = CommandType.StoredProcedure
cmdMain.Parameters.Clear()
cmdMain.Parameters.Add(
New SqlParameter("@EventTypeID", SqlDbType.Int))
cmdMain.Parameters(
"@EventTypeID").Value = oUser.EventID
'cmdMain.Parameters.Add(New SqlParameter("@SlotCode", SqlDbType.Int))
'cmdMain.Parameters("@SlotCode").Value = SlotCode
cmdMain.Parameters.Add(
New SqlParameter("@ReturnOnePerClassGroup", SqlDbType.Bit))
cmdMain.Parameters(
"@ReturnOnePerClassGroup").Value = 0
cmdMain.Parameters.Add(
New SqlParameter("@EventPart", SqlDbType.Int))
cmdMain.Parameters(
"@EventPart").Value = Convert.ToInt16(ConfigurationManager.AppSettings("MastersEventPart"))
Dim daMain As New SqlDataAdapter(cmdMain)
Dim dsMain As New DataSet
daMain.Fill(dsMain,
"Main")
rgMain.DataSource = dsMain.Tables(
"Main")
rgMain.DataMember =
"Main"
rgMain.DataBind()
Catch ex As SystemException
Finally
'Cleanup
If cnMain.State = ConnectionState.Open Then
cnMain.Close()
End If
cnMain.Dispose()
End Try
End Sub
RadEditorCommandList[RadEditorNamespace.RADCOMMAND_BOLD]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_ITALIC]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_UNDERLINE]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_JUSTIFY_LEFT]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_JUSTIFY_RIGHT]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_JUSTIFY_CENTER]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_JUSTIFY_NONE]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_INDENT]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_OUTDENT]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_SELECT_ALL]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_UNLINK]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_JUSTIFY_FULL]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_STRIKETHROUGH]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_SUBSCRIPT]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_SUPERSCRIPT]=RadEditorCommandList[RadEditorNamespace.RADCOMMAND_ABSOLUTE_POSITION]=function(_10,_11,_12){
var _13=RadEditorNamespace.RADCOMMAND_SELECT_ALL!=_10;
_11.SetActive();
if(_11.Document.selection) ---- this line was error.
{
var rng=_11.Document.selection.createRange();
rng.select();
}
_11.ExecuteBrowserCommand(_10,_13,null);
};)
help me please?
pum..


| ParameterTreeView.Nodes.Clear(); |
| ICollection<IHierarchyElement> rootColl = treeStructureService.ParameterRootElements(); |
| foreach (IHierarchyElement element in rootColl) |
| { |
| RadTreeNode node = CreateNode(element); |
| ICollection<IHierarchyElement> childColl = treeStructureService.ParameterChildElements(node.Value); |
| foreach (IHierarchyElement childElement in childColl) |
| { |
| RadTreeNode cNode = CreateNode(childElement); |
| node.Nodes.Add(cNode); |
| } |
| ParameterTreeView.Nodes.Add(node); |
| } |
| private static RadTreeNode CreateNode(IHierarchyElement element) |
| { |
| RadTreeNode node = new RadTreeNode(element.Denotation); |
| node.Value = element.Id; |
| node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack; |
| node.ImageUrl = "~/RadControls/Treeview/Skins/ExampleSkins/ContextMenu/Folder.gif"; |
| node.ExpandedImageUrl = "~/RadControls/Treeview/Skins/ExampleSkins/ContextMenu/FolderOpen.gif"; |
| return node; |
| } |
| foreach (RadTreeNode node in _root.Nodes) |
| { |
| //RadTreeNode node = CreateNode(element); |
| ICollection<IHierarchyElement> childColl = treeStructureService.ParameterChildElements(node.Value); |
| foreach (IHierarchyElement child in childColl) |
| { |
| RadTreeNode childNode = CreateNode(child); |
| node.Nodes.Add(childNode); |
| } |
| } |