Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
155 views
Hi,

I am using the following code to allow the user to change the width of the grid.  The code works great the problem is, if the user has chosen to hide any columns (display=false) the columns are re-displayed when the width is changed.

Is there any way I can keep the columns hidden?

function SetGridWidth(GridClientId, WidthClientId) {

var radGrid = $find(GridClientId);

var grdWidth = document.getElementById(WidthClientId);

if (grdWidth.value > 2000) {

grdWidth.value = 2000;

} if (radGrid) {

radGrid.get_element().style.width = grdWidth.value + "px";

radGrid.repaint();

}

}

Thank You
Tracy

Tracy
Top achievements
Rank 1
 answered on 23 Aug 2013
1 answer
156 views
I have a radSplitter dividing my page into two areas. Sometimes when I click on the splitter button to collapse the left pane it appears that the click event is allowed to bubble to the content in the right pane. The right pane contains a content placeholder which contains a iframed page. That page has a table that responds to click events, and it is responding to the bubbled click event, causing unexpected results.

Is there a way I can prevent the click event on the splitter collapse button from bubbling?
Jeanne
Top achievements
Rank 1
 answered on 23 Aug 2013
2 answers
210 views
<Windows>
<telerik:RadWindow ID="rw_confirm_client" Modal="true" Behaviors="None" VisibleStatusbar="false"
             runat="server" CssClass="RwConfirmacion" VisibleTitlebar="false" Height="10"
             Width="10">
<ContentTemplate>
<div class="BoxConfirmationContent">
<img src="../App_Themes/Opa.Tema/Imagenes/Pregunta.png" id="Img3" class="ImgNotifcacion"
   runat="server" />
<table class="TbMensajeConfirmacion">
<tr>
<td class="botoncerrarmensajero">
<asp:LinkButton href="#" runat="server" ID="LinkButton2" CssClass="linkcerrar"
           OnClientClick='closeCustomConfirmClient();'>X</asp:LinkButton>
</td>
</tr>
<tr>
<td class="textomensaje">
<asp:Label ID="Label1" runat="server">Aca va el texto del mensaje</asp:Label></td>
</tr>
<tr>
<td class="botoncerrarmensajero">
<telerik:RadButton runat="server" ID="RadButtonConfirmClient" CssClass="BtConfirmacion"
             CausesValidation="false" Text="OK">
<Image ImageUrl="../App_Themes/Opa.Tema/Imagenes/NegroTotal.png" IsBackgroundImage="true" />
</telerik:RadButton>
<telerik:RadButton runat="server" ID="RadButtonCancelClient" CssClass="BtConfirmacion"
             CausesValidation="false" Text="Cancelar"
                       OnClientClick="closeCustomConfirmClient();">
<Image ImageUrl="../App_Themes/Opa.Tema/Imagenes/NegroTotal.png" IsBackgroundImage="true" />
</telerik:RadButton>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</telerik:RadWindow>
</Windows>

hello I have this window in a window manager, this window is displayed from a radbutton in another location, using javascript and after asking achievement button trigger the event, the problem is that the databind have stopped working, can anyone help ?

var fireConfirm = true;
        function OnClientClicked(button, args) {
            var callBackFunction = Function.createDelegate(button, function (argument) {
                if (fireConfirm && argument) {
                    this.set_autoPostBack(true);
                    fireConfirm = false;
                    this.click();
                }
            });
            if (fireConfirm) {
                button.set_autoPostBack(false);
                var text = "¿Has revisado ya?, si es asi ¿Estas seguro de llevar a cabo esta acción?";
                var oWnd = radopen(null, 'rw_confirm_client');
                var X = document.body.clientWidth - 400;
                var Y = 150;
                oWnd.MoveTo(X, Y);
 
 
                var button = document.getElementById("<%=RadButtonConfirmClient.ClientID %>").onclick = callBackFunction;
                var text = document.getElementById("<%=Label1.ClientID %>").innerText = text;
 
 
            }
        }

OPA
Top achievements
Rank 1
 answered on 23 Aug 2013
2 answers
1.0K+ views
Hello,
This should be easy but I am struggling to find a solution. 

I have a radgrid with a custom edit form template I want to show one of the fields based on the opposite of a boolean field.
Something like this:

<tr id="trCloseDate" runat="server" visible='<%# Bind(!"j") %>'>

I dont think this would ultimately work though as I would need the user to be able to toggle at will. Something in the code behind would work better I think.

I have tried to do this in the code behind, using the onCheckChanged event but am running into issues as I cant find a way to get the tr control as it is not rendered yet, I believe, since it is later in the table.

Another weird side issue is that the checkbox is not showing the correct check if I use the changed event.

Thank you for your time.
Tops Software
Top achievements
Rank 2
 answered on 23 Aug 2013
6 answers
180 views
First, I am using version 2013.2.717.40.
I set-up a very simple RadListBox transfer scenario:
     
