We are looking to create a custom SharePoint web part which displays appointment data on a Scheduler. Ideally we want to return JSON format data from a WCF service and bind this to the Scheduler. We do not need to use insert / update functionality. Having had a look at some examples we're not sure where to go with this. We've looked into Data Providers but again we haven't been able to successfully implement this so far. Any help / step by step examples would be greatly appreciated.
Thanks
Hi all,
I tried to localize RadAsyncUpload, but it looks it is not possible to translate tooltip for 'Select' button. It shows 'No file selected'. Is it possible to translate or disable it?
Thank you,
Petr
Using RadScriptManager and EnableScriptCombine="true" I get a response header for Telerik.Web.UI.WebResource.axd of Tue, 11 Jul 2017 00:00:00 GMT.
Where does that date/time come from?
hi
how can i set the radgrid to load the last page when databound?
i don't want to sort, i just want to show the last page instead of showing first page.
Thanks
Hello. I am dynamically adding multiple upload controls - I need to find a way to pass an argument to the OnClientFileUploaded javascript function OR to dynamically create the function itself from the code behind so that I can build the argument directly into the OnClientFileUploaded function.
Specifically, I need to pass an ID to the function so that when the files are uploaded, I can tell where they should be saved. Please note this is not the controlID but an ID from my database.
I've tried adding the function code like this, but the timing does not seem to be correct. Thank you for any help on this!
protected
void
Page_Load(
object
sender, EventArgs e)
{
StringBuilder sb =
new
StringBuilder();
sb.Append(
"<script> function OnClientFileUploaded(sender) {\n"
);
sb.Append(
"<%= Page.ClientScript.GetPostBackEventReference(new PostBackOptions(this,"
).Append(tempContentID).Append(
")) %>\n"
);
sb.Append(
"}</script>"
);
this
.Page.ClientScript.RegisterClientScriptBlock(
typeof
(RadEditor),
"UploadScript_"
+
this
.ClientID, sb.ToString());
}
protected
void
Page_PreRender(
object
sender, EventArgs e)
{
RadAsyncUpload1.OnClientFileUploaded =
"OnClientFileUploaded"
;
}
<telerik:RadGrid runat="server" ID="RadGrid1" AllowPaging="True" AllowSorting="True" |
AutoGenerateColumns="False" GridLines="None" |
onitemcommand="RadGrid1_ItemCommand"> |
<MasterTableView DataKeyNames="Id" ClientDataKeyNames="Id"> |
<Columns> |
<telerik:GridBoundColumn DataField="Firstname" HeaderText="Firstname" DataType="System.String"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Lastname" HeaderText="Lastname" DataType="System.String"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Age" HeaderText="Age" DataType="System.Int32"> |
</telerik:GridBoundColumn> |
<telerik:GridButtonColumn CommandName="Delete" Text="Delete" ImageUrl="~/Images/edit.png" |
UniqueName="column" DataTextField="Id" ButtonType="ImageButton"> |
</telerik:GridButtonColumn> |
</Columns> |
<PagerStyle Mode="Slider" /> |
</MasterTableView> |
<ClientSettings> |
<DataBinding SelectMethod="GetSampleData" Location="Webservice/GridData.svc" SortParameterType="String"> |
</DataBinding> |
</ClientSettings> |
</telerik:RadGrid> |
Hi,
I have an requirement to change ImageUrl and ConfirmText message based on condition. I have mentioned requirement below.
I have Grid with 2 level detail tables. Delete button is present in 1st Detail Table, But I need to change the image based on condition. Also I need to handle the behavior in DeleteCommand. Please refer the image attached.
is it possible to change image and confirm text in pre_render event of the grid and also let me know how we can get to know which operation to do in delete command?
in the attached image, rows with + symbols are detail table rows, for the 1st row, confirm text will be "Are you sure to transform and update?" and operation is not delete and this row wont be deleted from the grid.
for the 2nd row, confirm text will be "Are you sure to delete?" and operation will be delete. This row will be deleted from the grid
i am using the below code:
<telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="..delete.png" CommandName="Delete" UniqueName="DeleteColumn" ConfirmText="Are you sure to delete?">
</telerik:GridButtonColumn>
Please let me know if we can achieve this? Thanks a lot in advance for your feedback
I'm reading that OnClientSeriesClicked is obsolete and that I'm supposed to using OnSeriesClicked instead. I'm on the newest telerik 2017 Q3 and the file under the /bin folder is dated Sept of 2017. But when I'm in the aspx page, why it only have OnClientSeriesClicked and NOT OnSeriesClicked? Am I doing something wrong or missing something?
Thx.
Hi Everyone,
I am desperately trying to put together a cascading dropdown filtering system in a radgrid and would like to ask for some help/guidance.
Here is the result I try to achieve, some of the radgrid columns have a dropdownlist in FilterTemplate, like Building and Room.
When user is selecting a building to narrow the grid list to the related line, the Room dropdown should give a sub-selection only related to the Building selected.
Here is part of the RadGrid Code;
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowFilteringByColumn
=
"True"
AllowPaging
=
"True"
AllowSorting
=
"False"
CellSpacing
=
"0"
DataSourceID
=
"sqlWoWList"
GridLines
=
"None"
Height
=
"760"
PageSize
=
"15"
EnableLinqExpressions
=
"false"
>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
<
ClientEvents
OnGridCreated
=
"GetGridObject"
></
ClientEvents
>
</
ClientSettings
>
<
ExportSettings
ExportOnlyData
=
"true"
FileName
=
"List of WoWs"
HideStructureColumns
=
"true"
IgnorePaging
=
"true"
>
<
Excel
Format
=
"ExcelML"
/>
</
ExportSettings
>
<
MasterTableView
AutoGenerateColumns
=
"False"
DataSourceID
=
"sqlWoWList"
CommandItemDisplay
=
"Top"
FilterExpression
=
"([IsReleased] LIKE 'Yes')"
>
<
NoRecordsTemplate
>
<
table
width
=
"100%"
border
=
"0"
cellpadding
=
"20"
cellspacing
=
"20"
>
<
tr
>
<
td
align
=
"center"
>
<
h2
style
=
"color:Red"
>No WoWs or SOPs found.<
br
/>Please change or reset the filter.</
h2
>
</
td
>
</
tr
>
</
table
>
</
NoRecordsTemplate
>
<
CommandItemSettings
ShowExportToExcelButton
=
"true"
ShowAddNewRecordButton
=
"false"
ShowRefreshButton
=
"false"
/>
<
CommandItemTemplate
>
<
div
id
=
"cmdContainer"
style
=
"width: 99%; padding: 10px; text-align: right;"
>
<
a
href
=
"http://teamroom.nestle.com/GLOBEISIT/PTCOrbeBPMAcademy/Induction ; Training Materials/Training and Quick Reference Materials/Campus Search QRC.pdf"
target
=
"_blank"
style
=
"padding: 5px; border: 1px solid gray; margin: 0px 5px;"
>
<
img
src
=
"../App_Themes/OneRDCampus/images/question-white.png"
style
=
"border: none; vertical-align: text-bottom;"
/> How To
</
a
>
<
a
href
=
"WoWlist.aspx"
style
=
"padding: 5px; border: 1px solid gray; margin: 0px 5px;"
>
<
img
src
=
"../App_Themes/OneRDCampus/images/filter_(delete)_16x16.gif"
style
=
"border: none; vertical-align: text-bottom;"
/> Reset filters
</
a
>
<
a
id
=
"lnkShareFilter"
onserverclick
=
"lnkShareFilter_ServerClick"
href
=
"#"
runat
=
"server"
style
=
"padding: 5px; border: 1px solid gray; margin: 0px 5px;"
>
<
img
src
=
"../App_Themes/OneRDCampus/images/bpm_email.png"
style
=
"border: none; vertical-align: text-bottom;"
/> Share filter
</
a
>
<
a
href
=
"#"
runat
=
"server"
onclick
=
"ExportToExcel('WoWlist');"
style
=
"padding: 5px; border: 1px solid gray; margin: 0px 5px;"
>
<
img
src
=
"../App_Themes/OneRDCampus/images/Export2XL.gif"
style
=
"border: none; vertical-align: text-bottom;"
/> Export to excel
</
a
>
</
div
>
</
CommandItemTemplate
>
<
Columns
>
<
telerik:GridTemplateColumn
DataField
=
"Title"
CurrentFilterFunction
=
"NoFilter"
HeaderText
=
"Title"
HeaderTooltip
=
"Title of the Wow (roll-over to display related objective)"
SortExpression
=
"Title"
UniqueName
=
"Title"
FilterControlAltText
=
"Filter Title Column"
FilterListOptions
=
"AllowAllFilters"
AutoPostBackOnFilter
=
"true"
ShowFilterIcon
=
"false"
FilterControlWidth
=
"100%"
>
<
ItemTemplate
>
<
asp:HyperLink
ID
=
"HyperLink2"
runat
=
"server"
NavigateUrl='<%#Eval("DiagramURL")%>' ToolTip='<%#Eval("Purpose")%>' Target="_blank"><%#Eval("Title")%></
asp:HyperLink
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
...
<
telerik:GridBoundColumn
DataField
=
"Building"
CurrentFilterFunction
=
"NoFilter"
FilterControlAltText
=
"Filter Building column"
HeaderText
=
"Building"
SortExpression
=
"Building"
UniqueName
=
"Building"
HeaderTooltip
=
"Campus building (area of competency)"
>
<
HeaderStyle
Width
=
"120px"
/>
<
FilterTemplate
>
<
telerik:RadComboBox
ID
=
"RadComboBoxBuilding"
runat
=
"server"
MaxHeight
=
"200px"
Width
=
"110px"
DropDownWidth
=
"160px"
DataSourceID
=
"sqlBuildings"
DataTextField
=
"Building"
DataValueField
=
"Building"
AppendDataBoundItems
=
"true"
SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("Building").CurrentFilterValue%>'
OnClientSelectedIndexChanged="BuildingIndexChanged">
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"All"
/>
</
Items
>
</
telerik:RadComboBox
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function BuildingIndexChanged(sender, args) {
var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID%>");
tableView.filter("Building", args.get_item().get_value(), "EqualTo");
}
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Room"
CurrentFilterFunction
=
"NoFilter"
FilterControlAltText
=
"Filter Room column"
HeaderText
=
"Room"
SortExpression
=
"Room"
UniqueName
=
"Room"
HeaderTooltip
=
"Campus room (area of expertise)"
>
<
HeaderStyle
Width
=
"140px"
/>
<
FilterTemplate
>
<
telerik:RadComboBox
ID
=
"RadComboBoxRoom"
runat
=
"server"
MaxHeight
=
"200px"
Width
=
"130px"
DropDownWidth
=
"260px"
DataSourceID
=
"sqlRooms"
DataTextField
=
"Room"
DataValueField
=
"Room"
AppendDataBoundItems
=
"true"
SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("Room").CurrentFilterValue%>'
OnClientSelectedIndexChanged="RoomIndexChanged">
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"All"
/>
</
Items
>
</
telerik:RadComboBox
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock2"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function RoomIndexChanged(sender, args) {
var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID%>");
tableView.filter("Room", args.get_item().get_value(), "EqualTo");
}
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
</
telerik:GridBoundColumn
>
...
</
Columns
>
</
MasterTableView
>
<
GroupingSettings
CaseSensitive
=
"false"
/>
</
telerik:RadGrid
>
<
asp:SqlDataSource
ID
=
"sqlBuildings"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:Hydra_DevConnectionString %>"
SelectCommand="SELECT DISTINCT [Building] FROM [WoW_VWR_Trackers] WHERE [Building] IS NOT NULL ORDER BY [Building]">
</
asp:SqlDataSource
>
<
asp:SqlDataSource
ID
=
"sqlRooms"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:Hydra_DevConnectionString %>"
SelectCommand="SELECT DISTINCT [Room] FROM [WoW_VWR_Trackers] WHERE [Room] IS NOT NULL AND [Building] LIKE @Building) ORDER BY [Room]">
<
SelectParameters
>
<
asp:SessionParameter
ConvertEmptyStringToNull
=
"true"
DefaultValue
=
"%"
SessionField
=
"Building"
Name
=
"Building"
Type
=
"String"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
asp:SqlDataSource
ID
=
"sqlWoWList"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:Hydra_DevConnectionString %>"
SelectCommand="SELECT * FROM [Hydra_Dev].[dbo].[WoW_VWR_Trackers]">
</
asp:SqlDataSource
>
Could someone points me in the good direction?
I tried several things but without luck since now.
Best regards,
David
<script type="text/javascript"> |
function RowCount() |
{ |
var grid = $find("<%=RadGrid1.ClientID %>"); |
var MasterTable = grid.get_masterTableView(); |
var Rows = MasterTable.get_dataItems(); |
alert(Rows.length); |
} |
</script> |