Telerik Forums
UI for ASP.NET AJAX Forum
18 answers
1.0K+ views
Hi
I'm using radrgid in my application inside the radpanelbar as one of the radpanelitem.
I need to get the data from database on regular interval of 2 minutes and need to show in grid without need of refreshing the page.
For the I'm using Timer and updating the panelbar using asp:updatepanel with conditional updatemode and calling needdatasource event from pageload for every 2 minutes.
So to have the chages on interval basis I'm rebing the grid.
But paging is not working. If I dnt rebind the grid I'm not able to see the new chages.
 here is my code of needdatasource event
DataTable dtConsole = new DataTable();
       DataAccess accessData = new DataAccess();
       try
       {
           dtConsole = accessData.GetData("select consolename from CONSOLE");
           consloeGrid.DataSource = dtConsole;
           //if I dont rebind new data not showing else paging is not working
           consloeGrid.Rebind();
           if (dtConsole.Rows.Count > 10)
           {
               consloeGrid.AllowPaging = true;
           }
       }
Please help me as early as possible.
Eyup
Telerik team
 answered on 18 Jun 2020
0 answers
104 views

Hi,

 

I would like to drop items from a listbox into automatically generated textboxes.
when I use "tbxTester" it works very well but not with dynamic textboxes.

Thank you for your help

 

Droped ():
System.MissingMemberException: The public member 'text' of type 'Object' was not found. to Microsoft.VisualBasic.CompilerServices.Symbols.Container.GetMembers (String & MemberName, Boolean ReportErrors) to Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSet (Object Instance, Type Type, String MemberName, Object [] Arguments, String [] ArgumentNames, Type [] TypeArguments, Boolean OptimisticSet, Boolean RValueBase, CallType CallType) to Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSet (Object Instance, Type Type, String MemberName, Object [] Arguments, String [] ArgumentNames, Type [] TypeArguments) to Page_Telerik .lbxItems_Dropped (Object sender, RadListBoxDroppedEventArgs e) in \TelerikDemoStandAlone.aspx.vb: line 88

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TelerikDemoStandAlone.aspx.vb" Inherits="Page_TelerikDemoStandAlone" %>
 
