| <telerik:RadPageView ID="PageView4" runat="server" Width="100%" > |
| <table width="100%" cellpadding="5"> |
| <tr><td> |
| <asp:Button ID="btnExport" runat="server" Text="Export Results to Excel" OnClick="btnExport_Click" /> |
| </td></tr> |
| <tr> |
| <td> |
| <telerik:RadGrid |
| ID="radgridResources" |
| runat="server" |
| AllowPaging="True" |
| Width="100%" |
| enableEmbeddedSkins="false" |
| Skin="FaCTS" |
| pagesize="15" |
| AllowSorting="true" |
| OnPageIndexChanged="radgridResources_PageIndexChanged" |
| OnItemCommand="radgridResources_ItemCommand" |
| OnSortCommand="radgridResources_SortCommand" |
| ClientSettings-AllowKeyboardNavigation="true" |
| EnableNoRecordsTemplate="true" |
| ItemStyle-HorizontalAlign="Center" |
| AlternatingItemStyle-HorizontalAlign="Center" |
| HeaderStyle-HorizontalAlign="Center"> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <MasterTableView |
| AutoGenerateColumns="False" |
| DataKeyNames="ID" |
| Width="100%" |
| CommandItemDisplay="None" |
| PageSize="15"> |
| <Columns> |
| </Columns> |
| <EditFormSettings> |
| <PopUpSettings ScrollBars="None" /> |
| </EditFormSettings> |
| <NoRecordsTemplate> |
| <div align="center" style="color:darkorange">---------- No Records to Display -----------</div> |
| </NoRecordsTemplate> |
| </MasterTableView> |
| <ClientSettings> |
| </ClientSettings> |
| </telerik:RadGrid></td></tr></table></telerik:RadPageView> |
| protected void LoadResources(bool resetPage) |
| { |
| //basic or advanced? |
| if (Session["ResourceSearchType"] == "basic") |
| { |
| _resources = ResourceService.GetSimpleSearchResults(txtName.Text, Int32.Parse(ddlServiceCategory1.SelectedValue), Int32.Parse(ddlServiceCategory2.SelectedValue), Int32.Parse(ddlServiceCategory3.SelectedValue), Int32.Parse(ddlCityProx.SelectedValue), txtZipCode.Text, txtAddress.Text, Int32.Parse(ddlCityExact.SelectedValue), txtZipCodeExact.Text, Int32.Parse(ddlLanguage.SelectedValue), Int32.Parse(ddlCity1.SelectedValue), Int32.Parse(ddlCity2.SelectedValue), Int32.Parse(ddlCity3.SelectedValue), txtDescription.Text); |
| } |
| else if ((Session["ResourceSearchType"] == "advanced") && (!(txtSqlWhere.Text == string.Empty))) |
| { |
| //load the advanced search resources |
| _resources = ResourceService.GetAdvancedSearchResults(txtSqlWhere.Text); |
| } |
| //see if we're using the selected columns |
| if (((rdoBasicUseSelectedColumns.Checked == true) && (Session["ResourceSearchType"] == "basic")) || |
| ((rdoAdvancedUseSelectedColumns.Checked == true) && (Session["ResourceSearchType"] == "advanced"))) |
| { |
| ... |
| } |
| else |
| { |
| //Use the default columns |
| ///todo: |
| ///load the default columns from the database for a search |
| radgridResources.MasterTableView.Columns.Clear(); |
| GridButtonColumn _buttonColumn; |
| GridBoundColumn _boundColumn; |
| GridHyperLinkColumn _hyperLinkColumn; |
| _buttonColumn = new GridButtonColumn(); |
| radgridResources.MasterTableView.Columns.Add(_buttonColumn); |
| _buttonColumn.ButtonType = Telerik.Web.UI.GridButtonColumnType.LinkButton; |
| _buttonColumn.DataTextField = "Name"; |
| _buttonColumn.HeaderText = "Name"; |
| _buttonColumn.CommandName = "Edit"; |
| _buttonColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center; |
| _buttonColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; |
| _buttonColumn.SortExpression = "Name"; |
| _buttonColumn.HeaderStyle.Width = 150; |
| _boundColumn = new GridBoundColumn(); |
| radgridResources.MasterTableView.Columns.Add(_boundColumn); |
| _boundColumn.DataField = "Phone1Description"; |
| _boundColumn.HeaderText = "Phone 1"; |
| _buttonColumn.SortExpression = "Phone1Description"; |
| _boundColumn.HeaderStyle.Width = 100; |
| _boundColumn = new GridBoundColumn(); |
| radgridResources.MasterTableView.Columns.Add(_boundColumn); |
| _boundColumn.DataField = "Phone2Description"; |
| _boundColumn.HeaderText = "Phone 2"; |
| _buttonColumn.SortExpression = "Phone2Description"; |
| _boundColumn.HeaderStyle.Width = 100; |
| _boundColumn = new GridBoundColumn(); |
| radgridResources.MasterTableView.Columns.Add(_boundColumn); |
| _boundColumn.DataField = "Phone1Description"; |
| _boundColumn.HeaderText = "Phone 3"; |
| _buttonColumn.SortExpression = "Phone3Description"; |
| _boundColumn.HeaderStyle.Width = 100; |
| _boundColumn = new GridBoundColumn(); |
| radgridResources.MasterTableView.Columns.Add(_boundColumn); |
| _boundColumn.DataField = "DescriptionSummary"; |
| _boundColumn.HeaderText = "DescriptionSummary"; |
| _hyperLinkColumn = new GridHyperLinkColumn(); |
| radgridResources.MasterTableView.Columns.Add(_hyperLinkColumn); |
| _hyperLinkColumn.DataTextField = "WebSiteURL"; |
| string[] fields = { "WebSiteURL" }; |
| _hyperLinkColumn.DataNavigateUrlFields = fields; |
| _hyperLinkColumn.DataNavigateUrlFormatString = "{0}"; |
| _hyperLinkColumn.HeaderStyle.Width = 150; |
| _hyperLinkColumn.HeaderText = "Web Site"; |
| _hyperLinkColumn.Target = "_blank"; |
| _boundColumn = new GridBoundColumn(); |
| radgridResources.MasterTableView.Columns.Add(_boundColumn); |
| _boundColumn.DataField = "MinimumDistance"; |
| _boundColumn.HeaderText = "Min Distance"; |
| _boundColumn.SortExpression = "MinimumDistance"; |
| _boundColumn.HeaderStyle.Width = 80; |
| if (((UserProfile)Session["_userProfile"]).IsAuthorized("Resource - Delete")) |
| { |
| _buttonColumn = new GridButtonColumn(); |
| radgridResources.MasterTableView.Columns.Add(_buttonColumn); |
| _buttonColumn.ButtonType = GridButtonColumnType.ImageButton; |
| _buttonColumn.ConfirmDialogType = GridConfirmDialogType.Classic; |
| _buttonColumn.ConfirmText = "Delete this resource?"; |
| _buttonColumn.HeaderText = "Delete"; |
| _buttonColumn.HeaderStyle.Width = 60; |
| _buttonColumn.CommandName = "Delete"; |
| _buttonColumn.ImageUrl = "./images/delete.gif"; |
| } |
| } |
| radgridResources.MasterTableView.TableLayout = GridTableLayout.Fixed; |
| radgridResources.DataSource = _resources; |
| if (resetPage == true) |
| { |
| radgridResources.CurrentPageIndex = 0; |
| } |
| radgridResources.DataBind(); |
| radgridResources.Focus(); |
| } |
radgridResources_ItemCommand
event handler is fired once and I navigate to a page based on the Id of the row.| Protected Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) |
| Dim _flg As GridBoundColumn = CType(e.Item.FindControl("flgColumn"), GridBoundColumn) |
| End Sub |
Hi,
I am having a problem with the conversion of partial dates in the RadDatePicker when the culture is set to Australia. The issue is that if a user enters a date of 6/2008 the control converts it to 6/2/2008 instead of 1/6/2008.
While this makes sense for a US date format of MM/dd/yyyy it is incorrect for an AU date format of dd/MM/yyyy.
Is there any way I can make the date picker convert the date correctly?
thanks
Gavin.
| <a href="www.google.com" style="color: #FF0033;">test link colours</a> |
Hi,
I tried to apply RTL locales on RadMenu control with Forest Skin, but unfortunately the control appearance is damaged!! And I tried to fix the skin with RTL support but I’m not expert in CSS. for that I’m asking for a help…
By the way, I’m wondering how come Telerik team create a skin doesn’t support RTL?
Thanks a lot in advance
<
script type="text/javascript">
function
confirmfun()
{
if
(confirm('r u sure u want to delete'))
return
true;
else
return false;
}
</
script>
public
void menuclick(object sender, Telerik.Web.UI.RadTreeViewContextMenuEventArgs e)
{
switch (e.MenuItem.Text)
{
case "delete":
treecontextmenu.Attributes.Add(
"onclick", "return confirmfun()");
if (e.Node.Nodes.Count.Equals(0))
{
e.Node.Remove();
}
else
Response.Write(
"<script> alert('deletion is not possible')</script>");
break;
}
}
<telerik:RadComboBox ID="radSkinTest" runat="server"></telerik:RadComboBox>
<appSettings>
<add key="Telerik.Web.UI.Skin" value="Vista"/>
</appSettings>
Any help would be appreciated.
Feizal