<telerik:RadListBox ID="StatusListBoxSource" runat="server" 
    AllowTransfer="True" DataSourceID="StatusDataSource" DataTextField="Description" 
    DataValueField="StatusId" TransferToID="StatusListBoxTarget" 
    Height="240px" Width="150px">
</telerik:RadListBox>
<telerik:RadListBox 
ID="StatusListBoxTarget" runat="server" Height="240px" Width="150px"></telerik:RadListBox>

There is a RadButton that is used to indicate that the user is ready to process the infiormation in the second box:
<telerik:RadButton ID="DiagnoticStatusButton" runat="server" Text="Apply" AutoPostBack="True" 
    OnClick="DiagnoticStatusButton_Click">
</telerik:RadButton>

There is a label used to display the results of the processing:
<asp:Label ID="DiagnosticStatusLabel" runat="server" Text=""></asp:Label>
And an AjaxSetting to connect the button and the label:
   
<telerik:AjaxSetting AjaxControlID="DiagnoticStatusButton">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="DiagnosticStatusLabel" />
    </UpdatedControls>
</telerik:AjaxSetting>
The first time I transfer an item from the source box to the target box and click the button, everything works just fine. If I transfer another, without removing the first, and click the button, also works fine. However, when I transfer any more and click the button, I get an error that is caught in the Global.aspx.cs file with the Server class being something that does not contain a GetLastError method. This is before it gets into the button event handler in the code behind.

Another issue, around which I am able to work is that, after transfering one item, a second click of the button reveals that there are 2 entries in the targetbox.items collection.

Here is the code for the button click event:
protected void DiagnoticStatusButton_Click ( object sender, EventArgs e )
    {
      ED.GenericResponse GR = new ED.GenericResponse ();
      List<String> IssueList = new List<String> ();
      List<Byte> StatusIdList = new List<Byte> ();
      var q = ( from si in this.StatusListBoxTarget.Items
                select si.Value ).Distinct ();
      foreach ( String item in q )
      {
        StatusIdList.Add ( Byte.Parse ( item ) );
      }
      try
      {
        using ( EDG.GroupsDataContext ctx = new EDG.GroupsDataContext () )
        {
          Int32 EffectedRows = ctx.AddDevicesByCriteria ( this.GroupId, DateTime.Now.AddDays ( -1 ).Date, StatusIdList, IssueList );
          this.DiagnosticStatusLabel.Text = String.Format ( "{0} devices added", EffectedRows );
        }
      }
      catch ( Exception Ex )
      {
        Logger.ErrorException ( Ex.Message, Ex );
        this.DiagnosticStatusLabel.Text = "There was an error adding from diagnostic status";
      }
    }

Unfortunately, there may be no way for you to reproduce this, but any suggestions would be accepted and appreciated.

Thanks,

Ed
Ed
Top achievements
Rank 1
 answered on 23 Aug 2013
9 answers
1.4K+ views
Hi guys, How do I remove the group header text. It show example Title : Book A. I only want to display Book A as the text only. Please help.Thanks
<GroupByExpressions>
                <telerik:GridGroupByExpression>
                    <SelectFields>
                       <telerik:GridGroupByField FieldName="Title"  FormatString = "" HeaderText=""/>
                    </SelectFields>
                    <GroupByFields>
                        <telerik:GridGroupByField FieldName="Title" SortOrder="Ascending">
                        </telerik:GridGroupByField>
                    </GroupByFields>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>
Konstantin Dikov
Telerik team
 answered on 23 Aug 2013
1 answer
128 views
I have appoints that span a few days but when I added the following url that helped me expand the appointments vertically it stopped the expansion horizontally and the appointments are overlapping

Vertical expansion
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/auto-expand-the-height-of-the-appointment.aspx

This is my css

.RadScheduler .rsTimelineView .rsWrap,
        .RadScheduler .rsTimelineView .rsApt,
        .RadScheduler .rsTimelineView .rsAptOut,
        .RadScheduler .rsTimelineView .rsAptIn,
        .RadScheduler .rsTimelineView .rsAptMid,
        .RadScheduler .rsTimelineView .rsAptContent
        {                  
            position: static !important;           
            height: auto !important;
        }                     
         
        .RadScheduler .rsTimelineView .rsWrap
        {          
            float:left;
            overflow: inherit;           
            font-size: 0;
            line-height: 0;
        }

I have attached a picture to show what is occurring. 

thanks,

Chad
Kate
Telerik team
 answered on 23 Aug 2013
9 answers
525 views
Hello, we just upgraded to the latest version of Telerik Web UI controls and we are experiencing text cut off issues with RadComboBox.

Currently we are using the 2013.2.717.35 Version of the Telerik.Web.UI dll.

The problem is when the user selects the value and the drop down closes; the text displayed in the combobox is truncated.
Following are the properties for the RadComboBox:
 <telerik:RadComboBox    ID="SpecialRadComboBox" 
                                        runat="server" 
                                        Skin="Office2007"
                                        AllowCustomText="False" 
                                        MarkFirstMatch="True" 
                                        ShowWhileLoading="True" 
                                        AppendDataBoundItems="True"
                                        Width="450px"
                                        DropDownWidth="450px"
                                        TabIndex="7"
                                        SelectAllTextEvent="None"
                                        onclientselectedindexchanged="ProcessInstructions">