<!DOCTYPE html>
 
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-fr">
<head runat="server" lang="fr-fr">
    <meta name="robots" content="noindex,nofollow" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"  lang="fr" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <link href="/css/coreCss.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="FormMain" runat="server" lang="fr-fr">
        <telerik:RadScriptManager ID="rsm" runat="server" />
        <main>
            <section>
                <article class="container full home">
                    <div class="row">
                        <asp:Panel ID="pnlMain" CssClass="col-xs-12 col-h" runat="server">
 
                            <telerik:RadAjaxPanel ID="ajaxPanel1" runat="server">
                                <div class="col-xs-12 col-md-12 col-h">
                                    <telerik:RadComboBox ID="cbxSizeBox" AutoPostBack="true" Width="100%" Filter="Contains" Skin="MetroTouch" RenderMode="Lightweight" runat="server" />
                                </div>
                            </telerik:RadAjaxPanel>
 
                            <telerik:RadAjaxPanel ID="ajaxPanel2" runat="server">
                                <div class="col-xs-12 col-md-2 col-h">
                                    <div class="col-lng">
                                        <h2>Items</h2>
                                        <asp:Panel ID="pnlItems" CssClass="col-xs-12 col-h" runat="server">
                                            <telerik:RadListBox ID="lbxItems" Width="100%" Height="500px"
                                                SelectionMode="Multiple" AllowTransfer="true" AutoPostBackOnTransfer="true" AutoPostBack="true"
                                                AllowReorder="true" AutoPostBackOnReorder="true" EnableDragAndDrop="true"
                                                ButtonSettings-ShowDelete="false" ButtonSettings-ShowReorder="false" ButtonSettings-ShowTransfer="false" ButtonSettings-ShowTransferAl="false" ButtonSettings-ShowTransferAll="false"
                                                OnDropped="lbxItems_Dropped"
                                                Skin="MetroTouch" RenderMode="Lightweight"
                                                runat="server" />
                                        </asp:Panel>
                                    </div>
                                </div>
                            </telerik:RadAjaxPanel>
 
                            <telerik:RadAjaxPanel ID="ajaxPanel3" runat="server">
                                <div class="col-xs-12 col-md-10 col-h">
                                    <div class="col-lng">
                                        <h2>Boxes</h2>
                                        <telerik:RadTextBox ID="tbxTester" Text="TextBox tester ..." runat="server" />
 
                                        <asp:Panel ID="pnlMaper" CssClass="col-xs-12 col-h" runat="server" />
                                   </div>
                                </div>
                            </telerik:RadAjaxPanel>
 
                            <telerik:RadAjaxPanel ID="ajaxPanel0" runat="server">
                                <div class="col-xs-12 col-h" style="max-height: 400px; overflow-y: scroll;">
                                    <asp:Label ID="litDebug" ForeColor="red" runat="server" />
                                </div>
                            </telerik:RadAjaxPanel>
 
                            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
                                <div class="col-xs-12 col-h" style="max-height: 400px; overflow-y: scroll;">
                                    <asp:Literal ID="litRslt" runat="server" />
                                </div>
                            </telerik:RadAjaxPanel>
 
                            <div class="col-xs-12 col-h text-center">
                                <telerik:RadButton ID="btnSubmit" AutoPostBack="true" Text="save" Skin="BlackMetroTouch" Icon-PrimaryIconCssClass="rbSave" RenderMode="Lightweight" runat="server" />
                            </div>
                        </asp:Panel>
                    </div>
                </article>
            </section>
        </main>
 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Width="256px" Height="64px">
            <asp:Label ID="AjaxLoadingPanelLabel" runat="server" ForeColor="Orange" Text="Loading..." /><br />
            <asp:Image ID="AjaxLoadingPanelImage" runat="server" Width="224px" Height="48px" ImageUrl="~/img/Loading.gif" />
        </telerik:RadAjaxLoadingPanel>
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
 
                <telerik:AjaxSetting AjaxControlID="lbxItems">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="lbxItems" LoadingPanelID="RadAjaxLoadingPanel1" />
                         <telerik:AjaxUpdatedControl ControlID="tbxTester" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="litDebug" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
 
                <telerik:AjaxSetting AjaxControlID="cbxSizeBox">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pnlMaper" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="litRslt" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="litDebug" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
 
                <telerik:AjaxSetting AjaxControlID="btnSubmit">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="litRslt" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="litDebug" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
 
            </AjaxSettings>
        </telerik:RadAjaxManager>
    </form>
</body>
</html>

 

Imports Telerik.Web.UI
Imports System.Web.UI.WebControls
Imports System.Drawing
Imports System.Linq
Imports Newtonsoft.Json
 
