Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
298 views
Hi,

Is there anyway to have a radgrid to keep the same width even if I resize its columns. For example when resizing a specific column automatically resize the other columns to maintain the table width?

Thanks in advance
Pavlina
Telerik team
 answered on 31 May 2012
1 answer
64 views


I am very new to Telerick and having issue in displaying a user control. The element that is being cut off 'Legend' of fieldset. The page gets rendered fine in Firefox or Chrome. But the problem is there with IE.Here with i am attaching four docs. (part of .aspx page, images showing proper , in-correct rendering and part of user control .aspx file. Any help is greatly appreciated
Dobromir
Telerik team
 answered on 31 May 2012
2 answers
108 views
I am trying to get the value of one of RadNumericTextBoxes in a RadListView via javascript and am having issues.  I have had to hardcode the value in the javascript and am looking for a better solution..  Here is the relevant code:
This is the RadListView.  There are repeating text boxes, then there is a total text box.  I have a javascript function that gets the values of the updated text box, then updates the total.
        <telerik:RadListView ID="rlvApproval" runat="server">
            <LayoutTemplate>
                <table>
                    <tr>
                        <td style="width: 250px;">
                        </td>
                        <td style="width: 200px; font-weight: bold;">
                        </td>
                    </tr>
                </table>
                <asp:PlaceHolder ID="itemplaceholder" runat="server" />
                <table>
                                        <tr>
                        <td style="width: 250px;">
                            <asp:Label ID="lblName" runat="server" Text="Total" Font-Bold="true" />
                        </td>
                        <td style="width: 200px; font-weight: bold;">
                            <telerik:RadNumericTextBox ID="txtTotalValue" runat="server" ReadOnly="true" DataType="System.Decimal"
                                Skin="Web20">
                                <NumberFormat DecimalDigits="0" />
                            </telerik:RadNumericTextBox>
                        </td>
                    </tr>
                      
                </table>
            </LayoutTemplate>
            <ItemTemplate>
                <table>
                    <tr>
                        <td style="width: 250px;">
                            <asp:Label ID="lblName" runat="server" Text='<%# Eval("name") %>' />
                        </td>
                        <td style="width: 250px;">
<%--                            <telerik:RadNumericTextBox ID="txtValue" runat="server" DataType="System.Decimal"
                                Skin="Web20" DbValue='<%# DataBinder.Eval(Container.DataItem, "value") %>' MaxValue="100"
                                MinValue="0" AutoPostBack="false">
                                <NumberFormat DecimalDigits="0" />
                            </telerik:RadNumericTextBox>--%>
                                                        <telerik:RadNumericTextBox ID="txtValue" runat="server" DataType="System.Decimal"
                                Skin="Web20" DbValue='<%# DataBinder.Eval(Container.DataItem, "value") %>' MaxValue="100"
                                MinValue="0" AutoPostBack="false" >
                                <NumberFormat DecimalDigits="0" />
                                <ClientEvents OnValueChanged="ValidateWeighting" />
                            </telerik:RadNumericTextBox>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
            <EmptyDataTemplate>
                <div class="message">
                    <asp:Label ID="lblEmptyMessage" runat="server" SkinID="messageBig" Text="Error loading approval information..." />
                </div>
            </EmptyDataTemplate>
        </telerik:RadListView>
The javascript function is:
function ValidateWeighting(sender, eventArgs) {
    var object = document.getElementById('ctl00_ContentPlaceHolder1_Weighting1_rlvApproval_txtTotalValue');
    //var object = $find(sender.get_id().replace("txtValue", "txtTotalValue"));
    var object2 = document.getElementById('<%= rlvApproval.ClientID %>');
    var current = eval(object.value);
    var old = eventArgs.get_oldValue();
    var newval = eventArgs.get_newValue();
    var tmp = current + (newval - old);
    if (tmp == 100) {
        document.getElementById('<%= btnSave.ClientID %>').disabled = false;
    }
    else {
        document.getElementById('<%= btnSave.ClientID %>').disabled = true;
    }
    object.value = tmp;
}

How do I get the value of txtTotalValue.  I have tried the solution I have seen elsewhere, but am getting errors.  Any idea?
Sam Bronchetti
Top achievements
Rank 1
 answered on 31 May 2012
29 answers
1.0K+ views
0 answers
86 views
Hi,

I have the following problem:

I developed a holiday module for a selfdeveloped Intranet, where you can display holidays of different countries either in a RadCalendar or in a RadGrid.
You can change between the displaymodes with a RadioButtonList with the Items Calendar and List.
The Calendar is surrounded by a div-tag called divCalendar, the List by a div-tag called divList.
I use Skin-Files called Calendar.skin with the SkinID = "DefaultRadCalendar" and GridView.skin with the SkinID = "DefaultRad" with for the controls and I bind them with the controls via the SkinID-property. Everything gets displayed correctly. To change between the displaymodes without a PostBack, I use the RadAjaxManagerProxy. When I change from Calendar to List, everything is allright - the RadGrid gets displayed correctly. When I change back to Calendarmode, the RadCalendar gets displayed incorrectly. It is a mix of an integrated Skin (f.e. Sunset - I use some integrated Skins for other Controls) and my own Skin. When I do a PostBack, everything gets displayed correctly, it's only in the combination with Ajax. It doesn't matter, if I disable embedded Skins, Basestylesheets or AjaxSkinRendering in my RadCalendar or not, appearance is the same. Here is some Code:

AjaxManager
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
   <AjaxSettings>
      <telerik:AjaxSetting AjaxControlID="CalendarList_RadiobuttonList">
         <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="chkCalendar" />
            <telerik:AjaxUpdatedControl ControlID="chkList" />
            <telerik:AjaxUpdatedControl ControlID="divCalendar" />
            <telerik:AjaxUpdatedControl ControlID="divList" />
            <telerik:AjaxUpdatedControl ControlID="CalendarList_RadiobuttonList" />
         </UpdatedControls>
      </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="RadComboBox1">
         <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="divCalendar" />
            <telerik:AjaxUpdatedControl ControlID="divList" />
         </UpdatedControls>
      </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="divCalendar">
         <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="divCalendar" />
            <telerik:AjaxUpdatedControl ControlID="RadCalendar1"/>
         </UpdatedControls>
      </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="divList">
         <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="divList" />
            <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
         </UpdatedControls>
      </telerik:AjaxSetting>
   </AjaxSettings>
</telerik:RadAjaxManagerProxy>


<div ID="divCalendar" runat="server" class="calendar">
              <telerik:RadCalendar ID="RadCalendar1" SkinID="DefaultRadCalendar"
                AutoPostBack="true" runat="server" CultureInfo="de-AT"
                 Width="100%" EnableMultiSelect="False" FocusedDate="2000-01-01"
                 OnDayRender="RadCalendar1_DayRender"
                 OnSelectionChanged="RadCalendar1_SelectionChanged"
                 RangeMaxDate="2099-12-31" RangeMinDate="2000-01-01"
                 SelectedDate="" ViewSelectorText="x"
                 OnDefaultViewChanged="RadCalendar1_DefaultViewChanged">
                <CalendarDayTemplates></CalendarDayTemplates>
              </telerik:RadCalendar>
</div>

It's not possible to send you the module, because it's part of the Intranet and needs other components to run.

Thanks in advance

Martin Holoubek
Martin
Top achievements
Rank 1
 asked on 31 May 2012
1 answer
412 views
i have a BooundColumn in my telerik RadGrid like below :  

<telerik:GridBoundColumn DataField="Status" FilterControlAltText="Filter Status column"
    HeaderText="Status" SortExpression="Status" UniqueName="Status"
    FilterImageToolTip="Filter">
    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</telerik:GridBoundColumn>

Status Column in my sql server 2008 database can accept null values and RadGrid shows them with an empty string.
so i replaced those Empty Strings with the codes below ?  

protected void grdSMS_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = (GridDataItem)e.Item;
        if (item["Status"].Text == " ")
        {
            item["Status"].ForeColor = Color.Red;
            item["Status"].Text = "Empty";
        }
    }
}