CSS:

 .rcbInputCell INPUT.rcbInput
{
   cursordefault;     
}
div.RadComboBoxDropDown li
{
    white-space:nowrap;
    width:450px !important;
}

We tried this in firefox and it shows scroll bars and ignores the width set to the combobox. It resizes the RadComboBox
to the length of the rcbInput.

IE8/10 - displays the combobox but truncates the text.

Please advice.
Thanks



Kate
Telerik team
 answered on 23 Aug 2013
3 answers
161 views
Have an existing page that was using Classic ASP (OldLayout.jpg) and I am trying to do a similar approach using a RadGrid with Grouping (NewLayout.jpg).  As I do realize that there will be differences and I would like to have things look similar. 

Is there anyway of adding a "Master Header" to the grid? "Policyholder Board Reporting", currently it is just a Header for a field.

There will 2 main categories that it can be broken down by ASI or ESI.  Is there anyway of only displaying them once, when it changes?  So it would read "ASI" then records and "ESI" then records.  Currently it reads "ASI" then Date

How can I get my Dates formatted to in Long Date Time format.  <Day of week> Month Day, Year

Below is the code I am trying to implement and hopefully it will help answer my questions.  Also I would like to delete but need to get the ID which is apart of the grid and was trying to get that via the RadGrid_ItemDeleted. 
<telerik:RadGrid ID="_grdExisting" runat="server"
AutoGenerateColumns="False" CellSpacing="0" 
GridLines="None">
 
<HeaderStyle ForeColor="White" BackColor="Black" HorizontalAlign="Center" />
<MultiHeaderItemStyle BackColor="Green" ForeColor="Yellow" />
<MasterTableView DataKeyNames="BoardReportID">
 
<GroupByExpressions>
    <telerik:GridGroupByExpression>
        <SelectFields>
            <telerik:GridGroupByField FieldName="ASI_ESI" FormatString="{0}"></telerik:GridGroupByField>
        </SelectFields>
        <SelectFields>
            <telerik:GridGroupByField FieldName="BoardReportDate"  FormatString="{0:D}"></telerik:GridGroupByField>
        </SelectFields>
        <GroupByFields>
            <telerik:GridGroupByField FieldName="ASI_ESI" SortOrder="Ascending"></telerik:GridGroupByField>
        </GroupByFields>
        <GroupByFields>
            <telerik:GridGroupByField FieldName="BoardReportDate" SortOrder="Descending" FormatString="{0:D}"></telerik:GridGroupByField>
        </GroupByFields>
    </telerik:GridGroupByExpression>
</GroupByExpressions>  
<GroupHeaderTemplate>
        <asp:Label runat="server" ID="Label2" Text='<%# DirectCast(Container, GridGroupHeaderItem).AggregatesValues("ASI_ESI") & "SI" %>'
            Visible='<%# ((DirectCast(Container, GridGroupHeaderItem).AggregatesValues("ASI_ESI")) IsNot Nothing)%>'>
        </asp:Label>
        <asp:Label runat="server" ID="Label1" Text='<%# DirectCast(Container, GridGroupHeaderItem).AggregatesValues("BoardReportDate") %>'
            Visible='<%# ((DirectCast(Container, GridGroupHeaderItem).AggregatesValues("BoardReportDate")) IsNot Nothing)%>'>
        </asp:Label>
</GroupHeaderTemplate>
<Columns>
    <telerik:GridHyperLinkColumn DataTextField="BoardReportDesc"
            ItemStyle-HorizontalAlign="Left" UniqueName="NonComplianceCount"
            HeaderStyle-Font-Bold="false" HeaderStyle-Wrap="false"
            DataNavigateUrlFields="ReportLocation"
            DataNavigateUrlFormatString="Reports/{0}"
            HeaderStyle-Width="150px" HeaderText="Policyholder Board Reporting" >
            <ItemStyle Wrap="True" Font-Underline="true"/>
    </telerik:GridHyperLinkColumn>
    <telerik:GridButtonColumn ConfirmText="Delete this product?" ButtonType="ImageButton"
            CommandName="Delete" Text="Delete" UniqueName="DeleteColumn1">
            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
    </telerik:GridButtonColumn>
</Columns>
</MasterTableView>
 
</telerik:RadGrid>
Angel Petrov
Telerik team
 answered on 23 Aug 2013
1 answer
188 views
I have noticed that every time that a post-back is triggered with RadControls, I receive an 'Are  you sure you want to leave this page?' prompt in Firefox.  So far I have tested it with the RadListBox and the RadTabStrip/RadMultiPage controls. 

Is there a way to stop this prompt from displaying every time I click a control?

Shinu
Top achievements
Rank 2
 answered on 23 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?