Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
139 views
I am trying to load a RadGrid based on the value inside the RadComboBox. I have tried a few things but can't quite get it to work. The user is supposed to select a value("email") from the RadComboBox and a RadGrid should be loaded onto the page. At the moment one of the PROCs have an email hard-coded so a grid is loaded onto the page which contains the data for that specific user. I also have a variation of that PROC that is supposed to change the RadGrid whenever the user selects a different email, but I can't get it to work. Once the user selects an email they will see a grid which contains the Customer Number, if they click the Customer Number they will see a drop down which contains the number along with an error message.

I have attached the aspx, .cs, PROCs, and a photo of what the page looks like with one hard-coded existing email from the RadComboBox.

Pavlina
Telerik team
 answered on 31 Mar 2014
6 answers
263 views
Is it possible to add the current record data into ConfirmText message? The code below does not work. I know that it can be done in the code behind but I look for simpler solution. 
<telerik:GridButtonColumn UniqueName="DeleteColumn"
    ButtonType="ImageButton"
    CommandName="Delete"
    ConfirmText='Are you sure you want to delete this record with id: <%# Eval("ID")%> ?'
    ConfirmTitle="Delete Record"
    ConfirmDialogType="RadWindow"
    Text="Delete" >
    <ItemStyle HorizontalAlign="Center" Width="20px" />
</telerik:GridButtonColumn>
Eyup
Telerik team
 answered on 31 Mar 2014
4 answers
100 views
I am attempting to upgrade a .Net web app with Telerik RadControls Q3 2011 to Q3 2013 and have run into skinning issues with the RadSlidingZone.  The browser is also being upgraded from IE8 running in Compatibility View to IE11 in Edge Mode.

​Attached (IE8_RadSlidingZone.jpg) is what the RadSlidingZones on the far left used to look like and needs to maintain its appearance.

Attached (IE11_RadSlidingZone.jpg) is what the RadSlidingZones look like after upgrading the Telerik .dll's and running in IE11. 

The issue is the size/height of each sliding zone has shrunk down so that the text is unreadable.

<telerik:RadPane runat="server" ID="pNav" SkinID="pLNav" Height="100%" OnClientExpanded="pNav_ClientExpanded">
    <div id="DivSLZone" runat="server" style="float: left; clear: none; width: 22px;
        height: 100%;" class="tabsContainer">
        <telerik:RadSlidingZone ID="slZone" runat="server" SlideDirection="Right" ClickToOpen="true"
            Width="22">
            <telerik:RadSlidingPane ID="slPane1" Title="Tab 1 Title" runat="server" Width="275"
                EnableDock="false" Height="100px">
                <div runat="server" id="divSlPane1">
                </div>
            </telerik:RadSlidingPane>
            <telerik:RadSlidingPane ID="slPane2" Title="Tab 2 Title" runat="server" Width="275"
                EnableDock="false" Height="100%">
                <div runat="server" id="divSlPane2">
                </div>
            </telerik:RadSlidingPane>
            <telerik:RadSlidingPane ID="slPane3" Title="Tab 3 Title" runat="server" Width="275"
                EnableDock="false" Height="100%" OnClientExpanded="slPane3_ClientExpanded" OnClientCollapsed="slPane3_ClientCollapsed">
                <div runat="server" id="divSlPane3">
                </div>
            </telerik:RadSlidingPane>
        </telerik:RadSlidingZone>
    </div>
    <div style="height: 100%;">
        <asp:PlaceHolder runat="server" ID="phLeft" />
    </div>
</telerik:RadPane>

.tabsContainer, .rspTabsContainer {
    background: #B0C4DE !important;
    border-right: #336699 1px solid !important;
}

Any suggestions?

Thanks,

Rob
Bozhidar
Telerik team
 answered on 31 Mar 2014
6 answers
455 views
Hi,

I am trying to implement a row total function in Javascript for a RadGrid. Searching the help and forums I have managed to set up a function that is called by onBlur for each of my numeric columns, but cannot seem to get the value of the fields held in the template columns.

The definition of the columns (14 in total) is:


<telerik:GridTemplateColumn UniqueName="colTime1" AllowFiltering="False" HeaderText="1" FooterStyle-Width="50" HeaderStyle-Width="50" ItemStyle-Width="50">
                        <ItemTemplate>
                            <asp:TextBox ID="editTime1" runat="server" Width="40px"></asp:TextBox>
                        </ItemTemplate>
                        <FooterStyle Width="50px" />
                        <HeaderStyle Width="50px" />
                        <ItemStyle Width="50px" />
                    </telerik:GridTemplateColumn>
 
And the javascript functin is:

