We are currently working on localisation of the radgrid to support multilanguage.
Because not all settings were available to change via a resx file, we have a solution through the loading of skins. (and we set the different translated values through the XML variables)
we are already setting following values in our dutch version :
<GroupingSettings CollapseTooltip="Groep inklappen"
ExpandTooltip="Groep uitklappen"
GroupSplitDisplayFormat="Items {0} tot {1} worden getoond"
UnGroupButtonTooltip="Klik hier om de groep te ontkoppelen"
UnGroupTooltip="Verschuif buiten de balk om te ontkoppelen" />
<GroupPanel Text="Verplaats een kolomkop naar hier om op die kolom te groeperen" >
</GroupPanel>
<HierarchySettings CollapseTooltip="Inklappen"
ExpandTooltip="Uitklappen"
SelfCollapseTooltip="Verwijzing inklappen"
SelfExpandTooltip="Verwijzing uitklappen" />
<MasterTableView CommandItemSettings-AddNewRecordText="Nieuw record toevoegen"
CommandItemSettings-ExportToCsvText="Exporteren naar CSV"
CommandItemSettings-ExportToExcelText="Exporteren naar Excel"
CommandItemSettings-ExportToPdfText="Exporteren naar PDF"
CommandItemSettings-ExportToWordText="Exporteren naar Word"
CommandItemSettings-RefreshText="Verversen"
NoDetailRecordsText="Geen subrecords gevonden"
NoMasterRecordsText="Geen records gevonden" >
</MasterTableView>
<PagerStyle PagerTextFormat="Pagina wisselen: {4} Pagina <strong>{0}</strong> van <strong>{1}</strong>, items <strong>{2}</strong> naar <strong>{3}</strong> van <strong>{5}</strong>."
PageSizeLabelText="Pagina grootte" />
<SortingSettings SortedAscToolTip="Sorteren van laag naar hoog"
SortedDescToolTip="Sorteren van hoog naar laag"
SortToolTip="Sorteren" />
<StatusBarSettings LoadingText="Wordt geladen "
ReadyText="Gereed" />
We are looking for a list of the default values for the settings, so that we know which ones we should be changing additionally, and to serve as a source for translation towards other languages.
I can take an educated guess of several of the values, but to make sure I could use a list.
something like this:
HierarchySettings.CollapseTooltip="Collapse"
HierarchySettings.ExpandTooltip="Expand"
HierarchySettings.PageSizeLabelText="PageSize"
...
Is there a place where I can find these default values? (same thing is to be done for the datepicker, but that is for another forum)
Thanks.
Following are the two issues with Telerik RadAsyncUpload Control on a sharepoint 2007 project which are keeping us from making progress on a Form:
1. Telerik Control giving an exception when we provide UNC Path for a TargetLocation property of Telerik RadAsyncUpload Control on a shared UNC path on a server different than the Web Server on which Telerik and the form is hosted. The form uses Telerik to upload the attachments temporararily to a ASP.Net temporary folder on Same Web Server hosting the Form and Telerik RadAsyncUpload Control BUT on clicking the submit button, we want to save attachments to a permament location on a shared UNC path via the Targetlocation property of Telerik Control and this is giving the following error: Image attached
Logon Failure: unknown user name or bad password
2. Also, we have one issue occuring when we browse the form which hosts the telerik RadAsyncUpload control on Firefox. The progress area is stuck forever when we upload files which are not valid. Image attached
<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="TestingListBoxTemplates._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>Testing List Boxes</
title
>
<
telerik:RadStyleSheetManager
id
=
"RadStyleSheetManager1"
runat
=
"server"
/>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
Scripts
>
<%--Needed for JavaScript IntelliSense in VS2010--%>
<%--For VS2008 replace RadScriptManager with ScriptManager--%>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
/>
</
Scripts
>
</
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
</
telerik:RadAjaxManager
>
<
div
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
height
=
"800px"
width
=
"1242px"
>
<
telerik:RadComboBox
ID
=
"rcbContactName"
runat
=
"server"
EmptyMessage
=
"Enter a contact name"
HighlightTemplatedItems
=
"true"
EnableLoadOnDemand
=
"true"
AutoPostBack
=
"true"
/>
<
telerik:RadListBox
ID
=
"RadListBox1"
runat
=
"server"
AllowTransfer
=
"True"
height
=
"600px"
Width
=
"400px"
TransferToID
=
"RadListBox2"
AutoPostBackOnTransfer
=
"true"
OnTransferred
=
"RadListBox1_Transferred"
>
<
ItemTemplate
>
<
table
width
=
"300px"
>
<
tr
>
<
td
width
=
"100px"
><
span
><%# DataBinder.Eval(Container.DataItem, "contactID")%></
span
></
td
>
<
td
colspan
=
"3"
><
span
><%# DataBinder.Eval(Container.DataItem, "FirstName")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%></
span
></
td
>
</
tr
>
<
tr
><
td
><
span
>Company Name:</
span
></
td
><
td
><
span
><%# DataBinder.Eval(Container.DataItem, "CompanyName")%></
span
></
td
>
<
td
><
span
>Industries:</
span
></
td
><
td
><
span
><%# DataBinder.Eval(Container.DataItem, "Industries")%></
span
></
td
>
</
tr
>
<
tr
><
td
><
span
>Email Address:</
span
></
td
><
td
><
span
><
a
href
=
"mailto:<%# DataBinder.Eval(Container.DataItem, "
Email")%>"><%# DataBinder.Eval(Container.DataItem, "Email")%></
a
></
span
></
td
>
<
td
><
span
>Interests:</
span
></
td
><
td
><
span
><%# DataBinder.Eval(Container.DataItem, "Interests")%></
span
></
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadListBox
>
<
telerik:RadListBox
ID
=
"RadListBox2"
runat
=
"server"
Height
=
"600px"
Width
=
"400px"
>
<
ItemTemplate
>
<
span
><%# DataBinder.Eval(Container.DataItem, "contactID")%> -
<%# DataBinder.Eval(Container.DataItem, "FirstName")%>
<%# DataBinder.Eval(Container.DataItem, "Surname")%></
span
>
</
ItemTemplate
>
</
telerik:RadListBox
>
</
telerik:RadAjaxPanel
>
</
div
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
Runat
=
"server"
Skin
=
"Default"
>
</
telerik:RadAjaxLoadingPanel
>
</
form
>
</
body
>
</
html
>
Imports
Telerik.Web.UI
Imports
System.Data.SqlClient
Partial
Class
_Default
Inherits
System.Web.UI.Page
Public
sql_Connection
As
String
=
"Data Source=TestServer;Initial Catalog=Contacts;User ID=myself;password=password;Connect Timeout=200"
Private
Sub
Page_Load(sender
As
Object
, e
As
System.EventArgs)
Handles
Me
.Load
If
Not
IsPostBack
Then
getLBData()
RadListBox1.DataBind()
RadListBox2.DataBind()
End
If
End
Sub
Private
Sub
rcbContactName_ItemsRequested(sender
As
Object
, e
As
Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs)
Handles
rcbContactName.ItemsRequested
If
e.Text.Length > 2
Then
getNames(e.Text)
End
If
End
Sub
Private
Sub
getNames(
ByVal
fragment
As
String
)
Dim
cnSQL
As
New
SqlConnection(sql_Connection)
Dim
cmdSQL
As
New
SqlCommand
cmdSQL.Connection = cnSQL
cmdSQL.CommandType = Data.CommandType.StoredProcedure
cmdSQL.CommandText =
"usp_ContactSearch_prefix"
cmdSQL.Parameters.AddWithValue(
"@Contact"
, fragment)
'If Not String.IsNullOrEmpty(rcbPartialAddress.Text) Then cmdSQL.Parameters.AddWithValue("@Address", rcbPartialAddress.Text)
'If Not String.IsNullOrEmpty(rcbEmailAddress.Text) Then cmdSQL.Parameters.AddWithValue("@Email", rcbEmailAddress.Text)
Try
Dim
daSQL
As
New
SqlClient.SqlDataAdapter(cmdSQL)
Dim
dataTable
As
New
DataTable()
daSQL.Fill(dataTable)
For
Each
dataRow
As
DataRow
In
dataTable.Rows
rcbContactName.Items.Add(
New
RadComboBoxItem(
DirectCast
(dataRow(
"contactName"
),
String
), dataRow(
"contactid"
).ToString()))
Next
rcbContactName.DataBind()
Catch
Finally
If
cnSQL.State <> Data.ConnectionState.Closed
Then
cnSQL.Close()
End
If
End
Try
End
Sub
Private
Sub
rcbContactName_SelectedIndexChanged(sender
As
Object
, e
As
Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)
Handles
rcbContactName.SelectedIndexChanged
RadListBox1.DataSource = getLBData()
RadListBox1.DataBind()
End
Sub
Public
Sub
RadListBox1_Transferred(sender
As
Object
, e
As
Telerik.Web.UI.RadListBoxTransferredEventArgs)
Handles
RadListBox1.Transferred
For
Each
item
As
RadListBoxItem
In
e.Items
item.DataBind()
Next
End
Sub
Private
Function
getLBData()
Dim
cnSQL
As
New
SqlConnection(sql_Connection)
Dim
cmdSQL
As
New
SqlCommand
cmdSQL.Connection = cnSQL
cmdSQL.CommandType = Data.CommandType.StoredProcedure
cmdSQL.CommandText =
"usp_SearchLyrisContacts"
cmdSQL.Parameters.Add(
"@ContactName"
, DbType.
String
).Value = rcbContactName.Text
Dim
dataTable
As
New
DataTable()
Try
Dim
daSQL
As
New
SqlClient.SqlDataAdapter(cmdSQL)
daSQL.Fill(dataTable)
Catch
Finally
If
cnSQL.State <> Data.ConnectionState.Closed
Then
cnSQL.Close()
End
If
End
Try
Return
dataTable
End
Function
End
Class
...
public event EventHandler click;
public void RaisePostBackEvent(string eventArgument)
{
click1(this, EventArgs.Empty);
}
public virtual void click1(object sender, EventArgs e) {
if (click != null)
click(this, e);
}
private readonly RadComboBox radCombo = new RadComboBox
{
EnableVirtualScrolling = true,
EnableLoadOnDemand = true,
MaxHeight = 300,
Width = Unit.Percentage(100),
ShowMoreResultsBox = true,
ItemsPerRequest = 25,
OnClientItemsRequesting = "comboSetContext",
AutoPostBack = true
};
protected override void CreateChildControls()
{
radCombo.ID = ID + "_cb";
radCombo.ExpandAnimation.Duration = 200;
radCombo.CollapseAnimation.Duration = 200;
radCombo.WebServiceSettings.Path = "/combo.ashx";
radCombo.WebServiceSettings.UseHttpGet = true;
radCombo.WebServiceSettings.Method = ComboHandler;
radCombo.OnClientItemDataBound = "catComboItemDataBound";
radCombo.ToolTip = ToolTip;
if (string.IsNullOrEmpty(ComboHandler))
{
throw new Exception("Must specify a ComboHandler for CatComboBox " + ID);
}
Controls.Add(radCombo);
Controls.Add(new ScriptBlock { Script = "$('#" + ClientID + "_cb_Input').keydown(comboEnterPressed);" });
}
We have telerik license of version 2009.3.1314.35.
At one page, we have used radcombobox with ondemand rendering as below,
<telerik:RadComboBox ID="ddlEmployee" runat="server" Width="250px" Height="100px"
EmptyMessage="Select employee " EnableLoadOnDemand="True" EnableVirtualScrolling="true"
OnItemsRequested="RadComboBox1_ItemsRequested" DataTextField="Name" DataValueField="EmpNo"
Skin="WindowsXP" OffsetX="2" AllowCustomText="True" EnableEmbeddedSkins="False"
EnableAjaxSkinRendering="False" EnableEmbeddedBaseStylesheet="False" EnableItemCaching="True"
ShowMoreResultsBox="True">
</telerik:RadComboBox>
My requirement is to enable on demand functionality for employee list. The objective is, at page load I should be able to set selectedvalue item to employee combbox and also to achieve on demand functionality in it
The above scenario works fine if I dont set selectedvalue item to combobox in page load.
My observation while debugging.
The problem with RadCombobox is that if we bind the RadCombobox on page load, and try to click in combobox text area RadComboBox1_ItemsRequested is not get fired. However, if start writing something in RadCombobox text area RadComboBox1_ItemsRequested is get fired.
Please help us to achieve this functionality in combobox.
Thanks in advance.
<
telerik:RadGrid
ID
=
"ClaimFormPartsGrid"
runat
=
"server"
GridLines
=
"None"
Skin
=
"Simple"
AutoGenerateColumns
=
"False"
AllowSorting
=
"False"
AllowMultiRowSelection
=
"False"
>
<
MasterTableView
EditMode
=
"PopUp"
CommandItemDisplay
=
"Top"
InsertItemDisplay
=
"Top"
CommandItemSettings-ShowRefreshButton
=
"False"
CommandItemSettings-ShowAddNewRecordButton
=
"True"
AutoGenerateColumns
=
"False"
EnableViewState
=
"True"
DataKeyNames
=
"key"
>
<
Columns
>
<
telerik:GridEditCommandColumn
UniqueName
=
"EditCommand"
/>
<
telerik:GridBoundColumn
UniqueName
=
"key"
DataField
=
"key"
HeaderText
=
"Name"
/>
<
telerik:GridBoundColumn
UniqueName
=
"value"
DataField
=
"value"
HeaderText
=
"Value"
/>
<
telerik:GridButtonColumn
UniqueName
=
"DeleteCommand"
Text
=
"Delete"
CommandName
=
"DeleteCommand"
/>
</
Columns
>
<
EditFormSettings
EditFormType
=
"Template"
InsertCaption
=
"Adding new Claim Form Part"
CaptionFormatString
=
"Editing Claim Form Part"
PopUpSettings-Modal
=
"True"
PopUpSettings-ScrollBars
=
"None"
>
<
FormTemplate
>
<
div
class
=
"rust-form"
>
<
fieldset
class
=
"no-bg"
>
<
legend
></
legend
>
<
ul
>
<
li
>
<
asp:Label
runat
=
"server"
ID
=
"keyNameLabel"
AssociatedControlID
=
"KeyNameTextBox"
>Name: </
asp:Label
>
<
asp:TextBox
runat
=
"server"
ID
=
"keyNameTextBox"
></
asp:TextBox
>
</
li
>
<
li
>
<
asp:Label
runat
=
"server"
ID
=
"keyValueLabel"
AssociatedControlID
=
"KeyValueTextBox"
>Value: </
asp:Label
>
<
asp:TextBox
runat
=
"server"
ID
=
"keyValueTextBox"
></
asp:TextBox
>
</
li
>
</
ul
>
</
fieldset
>
<
ul
class
=
"rust-action-btns"
>
<
li
>
<
asp:Button
ID
=
"InsertUpdateButton"
runat
=
"server"
Text
=
"Save"
CssClass
=
"rust-primary-btn"
TabIndex
=
"1"
CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "" %>' /> />
</
li
>
<
li
>
<
asp:Button
ID
=
"ClaimCancelButton"
runat
=
"server"
CausesValidation
=
"False"
Text
=
"Cancel"
CssClass
=
"rust-secondary-btn"
CommandName
=
"Cancel"
/>
</
li
>
</
ul
>
</
div
>
</
FormTemplate
>
</
EditFormSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>
protected
override
void
OnInit(EventArgs e)
{
base
.OnInit(e);
this
.ClaimFormPartsGrid.NeedDataSource +=
this
.ClaimFormPartsGrid_NeedData;
this
.ClaimFormPartsGrid.ItemDataBound +=
this
.ClaimFormPartsGrid_ItemDataBound;
this
.ClaimFormPartsGrid.InsertCommand +=
this
.ClaimFormPartsGrid_InsertCommand;
this
.ClaimFormPartsGrid.UpdateCommand +=
this
.ClaimFormPartsGrid_UpdateCommand;
this
.ClaimFormPartsGrid.DeleteCommand +=
this
.ClaimFormPartsGrid_DeleteCommand;
}
protected
void
ClaimFormPartsGrid_NeedData(
object
sender, GridNeedDataSourceEventArgs e)
{
var source =
new
List<KeyValuePair<
string
,
string
>>();
source.Add(
new
KeyValuePair<
string
,
string
>(
"1"
,
"1"
));
source.Add(
new
KeyValuePair<
string
,
string
>(
"2"
,
"2"
));
source.Add(
new
KeyValuePair<
string
,
string
>(
"3"
,
"3"
));
source.Add(
new
KeyValuePair<
string
,
string
>(
"4"
,
"4"
));
this
.ClaimFormPartsGrid.DataSource = source;
}
protected
void
ClaimFormPartsGrid_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item.IsInEditMode)
{
var gei = e.Item
as
GridEditableItem;
if
(gei ==
null
)
{
return
;
}
var nameTextbox = (TextBox)gei.FindControl(
"keyNameTextBox"
);
var valueTextbox = (TextBox) gei.FindControl(
"keyValueTextBox"
);
if
(gei.OwnerTableView.IsItemInserted)
{
// Inserting.
nameTextbox.Text =
string
.Empty;
valueTextbox.Text =
string
.Empty;
}
else
{
// Editing.
var keyValue= (KeyValuePair<
string
,
string
>) gei.DataItem;
nameTextbox.Text = keyValue.Key.ToString();
valueTextbox.Text = keyValue.Value.ToString();
}
}
else
{
// displaying
var gdi = e.Item
as
GridDataItem;
if
(gdi ==
null
)
{
return
;
}
var keyValue= (KeyValuePair<
string
,
string
>)gdi.DataItem;
var deleteButton = gdi[
"DeleteCommand"
].Controls[0]
as
LinkButton;
if
(deleteButton !=
null
)
{
deleteButton.Attributes[
"onclick"
] =
"return confirm('Are you sure you want to delete "
+ keyValue.Key +
"?')"
;
}
}
}
protected
void
ClaimFormPartsGrid_InsertCommand(
object
sender, GridCommandEventArgs e)
{
var gei = e.Item
as
GridEditableItem;
if
(gei ==
null
)
{
return
;
}
var nameTextbox = (TextBox)gei.FindControl(
"keyNameTextBox"
);
var valueTextbox = (TextBox)gei.FindControl(
"keyValueTextBox"
);
}
protected
void
ClaimFormPartsGrid_UpdateCommand(
object
sender, GridCommandEventArgs e)
{
var gei = e.Item
as
GridEditableItem;
if
(gei ==
null
)
{
return
;
}
var oldName = (KeyValuePair<
string
,
string
>)gei.DataItem;
var nameTextbox = (TextBox)gei.FindControl(
"keyNameTextBox"
);
var valueTextbox = (TextBox)gei.FindControl(
"keyValueTextBox"
);
}
protected
void
ClaimFormPartsGrid_DeleteCommand(
object
sender, GridCommandEventArgs e)
{
var gei = e.Item
as
GridEditableItem;
if
(gei ==
null
)
{
return
;
}
}