or
| <telerik:RadGrid SkinID="GridSkin" ID="AListingsGrid" runat="server" AllowPaging="True" |
| AutoGenerateColumns="False" GridLines="None" AllowSorting="True" PageSize="10" |
| ShowStatusBar="True" AllowCustomPaging="True" ShowHeader="false" ShowDesignTimeSmartTagMessage="False" |
| EnableViewState="False"> |
| <headercontextmenu enabletheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </headercontextmenu> |
| <pagerstyle alwaysvisible="false" mode="NextPrevAndNumeric" seopagingquerystringkey="CurrentPage" /> |
| <mastertableview allowcustomsorting="True" cellspacing="-1" enableviewstate="False"> |
| <SortExpressions> |
| </SortExpressions> |
| <Columns> |
| <telerik:GridTemplateColumn UniqueName="Image"> |
| <ItemTemplate> |
| <asp:Panel ID="PanelListings" runat="server" CssClass="display"> |
| <div class="PImg"> |
| <asp:HyperLink ID="lnkImghyper" runat="server"> |
| <div class="ListingImg"> |
| <div class="propertyImg"> |
| <asp:Image ID="ImageListingPhoto" runat="server" /> |
| </div> |
| <asp:Image CssClass="PSoldImg" ID="imgSold" runat="server" ImageUrl="~/Images/sold.gif" |
| Visible="false" /> |
| </div> |
| </asp:HyperLink> |
| </div> |
| <div id="PropertyInfo"> |
| <span class="price"> |
| <asp:Label ID="LblPrice" runat="server" Text="Label"></asp:Label></span> <span class="PropertyAdd"> |
| <asp:HyperLink ID="lnkGridSuburb" runat="server" Font-Bold="true"></asp:HyperLink> |
| </span> |
| <br class="clear" /> |
| <asp:Label ID="lblAddress" CssClass="lstAddress" runat="server"></asp:Label> |
| <div class="adCopyTitle"> |
| <asp:HyperLink ID="lnkAd" runat="server" Font-Bold="true"></asp:HyperLink> |
| </div> |
| <table class="listingsIcon"> |
| <tr> |
| <asp:Panel runat="server" ID="pnlBed"> |
| <td> |
| <asp:Label runat="server" ID="lblbed"></asp:Label> |
| <asp:Image ID="Image6" runat="server" ImageUrl="~/Images/Stock/ADBed.png" alt="" |
| CssClass="propertiesIcon" /> |
| </td> |
| </asp:Panel> |
| <asp:Panel runat="server" ID="pnlBath"> |
| <td> |
| <asp:Label runat="server" ID="lblShower"></asp:Label> |
| <asp:Image ID="Image5" runat="server" ImageUrl="~/Images/Stock/ADBath.png" alt="" |
| CssClass="propertiesIcon" /> |
| </td> |
| </asp:Panel> |
| <asp:Panel ID="pnlStudy" runat="server"> |
| <td> |
| <asp:Label ID="lblStudy" runat="server" Text=""></asp:Label> |
| <asp:Image ID="Image11" runat="server" ImageUrl="~/Images/Stock/ADStudy.png" alt="" |
| CssClass="propertiesIcon" /> |
| </td> |
| </asp:Panel> |
| <asp:Panel ID="PnlLivingIcon" runat="server" Visible="false"> |
| <td> |
| <asp:Label ID="LblCountLivingRoom" runat="server"></asp:Label> |
| <asp:Image ID="Image4" runat="server" ImageUrl="~/Images/Stock/ADLounge.png" alt="" |
| CssClass="propertiesIcon" /> |
| </td> |
| </asp:Panel> |
| <asp:Panel ID="pnlshowArea" runat="server"> |
| <td> |
| <asp:Label ID="lblshowArea" runat="server"></asp:Label> |
| <asp:Image ID="Image12" runat="server" ImageUrl="~/Images/Stock/ADArea.png" alt="" |
| CssClass="propertiesIcon" /> |
| </td> |
| </asp:Panel> |
| <asp:Panel ID="PnlGarageIcon" runat="server"> |
| <td> |
| <asp:Label ID="LblCountGarage" runat="server"></asp:Label> |
| <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/Stock/ADGarage.png" alt="" |
| CssClass="propertiesIcon" /> |
| </td> |
| </asp:Panel> |
| <asp:Panel ID="PnlPoolIcon" runat="server"> |
| <td> |
| <asp:Label ID="LblCountPool" runat="server"></asp:Label> |
| <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Stock/ADPool.png" alt="" |
| CssClass="propertiesIcon" /> |
| </td> |
| </asp:Panel> |
| <asp:Panel ID="PnlAirconIcon" runat="server" Visible="false"> |
| <td> |
| <asp:Label ID="LblCountAircon" runat="server"></asp:Label> |
| <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Stock/aircon_icon.png" Width="30" |
| alt="" CssClass="propertiesIcon" /> |
| </td> |
| </asp:Panel> |
| </tr> |
| </table> |
| <div class="Pdetail"> |
| <asp:Label CssClass="Pdetail" ID="lnkDetail" runat="server" /> |
| </div> |
| <asp:Panel ID="Panel1" runat="server" Visible="false"> |
| <span class="PTitle">ID#</span> <span class="PTitle"> |
| <%#Eval("Href_No")%></span></asp:Panel> |
| </div> |
| </asp:Panel> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| <EditFormSettings> |
| <PopUpSettings ScrollBars="None" /> |
| </EditFormSettings> |
| </mastertableview> |
| <clientsettings> |
| <Selecting AllowRowSelect="False" /> |
| <Scrolling AllowScroll="false" /> |
| </clientsettings> |
| <filtermenu enabletheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200" /> |
| </filtermenu> |
| <sortingsettings enableskinsortstyles="False" /> |
| <statusbarsettings loadingtext="Loading Listings, please wait..." /> |
| </telerik:RadGrid> |
| Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init |
| 'Add History handler |
| Dim RadScriptManager1 = DirectCast(Me.Master.FindControl("RadScriptManager1"), RadScriptManager) |
| AddHandler RadScriptManager1.Navigate, AddressOf RadScriptManager1_Navigate |
| End Sub |
| Private Sub AListingsGrid_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles AListingsGrid.NeedDataSource |
| 'Get datasource |
| end sub |
| Private Sub RadScriptManager1_Navigate(ByVal sender As Object, ByVal e As System.Web.UI.HistoryEventArgs) |
| If Not String.IsNullOrEmpty(e.State("CurrentPage")) Then |
| AListingsGrid.CurrentPageIndex = CInt(e.State("CurrentPage")) |
| Else |
| AListingsGrid.CurrentPageIndex = 0 |
| End If |
| AListingsGrid.DataSource = Nothing |
| AListingsGrid.Rebind() |
| end sub |
| <telerik:GridDropDownColumn DataField="Role_ID" DataType="System.Int32" DataSourceID="SqlDataSource2" ListValueField="Role_ID" ListTextField="RoleName" |
| HeaderText="Role" SortExpression="Role_ID" UniqueName="Role_ID"> |
The RoleName field from my datasource will display in the column instead of the actual Role_ID. Is there any way I can turn the non-editmode forecolor of the RoleName to red when the value of Role_ID = 45?
Thanks for any help,
Heath
List
<string> menuItems = new List<string>();
for(int i=0;i<100;i++)
{
menuItems.Add(
"A"+i);
}
RadMenu1.DataSource = menuItems;
RadMenu1.DataBind();
and on _menu_ItemDataBound i do these
((Telerik.Web.UI.
RadMenuEventArgs)(e)).Item.BackColor = System.Drawing.Color.White;
((Telerik.Web.UI.
RadMenuEventArgs)(e)).Item.ForeColor = System.Drawing.Color.Black;
| function OpenFileExplorerDialog(val) { |
| _globobjectartselect = val; |
| var wnd = $find("<%= ExplorerWindow.ClientID %>"); |
| wnd.set_navigateUrl("../../filemanager/explorer.aspx?search=" + val); |
| wnd.show(); |
| } |
| function OnFileSelected(wnd, fileSelected) { |
| switch(_globobjectartselect) |
| { |
| case "Picture": |
| var textbox = $find("<%= txtPictureFilePath.ClientID %>"); |
| textbox.set_value(fileSelected); |
| break; |
| case "Video": |
| var textbox = $find("<%= txtVideoFilePath.ClientID %>"); |
| textbox.set_value(fileSelected); |
| break; |
| } |
| } |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (Request.QueryString["search"] != null && Request.QueryString["search"] != "") |
| { |
| switch (Request.QueryString["search"]) |
| { |
| case "Picture": |
| string[] patterns1 = { "*.jpg", "*.jpeg", "*.gif", "*.png", "*.bmp" }; |
| RadFileExplorer1.Configuration.SearchPatterns = patterns1; |
| break; |
| case "Video": |
| string[] patterns2 = { "*.mpg", "*.mpeg", "*.avi", "*.divx", "*.wmv" }; |
| RadFileExplorer1.Configuration.SearchPatterns = patterns2; |
| break; |
| } |
| } |
| } |
