Hello
I have a small problem of display of my telerik objects on my page asp.net on the browser safari, the display is good on the other browser, chrome, firefox, IE
you have solutions ?
thank you
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
|
I believe this is a bug since it is causing unexpected results.
I have a grid which is bound client-side to a web service. It would appear that datetime columns are being displayed differently, depending on the user's clock settings. In my scenario, my grid has two such columns (declared below).
<telerik:GridDateTimeColumn HeaderText="Svc. Date" DataField="ServiceDate" DataType="System.DateTime" DataFormatString="{0:MM/dd/yy}" AllowFiltering="false">
<HeaderStyle width="80px" HorizontalAlign="Left" BorderStyle="None"></HeaderStyle>
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn HeaderText="Created When" DataField="CreatedWhen" DataType="System.DateTime" DataFormatString="{0:MM/dd/yy hh:mm:ss tt}" AllowFiltering="false">
<HeaderStyle width="140px" HorizontalAlign="Left" BorderStyle="None"></HeaderStyle>
</telerik:GridDateTimeColumn>
For users who are in the Central US timezone, the "ServiceDate" column is showing as one day earlier, and the "CreatedWhen" column is showing as one hour earlier. When they switch their computer clock to Eastern Timezone (the correct zone for the data being retrieved), then the ServiceDate and CreatedWhen columns appear correctly.
Looking at the json being used to bind the grid to, for one row, these are the values being retrieved from the database...
"ServiceDate":"\/Date(1508904000000)\/", "CreatedWhen":"\/Date(1508942284530)\/"
So, it appears whatever mechanism the grid is using to convert these date objects to date literals is using the user's computer settings. Is this true?
I'm not sure this is a good implementation. The data being retrieved from the database is intended to be displayed as is. Any manipulations to customize for user timezone should be handled by the developer. After all, the grid does not know what timezone the data being retrieved is in, so how does it know how to convert to the user's local machine timezone?
In this case, the data being retreived was in Eastern US timezone. So, a date of '10/24/17', for instance, was being displayed as '10/23/17' (one hour earlier than 10/24/17 00:00:00, assumedly)
So, is there any way to prevent this behavior?
Hi,
While i try to edit my rad editor it through an error Cannot read property 'replace' of undefined.
Please help me.
Thanks,
Rajiv
Hello, I'm currently implementing infinite scroll/load more functionality for news articles on our website. Do you have any documentation or advice on how we can initialize the RadSocialShare control client-side? I can load the initial batch of articles with their respective RadSocialShare controls, but because we're adding load more, we don't have the title and url to share until the user scrolls to the bottom of the page. Is there a way to find out which components we need in order to wire up RadSocialShare controls for the subsequent batches of articles?
Thanks!
I have a hyperlink within a Radgrid which opens up a RadWindow for the user.
<telerik:GridTemplateColumn HeaderText="Id" ReadOnly="true" SortExpression="Lookup" UniqueName="Lookup">
<ItemTemplate>
<asp:HyperLink ID="hlWorkOrderId" Text='<%#Eval("Lookup")%>' NavigateUrl='<%#String.Format("javascript:openWindow({0});", Eval("WorkOrderId"))%>' Enabled='<%#String.IsNullOrEmpty(CurrentUser).Equals(False).ToString%>' runat="server" />
</ItemTemplate>
</telerik:GridTemplateColumn>
The user is requesting that when they click on the hyperlink, they want that row in the grid highlighted. How can I pass the selected row index to the javascript function in the Hyperlink?
<
telerik:RadGrid
ID
=
"ShotDetail_RadGrid"
runat
=
"server"
DataSourceID
=
"ShotDetail_SqlDataSource"
Skin
=
"Black"
GridLines
=
"None"
ShowStatusBar
=
"True"
Width
=
"1100px"
CellSpacing
=
"0"
AutoGenerateColumns
=
"False"
>
<
HierarchySettings
ExpandTooltip
=
"Show related merch"
CollapseTooltip
=
"Collapse merch"
></
HierarchySettings
>
<
ExportSettings
IgnorePaging
=
"True"
>
<
Pdf
PageBottomMargin
=
"0.5in"
PageHeight
=
"8.5in"
PageLeftMargin
=
"0.35in"
PageRightMargin
=
"0.35in"
PageTopMargin
=
"0.5in"
PageWidth
=
"11in"
/>
</
ExportSettings
>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
</
ClientSettings
>
<
MasterTableView
DataKeyNames
=
"ShotID"
DataSourceID
=
"ShotDetail_SqlDataSource"
AllowCustomPaging
=
"True"
>
<
NestedViewTemplate
>
<
asp:Panel
runat
=
"server"
ID
=
"InnerContainer"
CssClass
=
"viewWrap"
Visible
=
"false"
>
<
telerik:RadTabStrip
runat
=
"server"
ID
=
"TabStip1"
MultiPageID
=
"Multipage1"
SelectedIndex
=
"0"
>
<
Tabs
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Merchandise"
PageViewID
=
"PageView1"
Selected
=
"True"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Shot Support"
PageViewID
=
"PageView2"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Completed Images"
>
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
runat
=
"server"
ID
=
"Multipage1"
SelectedIndex
=
"0"
RenderSelectedPageOnly
=
"false"
>
<
telerik:RadPageView
runat
=
"server"
ID
=
"PageView1"
>
<
asp:Label
ID
=
"ShotID_Label"
Text='<%# Eval("ShotID") %>' Visible="false" runat="server" />
<
asp:SqlDataSource
ID
=
"Merch_SqlDataSource"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:Alderman_ConnectionString %>"
SelectCommand="sp_web_Merch_Grid_sel" SelectCommandType="StoredProcedure">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"ShotID_Label"
PropertyName
=
"Text"
Type
=
"Int32"
Name
=
"ShotID"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
telerik:RadGrid
ID
=
"Merch_RadGrid"
runat
=
"server"
AutoGenerateColumns
=
"False"
DataSourceID
=
"Merch_SqlDataSource"
GridLines
=
"None"
CellSpacing
=
"0"
>
<
ClientSettings
AllowColumnsReorder
=
"True"
ReorderColumnsOnClient
=
"True"
>
</
ClientSettings
>
<
MasterTableView
DataSourceID
=
"Merch_SqlDataSource"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to Pdf"
/>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Barcode"
DataType
=
"System.Int64"
Display
=
"False"
HeaderText
=
"Barcode"
UniqueName
=
"Barcode"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Source"
HeaderText
=
"Vendor"
UniqueName
=
"Source"
FilterControlAltText
=
"Filter Source column"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Description"
HeaderText
=
"Description"
UniqueName
=
"Description"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"SKU"
HeaderText
=
"SKU"
UniqueName
=
"SKU"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"SKU2"
HeaderText
=
"SKU2"
UniqueName
=
"SKU2"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
EnableImageSprites
=
"True"
>
</
HeaderContextMenu
>
</
telerik:RadGrid
>
</
telerik:RadPageView
>
<
telerik:RadPageView
runat
=
"server"
Width
=
"100%"
ID
=
"PageView2"
>
<
asp:SqlDataSource
ID
=
"Attachments_SqlDataSource"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:Alderman_ConnectionString %>"
SelectCommand="SELECT [AttachmentTitle], [LinkedFromID] FROM [tAttachments] WHERE (([LinkedFromID] = @ShotID) AND ([LinkedFromTable] = @LinkedFromTable) AND (AttachmentIsInvalid = 0))">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"ShotID_Label"
PropertyName
=
"Text"
Type
=
"Int32"
Name
=
"ShotID"
/>
<
asp:Parameter
DefaultValue
=
"tShots"
Name
=
"LinkedFromTable"
Type
=
"String"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
telerik:RadGrid
ID
=
"Attachments_RadGrid"
runat
=
"server"
DataSourceID
=
"Attachments_SqlDataSource"
GridLines
=
"None"
CellSpacing
=
"0"
>
<
MasterTableView
DataSourceID
=
"Attachments_SqlDataSource"
AutoGenerateColumns
=
"False"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
/>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridTemplateColumn
UniqueName
=
"ColumnDownload"
>
<
ItemTemplate
>
<
asp:ImageButton
ID
=
"DownloadForShot_ImageButton"
runat
=
"server"
ImageUrl
=
"~/Images/view.gif"
OnClick
=
"DownloadForShot_ImageButton_Click"
/>
<
asp:PlaceHolder
ID
=
"PlaceHolder1"
runat
=
"server"
></
asp:PlaceHolder
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"AttachmentTitle"
HeaderText
=
"Documents"
UniqueName
=
"ColumnAttachment"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
>
</
HeaderContextMenu
>
</
telerik:RadGrid
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
</
asp:Panel
>
</
NestedViewTemplate
>
<
CommandItemSettings
ExportToPdfText
=
"Export to Pdf"
></
CommandItemSettings
>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Visible
=
"True"
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"JobShot"
HeaderText
=
"Shot"
UniqueName
=
"JobShot"
>
<
HeaderStyle
Width
=
"100px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Description"
HeaderText
=
"Description"
UniqueName
=
"Description"
>
<
HeaderStyle
Width
=
"700px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"MerchCount"
DataType
=
"System.Int16"
HeaderText
=
"Merch Count"
UniqueName
=
"MerchCount"
AllowFiltering
=
"False"
>
<
HeaderStyle
Width
=
"50px"
/>
<
ItemStyle
Wrap
=
"True"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"JobNumber"
Display
=
"False"
HeaderText
=
"JobNumber"
UniqueName
=
"JobNumber"
FilterControlAltText
=
"Filter JobNumber column"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ShotID"
DataType
=
"System.Int32"
HeaderText
=
"ShotID"
UniqueName
=
"ShotID"
Display
=
"False"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
<
PagerStyle
AlwaysVisible
=
"True"
/>
</
MasterTableView
>
<
PagerStyle
AlwaysVisible
=
"True"
/>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
<
HeaderContextMenu
EnableImageSprites
=
"True"
CssClass
=
"GridContextMenu GridContextMenu_Default"
>
</
HeaderContextMenu
>
</
telerik:RadGrid
>
protected
void
ShotDetail_RadGrid_PreRender(
object
sender, EventArgs e)
{
if
(!Page.IsPostBack) {
//*** Associate each Attachments_RadGrid with its own postback script to open the file.
for
(
int
i = 0; i <= ShotDetail_RadGrid.MasterTableView.Items.Count - 1; i++) {
Panel aspPanel = ShotDetail_RadGrid.MasterTableView.Items(i).ChildItem.FindControl(
"InnerContainer"
);
RadGrid attachmentsGrid = aspPanel.FindControl(
"Attachments_RadGrid"
);
RadScriptManager ScriptManager1 =
default
(RadScriptManager);
ScriptManager1 = (RadScriptManager)
this
.Parent.FindControl(
"RadScriptManager1"
);
ScriptManager1.RegisterPostBackControl(attachmentsGrid);
ImageButton viewImageButton = attachmentsGrid.MasterTableView.FindControl(
"DownloadForShot_ImageButton"
);
viewImageButton.Attributes.Add(
"onclick"
,
" ExportButtonClick ();"
);
}
}
}