Partial Class Page_TelerikDemoStandAlone
    Inherits System.Web.UI.Page
 
 
    Protected Sub Page_PreInit(sender As Object, e As EventArgs) Handles Me.PreInit
    End Sub
 
    Private Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
        If Not IsPostBack Then
            ViewState("datasBag") = ""
        End If
    End Sub
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        If Not IsPostBack Then
            lbxItems_GatDatas()
            cbxSizeBox_GatDatas()
        End If
    End Sub
 
    ' lbxItems ///////////////////////////////////////////////////////////
    Private Sub lbxItems_GatDatas()
        lbxItems.Items.Clear()
        lbxItems.ClearSelection()
 
        Dim isa As New itemStandAlone
        Try
            If isa.getItems() Then
                Dim itemValue As String = "", itemText As String = "", itemTooltip As String = "", itemEnabled As Boolean = False
 
                For i As Integer = 0 To isa.DT.Rows.Count - 1
                    Dim idI As Integer = CInt(isa.DT.Rows(i)("id"))
                    Dim titleI As String = Trim(isa.DT.Rows(i)("label").ToString() & "")
                    Dim valueI As String = Trim(isa.DT.Rows(i)("value").ToString() & "")
 
                    itemValue = valueI
                    itemText = titleI
                    itemEnabled = True
                    itemTooltip = idI & ";" & titleI & ";" & valueI & ";"
 
                    Dim rlbi As New RadListBoxItem
                    rlbi.Value = itemValue
                    rlbi.Text = itemText
                    rlbi.ToolTip = itemTooltip
                    rlbi.Enabled = itemEnabled
                    lbxItems.Items.Add(rlbi)
                    rlbi = Nothing
 
                Next
                lbxItems.Enabled = True
            Else
                lbxItems.Enabled = False
                litDebug.Text &= "itemStandAlone.getItems() : no items"
            End If
        Catch ex As Exception
            lbxItems.Enabled = False
            litDebug.Text &= ex.ToString()
        End Try
        'isa.Dispose()
        isa = Nothing
    End Sub
 
    Protected Sub lbxItems_Dropped(ByVal sender As Object, ByVal e As RadListBoxDroppedEventArgs)
        Dim debug As String = ""
        Dim datasTxt As String = "", emptyTxt As String = "", errorTxt As String = "error"
        Dim selectedCtrl As New Object
 
        Try
            For Each item As RadListBoxItem In e.SourceDragItems
                If item.Value.ToString <> "" Then
                    datasTxt = item.Value.ToString
                End If
            Next
 
            If (TypeOf pnlMaper.FindControl(e.HtmlElementID) Is Telerik.Web.UI.RadTextBox) Then
                selectedCtrl = DirectCast(pnlMaper.FindControl(e.HtmlElementID), Telerik.Web.UI.RadTextBox)
            ElseIf tbxTester.ClientID = e.HtmlElementID Then
                selectedCtrl = DirectCast(tbxTester, Telerik.Web.UI.RadTextBox)
            End If
 
            If (datasTxt <> "") Then
                If selectedCtrl IsNot Nothing Then
                    selectedCtrl.Text = datasTxt
                Else
                    debug &= "selectedCtrl Is Nothing !!! <br/>"
                    debug &= "pnlMaper.FindControl(e.HtmlElementID).ClientID : " & pnlMaper.FindControl(e.HtmlElementID).ClientID.ToString & "<br/>"
                End If
            Else
                debug &= "datasTxt Is empty !!! <br/>"
            End If
        Catch ex As Exception
            debug &= "Droped() : <br/>" & ex.ToString & "<br/>"
        End Try
 
        litDebug.Text &= debug
    End Sub
 
    ' cbxSizeBox ///////////////////////////////////////////////////////////
    Private Sub cbxSizeBox_GatDatas()
        cbxSizeBox.EmptyMessage = "Select your size ..."
        cbxSizeBox.Items.Insert(0, New RadComboBoxItem("4", 4))
        cbxSizeBox.Items.Insert(1, New RadComboBoxItem("8", 8))
        cbxSizeBox.Items.Insert(2, New RadComboBoxItem("12", 12))
    End Sub
 
    ' GenerateMaper ///////////////////////////////////////////////////////////
    Private Sub GenerateMaper(x As Integer, y As Integer)
        Dim gTxt As Telerik.Web.UI.RadTextBox
 
        Try
            pnlMaper.Controls.Add(New LiteralControl("<table id='gridBoxes' cellspacing='0' cellpadding='0'>"))
            For i = 1 To x
                pnlMaper.Controls.Add(New LiteralControl("<tr>"))
                For j = 1 To y
                    pnlMaper.Controls.Add(New LiteralControl("<td>"))
                    gTxt = New Telerik.Web.UI.RadTextBox
                    gTxt.ID = "boxCase_" & i.ToString & "x" & j.ToString
                    gTxt.Attributes.Add("datas-positions-x", i)
                    gTxt.Attributes.Add("datas-positions-y", j)
                    gTxt.Attributes.Add("datas-value", 0)
 
                    pnlMaper.Controls.Add(gTxt)
                    controlBag.Add(gTxt.ID.ToString, gTxt)
                    pnlMaper.Controls.Add(New LiteralControl("</td>"))
                Next
                pnlMaper.Controls.Add(New LiteralControl("</tr>"))
            Next
            pnlMaper.Controls.Add(New LiteralControl("</table>"))
 
            SetDatasBag_ViewState()
        Catch ex As Exception
            litDebug.Text = ex.ToString()
        End Try
    End Sub
 
    ' datasbag ///////////////////////////////////////////////////////////
    Protected controlBag As New Dictionary(Of String, Control)
    Private Function GetDatasBag() As String
        Dim output As String = ""
 
        Try
            If ViewState("datasBag") IsNot Nothing Then
                output = ViewState("datasBag")
            End If
        Catch ex As Exception
            output &= ex.ToString & "<br/>"
        End Try
 
        Return output
    End Function
 
    Private Function SetDatasBag_ViewState(Optional debug As Boolean = False) As Boolean
        Dim output As Boolean = False, outputDatas As String = "", _dbg As String = ""
 
        Try
            Dim dt As New DataTable
            dt.Columns.Add("id", GetType(Integer))
            dt.Columns.Add("x", GetType(String))
            dt.Columns.Add("y", GetType(String))
            dt.Columns.Add("val", GetType(String))
 
            Dim i As Integer = 0
            For Each ctrl In controlBag
                i += 1
                If TypeOf ctrl.Value Is Telerik.Web.UI.RadTextBox Then
                    Dim gTxt As Telerik.Web.UI.RadTextBox = DirectCast(ctrl.Value, Telerik.Web.UI.RadTextBox)
                    Dim x As String = gTxt.Attributes("datas-positions-x").ToString(), y As String = gTxt.Attributes("datas-positions-y").ToString(), val As String = gTxt.Attributes("datas-value").ToString()
                    dt.Rows.Add(i, x, y, val)
 
                    If (debug) Then
                        _dbg &= "id:" & i & ";"
                        _dbg &= "x:" & x & ";"
                        _dbg &= "y:" & y & ";"
                        _dbg &= "val:" & val & ";"
                        _dbg &= "<br/>"
                    End If
                End If
            Next
 
            outputDatas = JsonConvert.SerializeObject(dt)
            output = (outputDatas <> "")
            If (output) Then
                ViewState("datasBag") = outputDatas
            End If
 
        Catch ex As Exception
            _dbg &= ex.ToString & "<br/>"
        End Try
 
        If (_dbg <> "") Then
            litDebug.Text = "SetDatasBag_ViewState : " & _dbg
        End If
 
        Return output
    End Function
 
 
    ' controllers ///////////////////////////////////////////////////////////
    Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click
        litRslt.Text = GetDatasBag()
    End Sub
 
    Private Sub cbxSizeBox_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Handles cbxSizeBox.SelectedIndexChanged
        If (IsNumeric(e.Value)) Then
            GenerateMaper(e.Value, e.Value)
        End If
    End Sub
 
