Hi Team,
While i'm trying to bind the string data to the Rad Grid it is not binding exact value which i have pulled from Data Base.
For Example i'm pulling the Data : - "A BC E F G" and binding the same data to the Rad Grid, the problem here is the rad grid column is trimming out all the spaces and displaying like :- "A BC EFG"
Here i need to bind the exact data which i'm pulling from Database.
Could you please help me out from this issue.
Thanks in Advance
A.Shrujan
I am trying to keep the latency to a minimum when using a Radlistview which grabs it's data from sql with linq. Example of how data is currently retrieved is as follows:-
<
telerik:RadDropDownList
ID
=
"RadDropDownListSort"
runat
=
"server"
Skin
=
"MetroTouch"
CssClass
=
"sortCtrl"
DefaultMessage
=
"Sort by..."
Width
=
"175px"
AutoPostBack
=
"False"
OnClientItemSelecting
=
"sortSelecting"
>
<
Items
>
<
telerik:DropDownListItem
Text
=
"Sort by Price"
Value
=
"SalePrice"
/>
<
telerik:DropDownListItem
Text
=
"Sort by Year"
Value
=
"YearOfMan"
/>
<
telerik:DropDownListItem
Text
=
"Sort by Location"
Value
=
"Location"
/>
<
telerik:DropDownListItem
Text
=
"Sort by Make/Model"
Value
=
"Make"
/>
<
telerik:DropDownListItem
Text
=
"Sort by Category"
Value
=
"Category"
/>
</
Items
>
</
telerik:RadDropDownList
>
<
telerik:RadListView
ID
=
"RadListView1"
runat
=
"server"
DataKeyNames
=
"ListingID,GstOptionID"
ItemPlaceholderID
=
"ListingsContainer"
AllowPaging
=
"True"
PageSize
=
"10"
AllowMultiFieldSorting
=
"True"
CanRetrieveAllData
=
"True"
>
<
LayoutTemplate
>
<
asp:Panel
ID
=
"ListingsContainer"
runat
=
"server"
/>
<
table
class
=
"pagerTable pagertiles"
>
<
tr
>
<
td
>
<
telerik:RadDataPager
ID
=
"RadDataPager1"
runat
=
"server"
PagedControlID
=
"RadListView1"
PageSize
=
"10"
Skin
=
"MetroTouch"
CssClass
=
"dataPager"
>
<
Fields
>
<
telerik:RadDataPagerButtonField
FieldType
=
"FirstPrev"
/>
<
telerik:RadDataPagerButtonField
FieldType
=
"Numeric"
/>
<
telerik:RadDataPagerButtonField
FieldType
=
"NextLast"
/>
<
telerik:RadDataPagerPageSizeField
PageSizeText
=
"Tiles per page: "
PageSizeComboWidth
=
"62"
PageSizes
=
"20 30"
/>
<
telerik:RadDataPagerGoToPageField
CurrentPageText
=
"Page: "
TotalPageText
=
"of"
SubmitButtonText
=
"Go"
TextBoxWidth
=
"20"
/>
<
telerik:RadDataPagerTemplatePageField
>
<
PagerTemplate
>
<
div
style
=
"float: right"
>
<
b
>Items
<
asp:Label
runat
=
"server"
ID
=
"CurrentPageLabel"
Text="<%# Container.Owner.StartRowIndex+1%>" />
to
<
asp:Label
runat
=
"server"
ID
=
"TotalPagesLabel"
Text="<%# IIF(Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize), Container.Owner.StartRowIndex+Container.Owner.PageSize, Container.Owner.TotalRowCount) %>" />
of
<
asp:Label
runat
=
"server"
ID
=
"TotalItemsLabel"
Text="<%# Container.Owner.TotalRowCount%>" />
<
br
/>
</
b
>
</
div
>
</
PagerTemplate
>
</
telerik:RadDataPagerTemplatePageField
>
</
Fields
>
</
telerik:RadDataPager
>
</
td
>
</
tr
>
</
table
>
</
LayoutTemplate
>
<
ItemTemplate
>
....
</
ItemTemplate
>
<
EmptyDataTemplate
>
...
</
EmptyDataTemplate
>
</
telerik:RadListView
>
Private
Sub
RadListView1_NeedDataSource(sender
As
Object
, e
As
Telerik.Web.UI.RadListViewNeedDataSourceEventArgs)
Handles
RadListView1.NeedDataSource
Dim
dsTiles
As
IQueryable(Of ListingResults) = GetLinqListingData
RadListView1.DataSource = dsTiles
End
Sub
Having looked through the documentation and demos for the RadListview, I'm struggling to understand what amount of data is retrieved from sql and/or the server when the page first loads and on subsequent page change or sort on ajax call back. When using Iqueryable does the Radlistview grab only the data for the page shown to the user? IE 10 rows for page size of 10 retrieved from sql OR perhaps: All rows retrieved to server, but only 10 rows sent to client (user).
Presuming that it only grabs the rows for displayed items on the page, if I try to implement the usage of a shared (and/or local) cache as follows, the full set of rows would need to be retrieved from sql for first save to the cache. And on each and every page change or sort, the full set of rows is again retrieved from the cache. A suggested example of using cache:
Private
Sub
RadListView1_NeedDataSource(sender
As
Object
, e
As
Telerik.Web.UI.RadListViewNeedDataSourceEventArgs)
Handles
RadListView1.NeedDataSource
Dim
dsTiles
As
List(Of ListingResults) = GetCacheData
If
dsTiles is nothing
dsTiles = GetLinqListingData
SaveCacheData(dsTiles)
End
If
RadListView1.DataSource = dsTiles
End
Sub
Would greatly appreciate any explanation on how data is retrieved and any suggestion of whether cache is beneficial for short-term single user usage and longer term subsequent visitors seeking the same data.
Thank you
We have a commercial SharePoint 2013 web part application for which we license the Telerik.Web.UI dll, etc.
We build the dlls with our own .snk file (e.g. unique PublicKeyToken) and custom initialization (so noone else can use the dlls).
The dlls are installed in the GAC
At a customer site, they have our web part app and that of another company who also installs their version of the Telerik.Web.UI dlls, etc.
Problem - either one app or the other will work, but not both.
While it is possible to specify a specific version of the dll (including PublicKeyToken) in the SharePoint web.config file, there can only be one web.config file for all web part apps (for that SP site collection) and in that web.config only qualifiedEntry element for the dll with the name Telerik.Web.UI.
How to resolve (dynamic load of the specific dll?, build a "private" version of the Telerik dlls, rename the dll file/assembly name? Some other magic we don't know about?)
I am trying to use GridAttachemntColumn in grid with batcheditng. i tried to find out the file name in prior to store in db. but not able to do it.please find code snippet for further detail.
protected void gridProjectManagement_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
{
int s = e.Commands.Count();
foreach (GridBatchEditingCommand command in e.Commands)
{
Hashtable newValues = command.NewValues;
Hashtable oldValues = command.OldValues;
//RadAsyncUpload rd = command.Item["Attachment"].Controls[0] as RadAsyncUpload;
//string file = rd.UploadedFiles[0].FileName;
//command.Item.EditManager.GetColumnEditor("Attachment")
//var gridAttachmentColumnEditor = ((GridAttachmentColumnEditor)command.Item.EditManager.GetColumnEditor("Attachment"));
//string file = gridAttachmentColumnEditor.RadUploadControl.UploadedFiles[0].GetName();
string id = (string)newValues["ID"];
//Convert.ToInt64(newValues["ID"].ToString());
// string newFirstName = newValues["PerspectiveRating"].ToString();
if (!string.IsNullOrEmpty(id))
{
var OldeItem = ListActivityArchivalSupportPM.Where(x => x.ID == Convert.ToInt32(id)).FirstOrDefault();
using (var db = new EntitiesModel())
{
var p = db.ActivityArchivalSupportPMs.Where(x => x.ID == Convert.ToInt32(id)).FirstOrDefault();
if (newValues["Estimate"] != null)
{
p.Estimate = Convert.ToDecimal(newValues["Estimate"].ToString());
}
p.Activity = (string)newValues["Activity"];
p.EstimateAssumptions = (string)newValues["EstimateAssumptions"];
p.ApplicationID = AppName.Value;
if (newValues["FileName"] != null)
{
p.Attachment = (Byte[])newValues["FileName"];
}
<
telerik:RadGrid
ID
=
"gridProjectManagement"
GridLines
=
"None"
runat
=
"server"
AllowAutomaticDeletes
=
"false"
AllowAutomaticInserts
=
"True"
AllowSorting
=
"true"
AllowFilteringByColumn
=
"true"
FilterType
=
"CheckList"
EnableLinqExpressions
=
"false"
OnItemCreated
=
"gridProjectManagement_ItemCreated"
OnPreRender
=
"gridProjectManagement_PreRender"
AllowAutomaticUpdates
=
"True"
AutoGenerateColumns
=
"False"
OnBatchEditCommand
=
"gridProjectManagement_BatchEditCommand"
OnItemCommand
=
"gridProjectManagement_ItemCommand"
OnNeedDataSource
=
"gridProjectManagement_NeedDataSource"
OnItemDataBound
=
"gridProjectManagement_ItemDataBound"
>
<
ExportSettings
ExportOnlyData
=
"true"
HideStructureColumns
=
"true"
OpenInNewWindow
=
"true"
IgnorePaging
=
"true"
><
Excel
Format
=
"Html"
/></
ExportSettings
>
<
MasterTableView
CommandItemDisplay
=
"Top"
DataKeyNames
=
"ID"
Font-Size
=
"Small"
CommandItemSettings-ShowAddNewRecordButton
=
"false"
CommandItemSettings-ShowRefreshButton
=
"false"
HorizontalAlign
=
"NotSet"
EditMode
=
"Batch"
AutoGenerateColumns
=
"False"
AllowFilteringByColumn
=
"True"
>
<
CommandItemSettings
ShowExportToCsvButton
=
"true"
ShowExportToExcelButton
=
"true"
ShowAddNewRecordButton
=
"true"
ShowExportToPdfButton
=
"true"
ShowExportToWordButton
=
"true"
/>
<
BatchEditingSettings
EditType
=
"Cell"
OpenEditingEvent
=
"Click"
/>
<%-- <
SortExpressions
>
<
telerik:GridSortExpression
FieldName
=
"PerspModel_ID"
SortOrder
=
"Descending"
/>
</
SortExpressions
>--%>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"ID"
ForceExtractValue
=
"Always"
Display
=
"false"
HeaderText
=
"ID"
UniqueName
=
"ID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Activity"
AllowSorting
=
"true"
SortExpression
=
"Activity"
HeaderStyle-Width
=
"150px"
HeaderText
=
"Activity"
UniqueName
=
"Activity"
>
</
telerik:GridBoundColumn
>
<
telerik:GridNumericColumn
DataField
=
"Estimate"
HeaderStyle-Width
=
"80px"
AllowFiltering
=
"false"
AllowSorting
=
"false"
DataType
=
"System.Decimal"
DecimalDigits
=
"1"
HeaderText
=
"Estimate(hours)"
SortExpression
=
"Estimate"
UniqueName
=
"Estimate"
>
</
telerik:GridNumericColumn
>
<
telerik:GridTemplateColumn
ColumnEditorID
=
"EstimateAssumptions"
ItemStyle-CssClass
=
"breakWord120"
UniqueName
=
"EstimateAssumptions"
ItemStyle-Width
=
"100px"
AllowFiltering
=
"false"
HeaderStyle-Width
=
"150px"
HeaderText
=
"Estimate Assumptions"
>
<
ItemTemplate
>
<%# Eval("EstimateAssumptions")%>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadTextBox
ID
=
"txtEditEstimateAssumptions"
Height
=
"50px"
Wrap
=
"true"
TextMode
=
"MultiLine"
ToolTip='<%# Eval("EstimateAssumptions")%>' runat="server" Text='<%# Eval("EstimateAdjustmentRationale")%>'></
telerik:RadTextBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridAttachmentColumn
EditFormHeaderTextFormat
=
"Upload File:"
HeaderStyle-Width
=
"150px"
HeaderText
=
"Attachment"
AttachmentDataField
=
"Attachment"
AttachmentKeyFields
=
"ID"
FileNameTextField
=
"FileName"
DataTextField
=
"FileName"
UniqueName
=
"Attachment"
>
</
telerik:GridAttachmentColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"true"
UseStaticHeaders
=
"true"
ScrollHeight
=
"300px"
SaveScrollPosition
=
"true"
></
Scrolling
>
<%-- <
ClientEvents
OnBatchEditOpened
=
"OnBatchEditOpened"
OnBatchEditOpening
=
"BatchEditOpening"
/>--%>
<%-- <
ClientEvents
OnCommand
=
"gridCommand"
></
ClientEvents
>--%>
</
ClientSettings
>
</
telerik:RadGrid
>
I use the recommended code for setting tile postbacks (below) and I found that it changes the inline height Css to 185px. The two screenshots show the affect, it changes the horizontal layout and the tilelist height. Project code below, screenshots attached.
<%@ Page Language="C#" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link rel="stylesheet" href="/App_Themes/Edway/Edway.css" type="text/css" />
<link rel="stylesheet" href="mypage.css" type="text/css" />
<style>
.left {
align-items: center;
}
.wideContent {
width: 290px;
height: 130px;
font-family: Segoe UI;
padding: 10px;
}
.squareContent {
width: 100px;
height: 120px;
padding: 10px;
}
.shortContent {
height: 105px;
}
.font14 {
font-size: 14px;
}
.font16 {
font-size: 16px;
}
.peekTemplateClass {
width: 120px;
height: 120px;
padding: 10px;
font-size: 13px;
line-height: 20px;
}
.feedback {
width: 120px;
height: 120px;
font-size: 13px;
line-height: 20px;
}
/* group heading tile appearance */
.groupHeadingTitle {
height: 120px;
width: 120px;
position: relative;
}
.innerTitle {
width: 120px;
height: 40px;
top: 50%;
margin-top: -20px;
position: absolute;
font-size: 17px;
line-height: 20px;
padding-left: 10px;
}
div.noHover.RadTile {
border-color: transparent;
}
/* change tile texts to better fit long names and show over the images */
.RadTile div.rtileBottomContent {
font-weight: bold;
width: auto;
max-width: 120px;
color: Black;
/* semi-transparent background like this will work in CSS3 compatible browsers */
background-color: rgba(255,255,255,0.5);
height: 20px;
line-height: 20px;
padding: 0 10px;
bottom: 10px;
}
</style>
<!-- remove this function and the layout of the tiles changes
<script type="text/javascript">
function resetAutoPostBackTile(sender, args) {
var tiles = sender.get_allTiles();
for (var i = 0; i < tiles.length; i++) {
//a default condition would be if the tile has NavigateUrl set
//you can use a custom one - e.g., the presence of a CSS class
if (tiles[i].get_navigateUrl()) {
tiles[i].set_autoPostBack(false);
}
}
}
-->
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<telerik:RadTileList ID="RadTileList1" runat="server" TileRows="1" Skin="Bootstrap" AutoPostBack="true" OnClientLoad="resetAutoPostBackTile" CssClass="left" >
<Groups>
<telerik:TileGroup>
<telerik:RadImageAndTextTile ID="RadImageAndTextTile1" runat="server" Width="120px" Height="120px" NavigateUrl="student-Program-progress.aspx" Target="_self" Text="Gradebook">
<PeekTemplate>
<div class="squareContent font14">
See your complete gradebook
</div>
</PeekTemplate>
<PeekTemplateSettings CloseDelay="6000" Animation="Fade" HidePeekTemplateOnMouseOut="true"
ShowPeekTemplateOnMouseOver="true" />
</telerik:RadImageAndTextTile>
<telerik:RadImageAndTextTile ID="RadImageAndTextTile2" runat="server" Width="120px" Height="120px" NavigateUrl="/Help/MyPage.htm" Target="_blank" Text="Help" BackColor="#f8b617">
<PeekTemplate>
<div style="background-color: #f8b617" class="squareContent font14">
See help for your homepage
</div>
</PeekTemplate>
<PeekTemplateSettings CloseDelay="6000" Animation="Fade" HidePeekTemplateOnMouseOut="true"
ShowPeekTemplateOnMouseOver="true" />
</telerik:RadImageAndTextTile>
<telerik:RadImageAndTextTile ID="TextTileProfile" Name="TextTileProfile" runat="server" Width="120px" Height="120px" NavigateUrl="/MyPage-UserInfo.aspx" Target="_blank" Text="Profile" BackColor="#f37928">
<PeekTemplate>
<div style="background-color: #f37928" class="squareContent font14">
Update your password
</div>
</PeekTemplate>
<PeekTemplateSettings CloseDelay="6000" Animation="Fade" HidePeekTemplateOnMouseOut="true"
ShowPeekTemplateOnMouseOver="true" />
</telerik:RadImageAndTextTile>
<telerik:RadImageAndTextTile ID="tileLogout" runat="server" Width="120px" Height="120px" Text="Logout" BackColor="#03953f" AutoPostBack="true">
<PeekTemplate>
<div style="background-color: #03953f" class="squareContent font14">
Logout
</div>
</PeekTemplate>
<PeekTemplateSettings CloseDelay="6000" Animation="Fade" HidePeekTemplateOnMouseOut="true"
ShowPeekTemplateOnMouseOver="true" />
</telerik:RadImageAndTextTile>
</telerik:TileGroup>
</Groups>
</telerik:RadTileList>
<telerik:RadTileList ID="RadTileList2" runat="server" TileRows="1" Skin="Bootstrap" AutoPostBack="true" OnClientLoad="resetAutoPostBackTile" CssClass="left" >
<Groups>
<telerik:TileGroup>
<telerik:RadImageAndTextTile ID="RadImageAndTextTile3" runat="server" Width="120px" Height="120px" NavigateUrl="student-Program-progress.aspx" Target="_self" Text="Gradebook">
<PeekTemplate>
<div class="squareContent font14">
See your complete gradebook
</div>
</PeekTemplate>
<PeekTemplateSettings CloseDelay="6000" Animation="Fade" HidePeekTemplateOnMouseOut="true"
ShowPeekTemplateOnMouseOver="true" />
</telerik:RadImageAndTextTile>
<telerik:RadImageAndTextTile ID="RadImageAndTextTile4" runat="server" Width="120px" Height="120px" NavigateUrl="/Help/MyPage.htm" Target="_blank" Text="Help" BackColor="#f8b617">
<PeekTemplate>
<div style="background-color: #f8b617" class="squareContent font14">
See help for your homepage
</div>
</PeekTemplate>
<PeekTemplateSettings CloseDelay="6000" Animation="Fade" HidePeekTemplateOnMouseOut="true"
ShowPeekTemplateOnMouseOver="true" />
</telerik:RadImageAndTextTile>
<telerik:RadImageAndTextTile ID="RadImageAndTextTile5" Name="TextTileProfile" runat="server" Width="120px" Height="120px" NavigateUrl="/MyPage-UserInfo.aspx" Target="_blank" Text="Profile" BackColor="#f37928">
<PeekTemplate>
<div style="background-color: #f37928" class="squareContent font14">
Update your password
</div>
</PeekTemplate>
<PeekTemplateSettings CloseDelay="6000" Animation="Fade" HidePeekTemplateOnMouseOut="true"
ShowPeekTemplateOnMouseOver="true" />
</telerik:RadImageAndTextTile>
<telerik:RadImageAndTextTile ID="RadImageAndTextTile6" runat="server" Width="120px" Height="120px" Text="Logout" BackColor="#03953f" AutoPostBack="true">
<PeekTemplate>
<div style="background-color: #03953f" class="squareContent font14">
Logout
</div>
</PeekTemplate>
<PeekTemplateSettings CloseDelay="6000" Animation="Fade" HidePeekTemplateOnMouseOut="true"
ShowPeekTemplateOnMouseOver="true" />
</telerik:RadImageAndTextTile>
</telerik:TileGroup>
</Groups>
</telerik:RadTileList>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</div>
</form>
</body>
</html>
Hello,
I am attempting to display aggregate sums of groups in group headers in my RadGrid. I have attempted to use the instructions in the following article: http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/grouping/how-to/aligning-items-in-groupheader
My issue is due to the fact that I am using multiple levels of grouping. I am not sure why, but when I use the code in the article mentioned above, the entries in my group headers become misaligned as shown in the attached image. In the picture shown, my goal is to have the 10,000's be lined up no matter which level of grouping they are in, and to have the product names behave as they would be normally. Is there any easier way to display group totals for each column in the group headers? If not, is there some modification that can be made to the code in the help article that will ensure that the header items are aligned in each level of group headers? Thanks
Can the Radpivotgrid make use of the pivot commands in SQL to have the SQL system handle the summary processing?
For example the SQL script below seemed to not format correctly in the pivotgrid
create table Report
(
deck char(3),
Jib_in float,
rev float,
rev_insight float,
jib_out float,
creation float
)
insert into Report values
('A_1',0.345,0,0,1.23,20140212),
('B_2',0.456,0,4,2.34,20140215),
('C_3',0.554,0,6,0.45,20140217),
('D_4',0.231,0,8,7.98,20140222),
('E_5',0.453,0,0,5.67,20140219),
('F_6',0.344,0,3,7.23,20140223)
SELECT HEADER, [A_1],[B_2],[C_3],[D_4],[E_5],[F_6]
FROM
(SELECT DECK,HEADER, VALUE FROM REPORT
UNPIVOT
(
VALUE FOR HEADER IN ([JIB_IN],[REV_INSIGHT],[JIB_OUT],[CREATION])
) UNPIV
) SRC
PIVOT
(
SUM(VALUE)
FOR DECK IN ([A_1],[B_2],[C_3],[D_4],[E_5],[F_6])
) PIV
Hi,
I am trying to make some changes to the default appearance of RadAsyncUpload control. However I am unable to change the appearance. Basically I want to hide the Green dot icon which shows if file uploaded successfully or not and the Change the Red cross icon which shows along with the Remove option.(Please check the attached image for more details). I have tried with the below css style and unfortunately it didn't work. Could you please help me.
<style>
div.RadUpload .ruRemove
{
background-image
:
url
(
'/Images/DeleteImage.png'
)
!important
;
background-position
:
-2px
0px
;
width
:
50px
;
height
:
14px
;
}
</style>
Hi,
I want to show screenshot of Doc/Pdf files instead of the default icon on the file Explorer in Thumbnails View.
The screen shot is located on my machine and I have multiple files. So for every file, screenshot will be different.
Is there a way I can replace the default icon ?
Thanks