<
asp:SiteMapDataSource
ID
=
"SiteMapDataSource1"
runat
=
"server"
ShowStartingNode
=
"false"
/>
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadMenu1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadMenu1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
telerik:RadMenu
ID
=
"RadMenu1"
runat
=
"server"
DataSourceID
=
"SiteMapDataSource1"
MaxDataBindDepth
=
"1"
DataTextField
=
"Title"
DataValueField
=
"Key"
DataNavigateUrlField
=
"Url"
OnItemDataBound
=
"RadMenu1_ItemDataBound"
>
<
LoadingStatusTemplate
>
<
asp:Image
runat
=
"server"
ID
=
"LoadingImage"
ImageUrl
=
"~/common/images/ajax-loader.gif"
ToolTip
=
"Loading..."
Width
=
"16px"
Height
=
"16px"
/>
</
LoadingStatusTemplate
>
<
WebServiceSettings
Path
=
"~/Webservices/SiteMenuService.svc"
Method
=
"LoadData"
/>
<
DataBindings
>
<
telerik:RadMenuItemBinding
Depth
=
"0"
ExpandMode
=
"WebService"
/>
</
DataBindings
>
</
telerik:RadMenu
>
Hello,
I have one RadAjaxManager on my parent page.
this page also contains the RadTabstrip Control. My Tabs are dynamically created according to my requirement. i have two modules.
Suppose my Page is contact.aspx which is called by two hyperlinks. 1. my account 2. contact edit.
when link1 My account is called at that time i do not want to load my 2nd Tab. i needed only 1st Tab.
when link2 Contact edit is called at that time i want to display my both the tabs. i had a requirement that i have to use dynamic tab creation only.
i have added Radajaxmanager settings like below.
Radgrid1 is on my one module and Radgrid2 is on my 2nd module.
When contact edit page called radgrid 1 and radgrid2 both are loaded and Ajax is working fine.
But when my account page is displaying at that time only RadGrid1 is displaying. when i click on edit button of grid my dynamic template gets open with save and cancel button. click on any of these buttons Ajaxloading panel is not displaying. but if i comment the code below then it is working.
<telerik:AjaxSetting AjaxControlID="RadGrid2">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid2" />
</UpdatedControls>
</telerik:AjaxSetting>
my contact page contains below radajax settings.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="AjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="AjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadGrid2">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid2" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Thanks
Sweta
<telerik:RadComboBox ID="ddlAction1"
Width="110px" runat="server" EmptyMessage="Select Action" AllowCustomText="true" Height="55px" OnClientLoad="OnClientLoad" >
<Items>
<telerik:RadComboBoxItem Text="Copy" Value="2" />
<telerik:RadComboBoxItem Text="Delete" Value="1" />
</Items>
</telerik:RadComboBox>
After selecting any action copy or delete it performs repective code at cs side
I used both methods at cs end
ddlAction1.ClearSelection() method
even set ddlAction1.EmptyMessage = "Select Action"
i want to set empty message after every action
please let me know
Thanks
Hi All,
http://www.telerik.com/help/aspnet-ajax/localization-global-resources.html i'm follow this steps but i can't localized to "27 items in 2 pages"
How can it?
Thanks
Dear Telerik,
We have a RadcomboBox in a filter template and we put an default value using the following code
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs)
RadGrid1.MasterTableView.FilterExpression = "([UserName] like '" + Session("UserName") + "%' )"
End Sub
Protected Sub RadComboBoxUserName_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs)
If Not Me.IsPostBack Then
If e.Item.Text = Session("UserName") Then
e.Item.Selected = True
End If
End If
End Sub
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"ContentPlaceHolder1"
Runat
=
"Server"
>
<
br
/>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AutoGenerateColumns
=
"False"
EnableLinqExpressions
=
"False"
DataSourceID
=
"SqlDataSource1"
GridLines
=
"None"
Skin
=
"Hay"
PageSize
=
"30"
AllowFilteringByColumn
=
"True"
AllowPaging
=
"True"
AllowSorting
=
"True"
OnEditCommand
=
"RadGrid1_EditCommand"
>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"True"
/>
</
ClientSettings
>
<
MasterTableView
datakeynames
=
"PMID"
datasourceid
=
"SqlDataSource1"
commanditemdisplay
=
"Top"
PageSize
=
"25"
>
<
RowIndicatorColumn
><
HeaderStyle
Width
=
"20px"
></
HeaderStyle
></
RowIndicatorColumn
>
<
ExpandCollapseColumn
><
HeaderStyle
Width
=
"20px"
></
HeaderStyle
></
ExpandCollapseColumn
>
<
CommandItemSettings
ExportToPdfText
=
"Export to Pdf"
></
CommandItemSettings
>
<
Columns
>
<
telerik:GridTemplateColumn
UniqueName
=
"TemplateColumn"
AllowFiltering
=
"False"
>
<
ItemTemplate
>
<
asp:ImageButton
ID
=
"ImageButton1"
runat
=
"server"
AlternateText
=
"Προβολή"
CommandName
=
"Edit"
ImageUrl
=
"~/images/edt.gif"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"PMID"
DataType
=
"System.Decimal"
HeaderText
=
"Κωδικός"
ReadOnly
=
"True"
SortExpression
=
"PMID"
UniqueName
=
"PMID"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CName"
HeaderText
=
"Πελάτης"
SortExpression
=
"CName"
UniqueName
=
"CName"
AndCurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"True"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CAddr"
HeaderText
=
"Διεύθυνση"
SortExpression
=
"CAddr"
UniqueName
=
"CAddr"
AndCurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"True"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CCity"
HeaderText
=
"Πόλη"
SortExpression
=
"CCity"
UniqueName
=
"CCity"
AndCurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"True"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
AutoPostBackOnFilter
=
"True"
DataField
=
"ProposalDate"
DataType
=
"System.DateTime"
HeaderText
=
"Ημερ/νία Προσφοράς"
SortExpression
=
"ProposalDate"
UniqueName
=
"ProposalDate"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"ProposalDateLabel"
runat
=
"server"
Text='<%# Eval("ProposalDate", "{0:dd/MM/yyyy}") %>'></
asp:Label
>
</
ItemTemplate
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
AutoPostBackOnFilter
=
"false"
DataField
=
"PSStatus"
HeaderText
=
"Κατάσταση"
UniqueName
=
"PSStatus"
ReadOnly
=
"True"
>
<
FilterTemplate
>
<
telerik:RadComboBox
ID
=
"RadComboPStatus"
DataSourceID
=
"SqlDataSource2"
DataTextField
=
"PSStatus"
DataValueField
=
"PSStatus"
Height
=
"100px"
AppendDataBoundItems
=
"true"
SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("PSStatus").CurrentFilterValue %>'
runat="server" OnClientSelectedIndexChanged="CityIndexChanged">
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"'Ολα"
/>
</
Items
>
</
telerik:RadComboBox
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock2"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function CityIndexChanged(sender, args) {
var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");
tableView.filter("PSStatus", args.get_item().get_value(), "EqualTo");
}
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"UserName"
HeaderText
=
"Χρήστης"
UniqueName
=
"UserName"
>
<
FilterTemplate
>
<
telerik:RadComboBox
ID
=
"RadComboBoxUserName"
DataSourceID
=
"SqlDataSource3"
DataTextField
=
"username"
AutoPostBackOnFilter
=
"false"
DataValueField
=
"username"
Height
=
"200px"
AppendDataBoundItems
=
"true"
SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("UserName").CurrentFilterValue %>'
runat="server"
OnClientSelectedIndexChanged="TitleIndexChanged"
OnItemDataBound="RadComboBoxUserName_ItemDataBound" >
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"'Ολοι"
/>
</
Items
>
</
telerik:RadComboBox
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function TitleIndexChanged(sender, args) {
var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");
tableView.filter("UserName", args.get_item().get_value(), "EqualTo");
}
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
</
Columns
>
<
CommandItemTemplate
>
<
asp:LinkButton
ID
=
"FldNew"
Text
=
"Νέα Προσφορά"
runat
=
"server"
Font-Underline
=
"true"
onclick
=
"FldNew_Click"
Font-Bold
=
"True"
></
asp:LinkButton
>
</
CommandItemTemplate
>
</
MasterTableView
>
<
HeaderStyle
Font-Bold
=
"False"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
ForeColor
=
"White"
Wrap
=
"True"
/>
</
telerik:RadGrid
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:AlarmConfigurator %>"
SelectCommand="select * from dbo.ProposalMasterView where DealerCode=@DealerCode order by PMID Desc">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"FldDealerCode"
ConvertEmptyStringToNull
=
"False"
Name
=
"DealerCode"
PropertyName
=
"Value"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
asp:HiddenField
ID
=
"FldDealerCode"
runat
=
"server"
/>
<
asp:SqlDataSource
ID
=
"SqlDataSource2"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:AlarmConfigurator %>"
SelectCommand="select PSID,PSStatus from dbo.StatusMaster">
</
asp:SqlDataSource
>
<
asp:SqlDataSource
ID
=
"SqlDataSource3"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:AlarmConfigurator %>"
SelectCommand="select username, userID from Users where DealerCode=@DealerCode ">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"FldDealerCode"
Name
=
"DealerCode"
PropertyName
=
"Value"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
telerik:RadAjaxManager
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"SqlDataSource2"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
</
asp:Content
>
The code works, but the first time we enter a value to another filter item the combo is loosing its default value. Then if manually select an item from the filter combo, it works fine.
Any support to resolve this issue is welcome.
Than you
George
protected
void
GridView1_RowDataBound(
object
sender, GridViewRowEventArgs e)
{
if
(e.Row.RowType == DataControlRowType.DataRow)
//set settings only to rows
{
e.Row.Attributes.Add(
"onmouseover"
,
"javascript:this.className = 'rowOnMouseOver'"
);
e.Row.Attributes.Add(
"onmouseout"
,
"javascript:this.className = ''"
);
e.Row.Attributes.Add(
"onclick"
, ClientScript.GetPostBackClientHyperlink(
this
.GridView1,
"Select$"
+ e.Row.RowIndex.ToString()));
}
}
protected
void
Button1_Click(
object
sender, EventArgs e)
{
RadPanelItem newItem =
new
RadPanelItem(RadTextBox1.Text);
RadPanelBar1.Items.Add(newItem);
}