now my problem is i can not filter Empty Columns.  
how can i fix this issue? 

Note:
In the codes upper if (item["Status"].Text == " ") Correction Isif (item["Status"].Text == "&nbsp;")

thanks in advance
Princy
Top achievements
Rank 2
 answered on 31 May 2012
4 answers
82 views

I have a RadEditor in a tooltip which is opened from a RadWindow. When the RadEditor is Enabled, I have added some event handlers to restrict the number of characters entered in the RadEditor (LimitCharacter code from http://www.telerik.com/community/forums/aspnet-ajax/chart/charector-limit-in-rad-editor.aspx). If the browser is refreshed while the editor is in Enabled mode, I get the error:

“Unable to get value of the property 'removeChild': object is null or undefined” .
This seems to happen after
$telerik.removeExternalHandler is called (what I saw in the debug).
I’m not sure what I need to do to handle this, but I have not been able to find a solution. I use the exact same code but without the RadWindow, and it works.
Please let me know if you have any ideas as to what the problem might be.

RadEditor definition:
<telerik:RadEditor runat="server" ID="RadEditor1" OnClientLoad="LimitCharacters" OnClientPasteHtml="OnClientPasteHtml" MaxTextLength="100" EditModes="All"

 

ToolsFile="~/EditorToolBar/Tools.xml" Width="600px" Height="100px" OnInit="RadEditor1_Init" ForeColor="Black" Font-Bold="true" Font-Size="Small" Content='<%# (Eval("Notes") == DBNull.Value || Eval("Notes") == "" || Eval("Notes").ToString() == "null") ? "" : Eval("Notes") %>'>

    <CssFiles>

        <telerik:EditorCssFile Value="~/Styles/RadEditorStyleOverrides.css" />

     </CssFiles>

</telerik:RadEditor>


RadWindow definition (in a different file):
<telerik:RadWindow ID="RadWindow_ConsRecDocs" runat="server" Behaviors="Move,Resize,Close"

NavigateUrl="ConsRecDocs.aspx" Skin="Windows7" Width="900" Height="700" AutoSize="false">

</telerik:RadWindow>

 

Rumen
Telerik team
 answered on 31 May 2012
1 answer
67 views
Hi,

I'm showing all employers in a webpage by orgchart. This works fine. But now I have to show it on telerik report page. How can i do that? 

If I cant do that, let me know how can I show all employers hierarchie on telerik report page?

Thanks..
Peter Filipov
Telerik team
 answered on 31 May 2012
1 answer
122 views
What should i do to automatically close the rad window after 10 seconds?
Princy
Top achievements
Rank 2
 answered on 31 May 2012
7 answers
199 views
The scenario using version 2010_1_309:
I have a left pane with various controls that are used to filter the result of the main pane.
The main pane has a XmlHttpPanel with a ListView inside.

When I have chosen the values in my filter pane and click a "filter" button, it calls this javascript:
function search(sender, args) { 
            var panel = $find("<%=RadXmlHttpPanelProperties.ClientID %>"); 
            panel.set_value(''); 
            return false
        } 
(By the way, I can't call "set_value()" without a parameter - that cause a javascript error in Telerik javascript files
this.get_value() is undefined 
[Break on this error] },_getCallbackArgument:function(){var b=this.get_value().replace(/"/g,'\\"');  
)
That initiates the xmlHttpPanel_ServiceRequest as it should.
But I can't read the values of my page controls from within that service request, shouldn't I be able to do that?
If the page has "Viewstate=false" then the selected value of a DropdownBox is empty, if the page viewstate is one, then the selected value is always the default value.

Thanks
Claus
Slav
Telerik team
 answered on 31 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?