function valueChanged(totalTime, textbox, c, r) {
                   var grid = $find("<%=RadGrid1.ClientID %>");
                   var MasterTable = grid.get_masterTableView();
                   var Rows = MasterTable.get_dataItems();
                   var valnow = textbox.value;
                   var total = valnow;
                   for (col = 1; col < 15; col++) {
                       if (col != c) {
                           var row = Rows[r - 1];
                           var columnName = "EditTime".concat(col);
                           var textTime = row.findControl(columnName);
                           var colVal = textTime.get_value();
                           if (!isNan(colVal)) {
                               total += colVal;
                           }
                           else {
                               textTime.set_value("");
                           }
                       }
                   }
                   totalTime.set_value(total);
               }

Everything is getting called OK but the lines:

var row = Rows[r - 1];
var columnName = "EditTime".concat(col);
var textTime = row.findControl(columnName);
var colVal = textTime.get_value();

Always returns null for textTime. The examples on the forum here seem to indicate the syntax is correct.

Am I implementing this wrong, or is there a better way of obtaining the values?

David Penny
David Penny
Top achievements
Rank 2
 answered on 31 Mar 2014
1 answer
56 views
Hello,

I am dynamically adding a GridTemplateColumn to the grid. The column is added as required the first page load but on each following postback I am getting a new empty columm with header "Action". Any Idea?

 protected void Page_Init(object sender, EventArgs e)
        {
   
              var col = this.requestGrid.MasterTableView.Columns.FindByUniqueNameSafe("ActionId");
               
                GridTemplateColumn actionColumn = new GridTemplateColumn();
                this.requestGrid.MasterTableView.Columns.Add(actionColumn);
                actionColumn.ItemTemplate = new ActionTemplate("actionID");                
                
                actionColumn.DataField = "ActionID";
                
                actionColumn.HeaderText = "Action";
               
        }
Shinu
Top achievements
Rank 2
 answered on 31 Mar 2014
1 answer
73 views
Hi,
I am facing problem in the RADGRID column alignment. I am using 2013.3.1015.35 version. In firefox it works good but in IE 10 it's not working. In IE 11 it's working good.

Regards,
Rathina
Venelin
Telerik team
 answered on 31 Mar 2014
2 answers
111 views
hello dears, 

When I clicked on the body of page , the RadDropDownTree should not disappear, kindly let me know how I can solve this.
MOHAMMED
Top achievements
Rank 1
 answered on 31 Mar 2014
1 answer
93 views
Hi all,

I developed new application by following http://demos.telerik.com/aspnet-ajax/tabstrip/examples/application-scenarios/wizard/defaultcs.aspx .

All user controls are in the sub-folder and one parent page (which has tabstrip control and mulitpageview control) is in the top folder. I am able to access this application. 
 
I did make use of ValidationGroups.  I did set all the controls in each user control, including the buttons that should trigger validation, to be the same, unique ValidationGroup value.  I've ensured that only the button in the user control will trigger validation for the controls in each user control.

However, I tried to click a button at the user control but was taken to other user control without validation. This validation did not work for me. Please help me with this issue.  The difference between my application and telerik application is only different directory because all user controls and parent page are in the same directory while they are in different directory (sub-folder and top-folder) 

Please let me know as soon as possible.

Thank you very much. 
Shinu
Top achievements
Rank 2
 answered on 31 Mar 2014
1 answer
93 views
Hello,

This is my RadGrid and I have RadButton inside of it, the thing is I want that the RadButton will be disabled for every click on the button.
(there is a button for each row inside of the RadGrid.)

The result that I'm getting for now is the RadButton only disabled one time instead of each row/click.

how can I do it for each click of the user on the button?




