on month view the show more events link that goes to day view isn't showing for most days unless I think there is an all day event.
I added this tag but they still don't show
<MonthView VisibleAppointmentsPerDay="2" />
I have created a small sample that demonstrates a problem I am encountering in a much larger project.
The scenario is that I have a RadListView using LayoutTemplate/ItemTemplate and one of the controls in the ItemTemplate is a nested RadListView. Both lists use NeedDataSource for their data binding and the nested list needs the ID value of the parent list row in order to query for the correct data. So, in order to make the parent ID available to the child, I have a hiddenfield whose value is ',%# Eval("ID" %> and in the NeedDataSource of the child, I get the parent, do a FindControl on the hidden field and this gives me the ID I need. If I isolate this in a sample project, it works on initial load, but if I have a need to ReBind the parent list, when the child NeedDataSource executes, it can find the hidden field, but its value is not set.
Here is the full sample code:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="dpCACJTest.ascx.cs"
Inherits="FACTS_WebApp.DataPanels.dpCACJTest" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
</telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
<telerik:RadListView ID="listParent" runat="server" OnNeedDataSource="listParent_NeedDataSource"
ItemPlaceholderID="ParentContainer" DataKeyNames="ID">
<LayoutTemplate>
<table width="210px">
<colgroup>
<col width="30px" />
<col width="170px" />
</colgroup>
<thead>
<tr>
<td >
<asp:Label ID="Label29" runat="server" Text="ID"></asp:Label>
</td>
<td >
<asp:Label ID="Label26" runat="server" Text="Values"></asp:Label>
</td>
</tr>
</thead>
<tbody>
<tr id="ParentContainer" runat="server">
</tr>
</tbody>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td>
<asp:Label ID="Label39" runat="server" Text='<%#Eval("ID") %>' ></asp:Label>
<asp:HiddenField ID="hfID" runat="server" Value='<%#Eval("ID") %>' />
</td>
<td id="cellValue" runat="server">
<telerik:RadListView ID="listChild" runat="server" OnNeedDataSource="listChild_NeedDataSource"
ItemPlaceholderID="ChildContainer">
<LayoutTemplate>
<table width="100%">
<asp:PlaceHolder ID="ChildContainer" runat="server"></asp:PlaceHolder>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td>
<asp:Label ID="lblValue" runat="server" Text='<%#Eval("Value") %>' ></asp:Label>
</td>
</tr>
</ItemTemplate>
</telerik:RadListView>
</td>
</tr>
</ItemTemplate>
</telerik:RadListView>
<telerik:RadButton ID="btnRebind" runat="server" Text="Rebind" OnClick="btnRebind_Click">
</telerik:RadButton>
protected void listParent_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e)
{
StringBuilder sbSQL = new StringBuilder(1000);
DataTable dtList = new DataTable();
sbSQL.AppendFormat(@"SELECT 1 as ID
UNION
SELECT 2 as ID
UNION
SELECT 3 as ID");
dtList = DbHelper.GetDataTable(sbSQL.ToString(), null);
(sender as RadListView).DataSource = dtList;
}
protected void listChild_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e)
{
StringBuilder sbSQL = new StringBuilder(1000);
DataTable dtList = new DataTable();
string ID = "0";
RadListViewDataItem parentItem = (sender as RadListView).NamingContainer as RadListViewDataItem;
HiddenField hfID = (HiddenField)parentItem.FindControl("hfID");
if (hfID.Value != "")
ID = hfID.Value;
sbSQL.AppendFormat(@"SELECT '{0}' as ID, 'ID' + '{0}' + 'Value1' as Value
UNION
SELECT '{0}' as ID, 'ID' + '{0}' + 'Value2' as Value
", ID);
dtList = DbHelper.GetDataTable(sbSQL.ToString(), null);
(sender as RadListView).DataSource = dtList;
}
protected void btnRebind_Click(object sender, EventArgs e)
{
listParent.Rebind();
}
On initial load, the results display correctly:
ID Values
1 ID1Value1
ID1Value2
2 ID2Value1
ID2Value2
3 ID3Value1
ID3Value2
But, if I click the Rebind button and force listParent.ReBind();, then I get the following results:
ID Values
1 ID0Value1
ID0Value2
2 ID0Value1
ID0Value2
3 ID0Value1
ID0Value2
All the times the listChild_NeedsDataSource fires, the hiddenfield has no value so the string displayed is ID0 rather than ID1, ID2, and ID3.
Any idea on why the difference in behavior between initial load and ReBind()?
Thanks,
Jim
Chrome's latest update version 61 has created a bug in the display of the contextmenu of the radtreeview.
The scenario occurs when the treeview is the only element on the page and its content is bigger than the window it is in and the browser's native scrollbars are present. When scrolling down to items past the initial set in the viewport the context menu does not appear next to the node you click instead getting stuck at the bottom of the last node that can be seen without scrolling. In my app I have a treeview in a RadWindow but I found the same behavior with a treeview in a standard webform.
I've tested this in the demo example of contextmenu for treeview. The attached project is the same code as the demo and if you run it, expand all the nodes and make the browser window smaller than the treeview content so scrollbars appear, and right click the bottom nodes you will see the context menu not positioned by the node you clicked.
Any ideas for a workaround?
I need to change tooltip width. I found that one way to do it is the following:
.k-chart-tooltip
{
width:500px !important;
}
However, that will change tooltip sizes for all charts on the page. Ideally i would like to setup tooltip width from code behind.
Just in case i am providing here my tooltip setup.
Thank you
mySeries.TooltipsAppearance.ClientTemplate = "<div style=""font-size:16px;font-weight:900;"">" & dr("LocationName") & "</div><br/>" &
"<table>" &
"<tr><td><b>Value in 2015</b></td><td> " & SharedFunctions.fFormat(dr("BaseYearCurval")) & " ($M)<br/></td></tr>" &
"<tr><td><b>Value in " & TargetYear & "</b></td><td> " & SharedFunctions.fFormat(dr("SelectedYearCurval")) & " ($M)<br/></td></tr>" &
"<tr><td><b>" & IIf(direction = "import", "Imports", "Exports") & " to " & comparisonName & " (" & TargetYear & ")</b></td><td> " & SharedFunctions.fFormat(dr("SelectedYearCountryCurval")) & " ($M)<br/></td></tr>" &
"<tr><td><b>Percent Growth " & IIf(direction = "import", "Imports", "Exports") & " to " & comparisonName & " (2015-" & TargetYear & ")</b> </td><td> " & SharedFunctions.fFormat(dr("portpctgrowthcurval")) & "<br/></td></tr>" &
"<tr><td><b>Percent Ratio Growth in Share of " & IIf(direction = "import", "Imports", "Exports") & " to " & comparisonName & "</b> </td><td> " & SharedFunctions.fFormat(dr("portsharecountrycurval")) & "</td></tr>" &
"</table>"
Hi there guys,
i have this scenario where we have a lot of transactions on the grid that needs to be approved.The grid has a button bound to it for example...
<
telerik:GridButtonColumn
ButtonType
=
"LinkButton"
FilterControlAltText
=
"Filter column column"
Text
=
"Approve"
UniqueName
=
"btnApprove"
CommandName
=
"Delete"
>
<
HeaderStyle
Width
=
"50px"
/>
</
telerik:GridButtonColumn
>
The idea is to create and write each record to csv/excel spreadsheet per record once the approve button is clicked.
is this possible?
kind regards
Marc
I am using the following combobox to select cities from a view with 30000 rows.
<telerik:RadComboBox ID="ddlCityO" TabIndex="1" runat="server" EmptyMessage="City, State" EnableItemCaching="True" DataSourceID="SqlDataSource1" MarkFirstMatch="True" EnableAutomaticLoadOnDemand="True" MinFilterLength="1" DataTextField="CityState" DataValueField="ID" DropDownAutoWidth="Enabled" Filter="Contains" Skin="MetroTouch" Placeholder="Destination" Width="300px"/>
Is there a better way to approach this?
I have tried to push the data into a datatable:
db.Open()
cmd = New SqlCommand("SELECT ID, CityState FROM v_City", db)
cmd.CommandType = CommandType.Text
Dim da As SqlDataAdapter = New SqlDataAdapter()
da.SelectCommand = cmd
Dim ds As New DataTable
da.Fill(ds)
db.Close()
ddlCityO.DataSourceID = "datatable"
ddlCityO.DataSource = ds
ddlCityO.DataTextField = "CityState"
ddlCityO.DataValueField = "ID"
ddlCityO.DataBind()
This returns an error of "There is no assigned datasource. Unable to complete the callback request"
Any ideas?
I have my Master & Child grid code setup as below.
The problem is I want to refresh my child grid when users clicks on row & at the same time allow users to do batch edits in the master grid (& later in Child Grid also).
In line23 below:
If I add, EnablePostBackOnRowClick="true" in order to rebind the child grid then the cursor lose the position in Master Grid.
If I remove the EnablePostBackOnRowClick then Child Grid do not show up.
01.
<
body
>
02.
<
form
id
=
"form1"
runat
=
"server"
>
03.
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
04.
<
telerik:RadSkinManager
ID
=
"RadSkinManager1"
runat
=
"server"
ShowChooser
=
"true"
/>
05.
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
EnableAJAX
=
"false"
>
06.
<
AjaxSettings
>
07.
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
08.
<
UpdatedControls
>
09.
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
10.
<
telerik:AjaxUpdatedControl
ControlID
=
"grdMySearches"
/>
11.
</
UpdatedControls
>
12.
</
telerik:AjaxSetting
>
13.
</
AjaxSettings
>
14.
</
telerik:RadAjaxManager
>
15.
<
telerik:RadAjaxLoadingPanel
runat
=
"server"
ID
=
"RadAjaxLoadingPanel1"
></
telerik:RadAjaxLoadingPanel
>
16.
<
telerik:RadFormDecorator
RenderMode
=
"Lightweight"
ID
=
"RadFormDecorator1"
runat
=
"server"
DecorationZoneID
=
"demo"
DecoratedControls
=
"All"
EnableRoundedCorners
=
"false"
/>
17.
<
div
id
=
"demo"
class
=
"demo-container no-bg"
>
18.
<
h3
>WorkPack Header:</
h3
>
19.
<
telerik:RadGrid
RenderMode
=
"Lightweight"
ID
=
"RadGrid1"
GridLines
=
"None"
runat
=
"server"
AllowAutomaticDeletes
=
"True"
20.
AllowAutomaticInserts
=
"True"
PageSize
=
"10"
OnItemDeleted
=
"RadGrid1_ItemDeleted"
21.
OnItemUpdated
=
"RadGrid1_ItemUpdated"
OnPreRender
=
"RadGrid1_PreRender"
AllowAutomaticUpdates
=
"True"
AllowPaging
=
"True"
22.
AutoGenerateColumns
=
"False"
OnBatchEditCommand
=
"RadGrid1_BatchEditCommand"
DataSourceID
=
"SqlDataSource1"
>
23.
<
ClientSettings
AllowKeyboardNavigation
=
"true"
EnablePostBackOnRowClick
=
"true"
>
24.
<
Selecting
AllowRowSelect
=
"true"
></
Selecting
>
25.
</
ClientSettings
>
26.
<
MasterTableView
DataKeyNames
=
"ID"
EditMode
=
"Batch"
CommandItemDisplay
=
"Top"
>
27.
<
BatchEditingSettings
EditType
=
"Cell"
/>
28.
<
Columns
>
29.
<
telerik:GridBoundColumn
DataField
=
"WP_Name"
HeaderStyle-Width
=
"210px"
HeaderText
=
"WP_Name"
SortExpression
=
"WP_Name"
UniqueName
=
"WP_Name"
>
30.
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"true"
>
31.
<
RequiredFieldValidator
ForeColor
=
"Red"
Text
=
"*This field is required"
Display
=
"Dynamic"
>
32.
</
RequiredFieldValidator
>
33.
</
ColumnValidationSettings
>
34.
</
telerik:GridBoundColumn
>
35.
<
telerik:GridBoundColumn
DataField
=
"Status"
HeaderStyle-Width
=
"210px"
HeaderText
=
"Name"
SortExpression
=
"Status"
UniqueName
=
"Status"
>
36.
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"true"
>
37.
<
RequiredFieldValidator
ForeColor
=
"Red"
Text
=
"*This field is required"
Display
=
"Dynamic"
>
38.
</
RequiredFieldValidator
>
39.
</
ColumnValidationSettings
>
40.
</
telerik:GridBoundColumn
>
41.
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this ID?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
HeaderText
=
"Delete"
HeaderStyle-Width
=
"50px"
42.
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
>
43.
</
telerik:GridButtonColumn
>
44.
</
Columns
>
45.
</
MasterTableView
>
46.
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
47.
</
telerik:RadGrid
>
48.
<
br
/>
49.
<
h3
>WorkPack Details:</
h3
>
50.
<
telerik:RadGrid
ID
=
"grdMySearches"
DataSourceID
=
"dsMySearches"
runat
=
"server"
Skin
=
"Windows7"
AutoGenerateColumns
=
"False"
51.
OnItemCommand
=
"grdMySearches_ItemCommand"
OnItemDeleted
=
"grdMySearches_ItemDeleted"
OnItemDataBound
=
"grdMySearches_ItemDataBound"
AllowPaging
=
"True"
AllowSorting
=
"True"
GridLines
=
"None"
>
52.
<
MasterTableView
DataSourceID
=
"dsMySearches"
HierarchyDefaultExpanded
=
"true"
CommandItemDisplay
=
"None"
AllowAutomaticInserts
=
"false"
AllowAutomaticUpdates
=
"True"
AllowAutomaticDeletes
=
"True"
PageSize
=
"25"
Width
=
"100%"
>
53.
<
CommandItemSettings
ShowExportToWordButton
=
"false"
ShowExportToExcelButton
=
"false"
ShowAddNewRecordButton
=
"false"
ShowRefreshButton
=
"false"
/>
54.
<
NoRecordsTemplate
>
55.
No documents were selected for this package
56.
</
NoRecordsTemplate
>
57.
<
Columns
>
58.
<
telerik:GridBoundColumn
DataField
=
"ID"
HeaderText
=
"ID"
SortExpression
=
"ID"
UniqueName
=
"ID"
AllowFiltering
=
"false"
Visible
=
"false"
/>
59.
<
telerik:GridBoundColumn
DataField
=
"GUID"
HeaderText
=
"FileNet Unique ID"
UniqueName
=
"GUID"
/>
60.
<
telerik:GridEditCommandColumn
UniqueName
=
"EditCommandColumn"
ButtonType
=
"ImageButton"
></
telerik:GridEditCommandColumn
>
61.
<
telerik:GridButtonColumn
CommandName
=
"Delete"
Text
=
"Delete"
ConfirmText
=
"Do you want to remove this search?"
UniqueName
=
"DeleteCommandColumn"
ButtonType
=
"ImageButton"
/>
62.
</
Columns
>
63.
</
MasterTableView
>
64.
<
ClientSettings
AllowKeyboardNavigation
=
"true"
EnablePostBackOnRowClick
=
"true"
>
65.
<
Selecting
AllowRowSelect
=
"true"
></
Selecting
>
66.
</
ClientSettings
>
67.
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
68.
</
telerik:RadGrid
>
69.
70.
</
div
>
71.
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ appSettings:DBConnectionString %>"
72.
DeleteCommand="DELETE FROM [Products] WHERE [ID] = @ID"
73.
SelectCommand="SELECT [ID], [WP_Path], [WP_Name], [Status], [WP_Type], [WP_DT] FROM OxyDocs_WorkPack_Header where UserID like '%haldanks%'"
74.
UpdateCommand="UPDATE [OxyDocs_WorkPack_Header] SET [WP_Name] = @WP_Name, [Status] = @Status WHERE [ID] = @ID">
75.
<
DeleteParameters
>
76.
<
asp:Parameter
Name
=
"ID"
Type
=
"Int32"
></
asp:Parameter
>
77.
</
DeleteParameters
>
78.
<
UpdateParameters
>
79.
<
asp:Parameter
Name
=
"WP_Name"
Type
=
"String"
></
asp:Parameter
>
80.
<
asp:Parameter
Name
=
"Status"
Type
=
"String"
></
asp:Parameter
>
81.
<
asp:Parameter
Name
=
"ID"
Type
=
"Int32"
></
asp:Parameter
>
82.
</
UpdateParameters
>
83.
</
asp:SqlDataSource
>
84.
<
asp:SqlDataSource
ID
=
"dsMySearches"
runat
=
"server"
85.
ConnectionString="<%$ appSettings:DBConnectionString %>"
86.
DeleteCommand="DELETE FROM OxyDocs_WorkPack_Detail WHERE [ID] = @ID"
87.
SelectCommand="SELECT ID, GUID, FolderPath, Message from OxyDocs_WorkPack_Detail where Header_ID = @ID">
88.
<
DeleteParameters
>
89.
<
asp:Parameter
Name
=
"ID"
Type
=
"Int32"
/>
90.
</
DeleteParameters
>
91.
<
SelectParameters
>
92.
<
asp:ControlParameter
ControlID
=
"RadGrid1"
Name
=
"ID"
PropertyName
=
"SelectedValue"
Type
=
"String"
></
asp:ControlParameter
>
93.
</
SelectParameters
>
94.
</
asp:SqlDataSource
>
95.
</
form
>
96.
</
body
>
Hello,
I have a bit of a unique situation that I am hoping to get some help with. We use the editor control to create HTML that gets saved and used elsewhere. Because of this, it's really important that every element has a font-family and font-size style associated with it in the html. Is there any way I can ensure this happens?
For example, when I press enter and start typing, the html produced will be <p>some text</p>. Is there any way I can make whatever font is specified in my toolbar drop downs automatically be applied? Such as: <span style="font-family: Arial; font-size: 16pt;">some text</span>.
I do execute some javascript when the editor loads to set the font properties intially:
editor.fire('FontName', { value: 'Arial' });
editor.fire('RealFontSize', { value: '9pt' });
This gives me a proper span when the editor is blank, but the editor doesn't always keep those properties for new lines are entered which results in some mismatched HTML when I need to use it elsewhere.
Thank you for your help!