End Class
 
' itemStandAlone //////////////////////////////////////////////////////
Public Class itemStandAlone
    Implements IDisposable
 
    Public Sub Dispose() Implements IDisposable.Dispose
        DT.Clear()
        DT = Nothing
        GC.SuppressFinalize(Me)
    End Sub
 
    Public DT As New DataTable
    Public Function getItems() As Boolean
        Dim output As Boolean = False
 
        DT.Columns.Add("id", GetType(Integer))
        DT.Columns.Add("label", GetType(String))
        DT.Columns.Add("value", GetType(String))
 
        For i = 1 To 24
            DT.Rows.Add(i, "LABEL (" & i.ToString & ")", "V" & i.ToString)
        Next
 
        If DT.Rows.Count > 0 Then
            output = True
        End If
 
        Return output
    End Function
End Class

 

 

Nuwea
Top achievements
Rank 1
 asked on 18 Jun 2020
6 answers
520 views
Hi there,
 
First post on this forum :)

My question relates to placing a radgrid inside a GridTemplateColumn within a RadGrid, I'm not sure how to do it.  Currently i have a radgrid as per below:

 <telerik:RadGrid id="rgdListLicences" runat="server" Width="100%"  GridLines="None" Skin="eLicensing_paging"  EnableEmbeddedSkins="false" EnableViewState="true">
                     <MasterTableView RetrieveAllDataFields="false" AutoGenerateColumns="false" >
                        <Columns>
                            <telerik:GridBoundColumn DataField="clientRef" HeaderText="Client Ref">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="commencementDate" HeaderText="Commencement Date">
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn UniqueName="validations" HeaderText="Validations" SortExpression="CompanyName" InitializeTemplatesFirst="false">
                                <ItemTemplate>
                                    <telerik:radgrid ID="rgdValidations"  runat="server" >
                                        <MasterTableView >
                                            <Columns >
                                                <telerik:GridBoundColumn DataField="validations.Text">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                        </MasterTableView>
                                    </telerik:radgrid>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>

                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>


