Hi,
i am using a RadToolbar with multiple RadToolBarDropDown-Controls, which are using the OnLoad-Method to attach the Datasource.
My problem is that I am not able to verify, which button has been pressed, because the number of items in the drop down lists is not constant. I need a dynamic solution for this.
I am using something like to following code in the background:
Protected
Sub
Toolbar1_ButtonClick(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.RadToolBarEventArgs)
Handles
Toolbar1.ButtonClick
Select
Case
e.Item.Index
Case
1
dim testString as
String
= e.Item.Text
End
Select
End
Sub
Hello,
I am working to implement localization of a big portal. There is a lot of different telerik controls. I found that controls supports localization via Global resources and .resx files
The problems are that we are adding new languages dynamically and that number of controls is too big.
1) Is there any way how to implement translations dynamically i.e. without .resx files?
2) Is there some way how we can initialize culture globally (not for every control grid.Culture = ...) and individual for each request e.g. some global settings or something like that?
Thanks
<telerik:radajaxloadingpanel runat=
"server"
id=
"RadAjaxLoadingPanel1"
skin=
"Office2007"
/>
<telerik:radajaxpanel runat=
"server"
id=
"RadAjaxPanel1"
loadingpanelid=
"RadAjaxLoadingPanel1"
>
<!-- ---------------------------------------------------------------------- -->
<!-- DropDownList control start ----------------------------------------------- -->
<!-- ---------------------------------------------------------------------- -->
<asp:sqldatasource id=
"SqlDataSource2"
connectionstring=
"<%$ ConnectionStrings:IPdataConnectionString %>"
providername=
"System.Data.SqlClient"
selectcommand=
"SELECT DISTINCT Email, UserId as ID FROM [aspnet_Membership]"
runat=
"server"
></asp:sqldatasource>
<label
for
=
"EmailDDN"
>
<asp:label id=
"Label2"
runat=
"server"
class
=
"text"
>Select Email: </asp:label>
</label>
<asp:dropdownlist id=
"EmailDDN"
runat=
"server"
autopostback=
"True"
datasourceid=
"SqlDataSource2"
appenddatabounditems=
"True"
datakeyfield=
"ID"
datatextfield=
"Email"
datavaluefield=
"Email"
onselectedindexchanged=
"DDN_SelectedIndexChanged"
>
<asp:listitem>
Select your email address
</asp:listitem>
</asp:dropdownlist>
<br />
<asp:label id=
"EmailLabel1"
runat=
"server"
>Selected Email: </asp:label>
<br />
<asp:label id=
"EmailLabel2"
runat=
"server"
>Selected Value: </asp:label>
<br />
<!-- ------------------------------------------------------------------ -->
<!-- ---------------------------------------------------------------------- -->
<!-- ListBox control start -------------------------------------------- -->
<telerik:radlistbox runat=
"server"
id=
"RadListBox1"
skin=
"Office2007"
datasourceid=
"SourceDataSource"
allowautomaticupdates=
"true"
datakeyfield=
"ID"
datatextfield=
"Name"
DataValueField=
"ID"
height=
"200px"
allowtransfer=
"true"
transfertoid=
"RadListBox2"
transfermode=
"Copy"
width=
"230px"
autopostbackontransfer=
"true"
/>
<telerik:radlistbox runat=
"server"
id=
"RadListBox2"
datasourceid=
"DestinationDataSource"
allowautomaticupdates=
"true"
datakeyfield=
"ID"
datatextfield=
"Name"
DataValueField=
"ID"
height=
"200px"
allowreorder=
"true"
autopostbackonreorder=
"true"
allowdelete=
"True"
width=
"230px"
autopostbackondelete=
"true"
/>
<asp:sqldatasource id=
"SourceDataSource"
runat=
"server"
connectionstring=
"<%$ ConnectionStrings:IPdataConnectionString %>"
providername=
"System.Data.SqlClient"
deletecommand=
"DELETE FROM Products WHERE ID = @ID"
insertcommand=
"INSERT INTO Products (Name, ID, Email) VALUES (@Name, @ID, @Email)"
selectcommand=
"SELECT Name, ID FROM Products"
updatecommand=
"UPDATE Products SET Name = @Name, Email = @Email WHERE ID = @ID"
>
<deleteparameters>
<asp:parameter name=
"ID"
type=
"Int32"
/>
</deleteparameters>
<insertparameters>
<asp:parameter name=
"Name"
type=
"String"
/>
<asp:controlparameter name=
"Email"
propertyname=
"SelectedValue"
controlid=
"EmailDDN"
type=
"String"
/>
<asp:controlparameter name=
"ID"
propertyname=
"SelectedValue"
controlid=
"EmailDDN"
type=
"String"
/>
</insertparameters>
<selectparameters>
<asp:controlparameter name=
"Email"
controlid=
"EmailDDN"
propertyname=
"SelectedValue"
type=
"String"
/>
<asp:controlparameter name=
"ID"
propertyname=
"SelectedValue"
controlid=
"EmailDDN"
type=
"String"
/>
</selectparameters>
<updateparameters>
<asp:parameter name=
"Name"
type=
"String"
/>
<asp:controlparameter name=
"Email"
propertyname=
"SelectedValue"
controlid=
"EmailDDN"
type=
"String"
/>
<asp:controlparameter name=
"ID"
propertyname=
"SelectedValue"
controlid=
"EmailDDN"
type=
"String"
/>
</updateparameters>
</asp:sqldatasource>
<asp:sqldatasource id=
"DestinationDataSource"
runat=
"server"
connectionstring=
"<%$ ConnectionStrings:IPdataConnectionString %>"
providername=
"System.Data.SqlClient"
deletecommand=
"DELETE FROM ProductsMail WHERE ID = @ID"
insertcommand=
"INSERT INTO ProductsMail (Name, Email, ID) VALUES (@Name, @Email, @ID)"
selectcommand=
"SELECT Name, ID, Email FROM ProductsMail"
updatecommand=
"UPDATE ProductsMail SET Name = @Name, Email = @Email WHERE ID = @ID"
>
<deleteparameters>
<asp:parameter name=
"ID"
type=
"Int32"
/>
</deleteparameters>
<insertparameters>
<asp:parameter name=
"Name"
type=
"String"
/>
<asp:controlparameter name=
"Email"
propertyname=
"SelectedValue"
controlid=
"EmailDDN"
type=
"String"
/>
<asp:controlparameter name=
"ID"
propertyname=
"SelectedValue"
controlid=
"EmailDDN"
type=
"String"
/>
</insertparameters>
<updateparameters>
<asp:parameter name=
"Name"
type=
"String"
/>
<asp:controlparameter name=
"Email"
propertyname=
"SelectedValue"
controlid=
"EmailDDN"
type=
"String"
/>
<asp:controlparameter name=
"ID"
propertyname=
"SelectedValue"
controlid=
"EmailDDN"
type=
"String"
/>
</updateparameters>
</asp:sqldatasource>
</telerik:radajaxpanel>
====
protected void DDN_SelectedIndexChanged(System.Object sender, System.EventArgs e)
{
EmailLabel1.Text = EmailDDN.SelectedItem.ToString();
EmailLabel2.Text = EmailDDN.SelectedValue.ToString();
}
<
telerik:RadGrid
ID
=
"JobsGrid"
runat
=
"server"
AutoGenerateColumns
=
"False"
CellSpacing
=
"0"
AllowSorting
=
"True"
EnableEmbeddedSkins
=
"False"
GroupingEnabled
=
"False"
SkinID
=
"XLogixBlue"
>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"True"
EnableDragToSelectRows
=
"False"
/>
<
div
id
=
"GridContainer"
style
=
"position: absolute; width: 920px; height: 400px; left: 10px; top: 10px"
>
<
div
id
=
"ctl00_maincontentarea_JobsGrid"
class
=
"RadGrid RadGrid_Default"
>
<
table
cellspacing
=
"0"
class
=
"rgMasterTable"
id
=
"ctl00_maincontentarea_JobsGrid_ctl00"
style
=
"width:100%;table-layout:auto;empty-cells:show;"
>
<
colgroup
>
<
col
/>
<
col
/>
<
col
/>
<
col
/>
<
col
/>