<telerik:RadGrid
         ID="rgOfficersToCallIn"
         runat="server"
         AutoGenerateColumns="False"
         AllowPaging="True"
         AllowSorting="True"
         PageSize="17"
         CellSpacing="0" GridLines="None"
         OnSortCommand="rgOfficersToCallIn_SortCommand"
         OnPageIndexChanged="rgOfficerToCallIn_PageIndexChanged"
         EnableHeaderContextFilterMenu="True" 
         Width="1200px"
         Height="640px">
            <ClientSettings EnablePostBackOnRowClick="true">              
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="true" UseStaticHeaders="True" SaveScrollPosition="true" />
            </ClientSettings>
            <MasterTableView ShowHeadersWhenNoRecords="true" NoMasterRecordsText="No Employees Records to display" GridLines="None" ItemStyle-Height="23px" Font-Size="11px" TableLayout="Auto">
                <PagerStyle Mode="NumericPages" AlwaysVisible="true"></PagerStyle>
                <Columns>             
                    <telerik:GridBoundColumn HeaderText="HR EmployeeID" HeaderStyle-Width="120px" Display="false" DataField="HREmployeeID" FilterControlWidth="40px" ShowFilterIcon="false" SortExpression="HREmployeeID"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn HeaderText="Employee Number" HeaderStyle-Width="100px" DataField="EmployeeNumber" FilterControlWidth="95px" ShowFilterIcon="false" SortExpression="EmployeeNumber"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn HeaderText="First Name" HeaderStyle-Width="70px" DataField="FirstName" FilterControlWidth="105px" ShowFilterIcon="false"  SortExpression="FirstName"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn HeaderText="Last Name" HeaderStyle-Width="70px" DataField="LastName" FilterControlWidth="84px" ShowFilterIcon="false"  SortExpression="LastName"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn HeaderText="City" HeaderStyle-Width="90px" DataField="City" FilterControlWidth="78px" ShowFilterIcon="false" SortExpression="City"></telerik:GridBoundColumn>
                   <%-- <telerik:GridBoundColumn HeaderText="Guard Card Number" HeaderStyle-Width="110px" DataField="GuardCardNumber" FilterControlWidth="72px" ShowFilterIcon="false" SortExpression="GuardCardNumber"></telerik:GridBoundColumn>                    --%>
                    <telerik:GridDateTimeColumn  HeaderText="Guard Card Expired" HeaderStyle-Width="110px" DataField="GuardCardExpired" FilterControlWidth="63px" ShowFilterIcon="false"></telerik:GridDateTimeColumn>
                   <%-- <telerik:GridBoundColumn HeaderText="Fire Arm Number" HeaderStyle-Width="90px" DataField="FireArmNumber" FilterControlWidth="72px" ShowFilterIcon="false" SortExpression="FireArmNumber"></telerik:GridBoundColumn>                   
                    <telerik:GridDateTimeColumn  HeaderText="Fire Arm Expired" HeaderStyle-Width="90px" DataField="FireArmExpired" FilterControlWidth="63px" ShowFilterIcon="false"></telerik:GridDateTimeColumn>--%>
                    <telerik:GridTemplateColumn HeaderText="On Call" HeaderStyle-Width="80px" AllowFiltering="false" UniqueName="OnCallButton">
                    <ItemTemplate>
                      <telerik:RadButton ID="btnOnCall" runat="server" Text="On Call" CommandName="OnCall" >
                          <Icon PrimaryIconCssClass="rbAdd" PrimaryIconLeft="4" PrimaryIconTop="4"></Icon>
                      </telerik:RadButton>
                    </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>

***************************************VB CODE*********************
  Protected Sub rgOfficersToCallIn_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgOfficersToCallIn.ItemCommand
        Try
            lblMessage.Text = ""
            divMessage.Visible = False            Dim setDate As Date? = rdtpCallIn.SelectedDate.ToString()
            If setDate Is Nothing Then
                Return
            End If
            Dim cellEmployeeID As TableCell = e.Item.Cells(DirectCast(eOfficersCallInColumns.HREmployeeID, Int32))
            If e.CommandName.ToString() = "OnCall" Then
                Dim dba As New DBAccess
                If dba.InsertCallInOfficer(m_SessionID, Convert.ToInt32(cellEmployeeID.Text), setDate) Then
                    If e.Item.Selected = True Then
                        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
                        Dim btn As RadButton = DirectCast(item("OnCallButton").FindControl("btnOnCall"), RadButton)
                        btn.Enabled = False
                    End If
                    rgCallIn.Rebind()
                    upCallIn.Update()
                    divMessage.Visible = True
                    lblMessage.Text = "Officer is now on call for " + setDate
                Else
                    rgCallIn.DataSource = New String() {}
                    rgCallIn.DataBind()
                End If
            End If


        Catch ex As Exception
        End Try
    End Sub

Princy
Top achievements
Rank 2
 answered on 31 Mar 2014
2 answers
521 views
how to access the parent table column value in child table when we using the hierarchy of telerik Radgrid.

cs source-

protected void cmpreportgrid_OnItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {

         if (e.Item is GridDataItem)
        {
            if (e.Item.OwnerTableView.Name == "CompanyListDetails")
            {
                if (e.Item is GridDataItem)
                {
                    GridDataItem item = e.Item as GridDataItem;
                    Viewing view = item.DataItem as Viewing;
                    if (!view.isgroupcontact)
                    {
                       
                        item["ExpandColumn"].Text = "";
                    }
                    
                }  
            }
       else if (e.Item.OwnerTableView.Name == "GroupContact")
            {
                e.Item.OwnerTableView.ParentItem.Expanded=false;//how to get the parent table column here to set the condition for expandcolumn.
            }       
        }
    }
Konstantin Dikov
Telerik team
 answered on 31 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?