And I Bind to the radgrid in the codebehind, as follows:

rgdListLicences.DataSource = CType(licenceImportParser.getLicences.Licence.ToList, IEnumerable)
rgdListLicences.DataBind()


The Datasource licenceImportParser.getLicences.Licence, is a list of objects.  These objects contain several properties, which bind successfully to the other columns (ie. commencement date above), but also contain a list of Strings called validations which i need to bind to the radgrid inside the GridTemplateColumn.

I thought i could just set the DataField="validations.Text"  or something like that considering validations is a list of Strings.. but not sure here!


But I cant figure out how i can bind it!  Any help is greatly appreciated!!

Thanks
Neil
Manish
Top achievements
Rank 2
 answered on 17 Jun 2020
2 answers
277 views
Hello,
in an ASP.NET WebForms applications, written in VB, could someone provide me 
a simple example for populate a 

telerik:RadComboBox

getting the values from one only column (States) from a table in a SQL Server database? 

No where conditions, just only the distinct States from a single table. 

Thank you in advance. 

Luis
Luis
Top achievements
Rank 1
Veteran
 answered on 17 Jun 2020
2 answers
4.2K+ views
Good day,
please am using a radcombobox that allows for multiple selection.
My problem is how can i insert the selected items into a database one by one.
Can someone please help me
thank you
Doncho
Telerik team
 answered on 17 Jun 2020
1 answer
152 views

Hello,

I am new in telerik radgrid, working in c#. I am working in a radgrid which have AllowFilteringByColumn feature. I am binding this grid from code behind every time. This grid have 2 extra CheckBox column. Problem is when I am performing any search page load is called and  the checked check box disappears after page load. How can I Resolve this problem. I need to keep the previous selection of the check box after performing search on preferred column.

 

<telerik:RadGrid ID="grdAgreement" runat="server" SelectedItemStyle-CssClass="SelectedStyle"
                                    HeaderStyle-Height="40px" HeaderStyle-BackColor="#CEECF5" AutoGenerateColumns="False"
                                    GroupPanelPosition="Top" ResolvedRenderMode="Classic" Skin="Simple" Width="100%"
                                    ShowStatusBar="True" AllowMultiRowSelection="True" AllowFilteringByColumn="true"
                                    HeaderStyle-Font-Size="18px" HeaderStyle-Font-Bold="true" HeaderStyle-Font-Names="Arial Regular">
                                    <MasterTableView DataKeyNames="Id" >
                                        <Columns>                                            
                                            <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" FilterControlAltText="Filter Id column"
                                                HeaderText="ID" ReadOnly="True" SortExpression="Id" UniqueName="Id" Visible="true" AllowFiltering="false">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="DocumentTitle" FilterControlAltText="Filter DocumentTitle column"
                                                HeaderText="Document Title" SortExpression="DocumentTitle" UniqueName="DocumentTitle" AllowFiltering="true"
                                                AndCurrentFilterFunction="Contains" AutoPostBackOnFilter="True" AllowSorting="True"
                                                HeaderStyle-Font-Size="18px" FilterControlWidth="120px">
                                                <HeaderStyle Width="200px" HorizontalAlign="Center" />
                                            </telerik:GridBoundColumn>                                           
                                            <telerik:GridTemplateColumn HeaderText="Select for Template" AllowFiltering="false">
                                                 <ItemTemplate>
                                                          <asp:CheckBox ID="chkSelectForTemplate" Checked='<%# Eval("SelectforTemp") %>' runat="server" />
                                                 </ItemTemplate>
                                            </telerik:GridTemplateColumn> 
                                        </Columns>
                                    </MasterTableView>
                                    <HeaderStyle BackColor="#CEECF5" Height="40px"></HeaderStyle>
                                    <SelectedItemStyle CssClass="SelectedStyle"></SelectedItemStyle>
                                </telerik:RadGrid>

 

code behind

if (!IsPostBack)
        {
            if (Request.QueryString["ID"] != null)
            {
                string str_id = Request.QueryString["ID"].ToString();
                if (str_id != "")
                {
                    // code for select by ID
                    BindingGrid(str_id);
                }
            }
            else
            {
                BindingGrid();
            }           
        }
        else
        {            
        }

Attila Antal
Telerik team
 answered on 17 Jun 2020
1 answer
133 views

Hello All,

I'm trying to calculate a percentage in a GridCalculatedColumn, but both input types are integer, so the return value is incorrect (an int formatted as %, which results in 0%, 100% 200% etc.)

Is it possible to cast the value in the expression, or do I have to do it the hard way using itemdatabound or similar?

markup:
<telerik:GridCalculatedColumn DataFields="totalNo,UsedNo" HeaderText="Allocated" DataType="System.Decimal"
Expression="({0} / {1})" ColumnGroupName="Compute" DataFormatString="{0:P}" />

I tried "(Convert.ToDecimal({0}) .... but that gave me errors.

Thx in advance!
M.

Attila Antal
Telerik team
 answered on 17 Jun 2020
1 answer
228 views

Hello,

Is there any reason why Chrome browsers adds this odd border on focus? 

So far, I noticed that it happens with TextBox and RadGrid but possibly it happens with other controls too. 

When you inspect elements in Chrome there is no such style

 

Thank you

 

Doncho
Telerik team
 answered on 17 Jun 2020
5 answers
987 views
I want to be able to change the cell of "Name" to Color.Firebrick if column "Active" is false. I can't seem to be able to change it. I attempted to place the information inside of my sub that takes in GridCommandEventArgs. It looks like this:


Protected Sub myGrid_ShowInactivity(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles myGrid.ItemCommand
            If TypeOf e.Item Is GridDataItem Then
                Dim item As GridDataItem = e.Item
                If item("Active").Text = "false" Then
                    item("Name").Text = item("Name").Text + " INACTIVE"
                    item("Name").BackColor = Color.Firebrick
                    item("Name").ForeColor = Color.White
                End If
            End If
End Sub


For some reason this is not doing anything.

Do I have to put this inside a different sub? If so, what sub would that be?

I also get an error when I attempt any other action, so it seems that this is not the place I should put this code in.
Eyup
Telerik team
 answered on 17 Jun 2020
5 answers
2.4K+ views
Hi,

I Created radgrid with the column name "Project Health" ( Unique name is "ProjectHealth"). I can edit this column on popup. Once popup opens they can select text Green or Red or Yellow. (using radcombo box). What i want is when user select the yellow, the text color in the grid should display in yellow and same for both red and green. How to do it. how to do this??
Eyup
Telerik team
 answered on 17 Jun 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?