Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
286 views
Hi,
When i enter a value in rad numeric text box in my site page, it display in normal font, and when changes the focus from this control, it's font changes to bold.
In my css class, in order to change the font weight of span to bold, i have declared as below
span
 {
    font-family:Verdana;
    font-size:8pt;    
    font-weight:bold;
 }
when changing the font-weight to normal, the numeric text box's value doesn't changes to bold when focus lost.
( but the font weight can't be changed to normal since it is mandatory for all span in the site.)
how can we fix this issue?


Thanks
jiju
Vasil
Telerik team
 answered on 30 Apr 2012
0 answers
104 views
Hello,

I have created a page with example from http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/loadondemand/defaultcs.aspx. I am using RadGrid in tab pages and couple of page have clickable icons. Clicking these icons calls RadWindow, which refreshes the tab/grid. I have couple of problems

1. Javascript function called is expected in the first tab as opposed to the selected tab. To work around this problem I have added the same Javascript function in all tabs.
2. Closing the RadWindow updates the grid but again it is the same problem, the update function of the first tab is called as opposed to the selected tab. This is causing us major problem as our project is going live next week.

I have following scenario in my application

1. jobauthorisation.aspx -> Main page containing Multipage and Tabstrip. I have logic in the OnLoad function to set the first tab based on how user arrived on this page.This page adds tabs.
 
2. jobauthorisationauthorised.ascx, jobauthorisationawaiting.ascx, jobauthorisationawaitingresponse.ascx and jobauthorisationresponsereceived.ascx tab pages with JavaScript functions to call RadWindow and refresh grid - the same functions are copied in all pages to work around the problem of JS functions being called from the first tab

Steps to reproduce the problem are

1. Load the page with A, B, C and D tabs added in this order
2. Select the tab B, click on one of the images to open RadWindow. If the called function is not defined in tab A then gets scripting error. To workaround I have added the same function to tab A.
3. Click the Send button of RadWindow should call function in tab B. However it calls the function in tab A causing tab A to refresh the data but tab B does not get refreshed. I added alert in the Javascript function of tab A to prove it.

Please go through the code and let me know what I am doing wrong. 
Neetu
Top achievements
Rank 1
 asked on 30 Apr 2012
1 answer
117 views
Dear  Gents
I add select button  and Edit Button in Radgrid , But when I click edit Button I loss selected item ,
I already made SQl datasource fiter by control radgrid.selectedvalue
 I do not want to lose focus when I click edit
do you have solution  for this issue
see this pictures attached
Shinu
Top achievements
Rank 2
 answered on 30 Apr 2012
4 answers
209 views
Hello,

I have 2 textboxes in same row. I want to disable the other textbox, if text changes in one textbox.

How can I do this using Javascript/ Jquery.?

I have multiple grids in the same page.
Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Apr 2012
1 answer
151 views
Hii everyone. 
I want to do if user(doctor username) login then radscheduler only own appointmen allow delete,insert,update(i cant do). There is a combobox where did u select policilinic and doctors view(i do it).Normal user can not delete and update.(i do it) 
 i upload my files picture:::
Codes:::
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


namespace BookingServices
{
    public partial class _Default : System.Web.UI.Page
    {
        
        
        protected void Page_Load(object sender, EventArgs e)
        {
            RadScheduler1.GroupBy = RadComboBox1.SelectedValue;
            
        }


        protected void RadScheduler1_AppointmentCreated(object sender, Telerik.Web.UI.AppointmentCreatedEventArgs e)
        {
            foreach (Telerik.Web.UI.Resource resource in e.Appointment.Resources)
            {
                if (resource.Type == "Doctor")
                {
                    e.Appointment.CssClass=resource.Text.Replace(' ','_');
                
                }
            
            }


        }


           




       


    }
}
Peter
Telerik team
 answered on 30 Apr 2012
2 answers
188 views
I had a RadGrid with EditMode="PopUp". Is it possible to let those controls in the editform to perform postback actions? for example, selectedItemChange for RadCombobox? 
Henry
Top achievements
Rank 1
 answered on 30 Apr 2012
0 answers
79 views
Autocomplete feature when set for a textbox, it maintains the list of user input values which it might be saving in the web cache, to autocomplete for the users. Is there a way to access this list when it saves, as i wanted to save this list permanently in database.
jomy
Top achievements
Rank 1
 asked on 29 Apr 2012
2 answers
98 views
Hi,

I am trying to create RadPanelBar with RadPanelItem that contains 3 anchors inside.
This is my Code:

                <telerik:RadPanelBar ID="RadPanelBar" runat="server" Skin="Gray" style="float:left; margin-left:3px; width:1200px;">
                    <Items >
                        <telerik:RadPanelItem Text="RadPanelItem" runat="server">
                           
                            <Items>
                                <telerik:RadPanelItem Value="test" runat="server">
                           
                                    <ItemTemplate>
                                    
                                        <div>
                                                <a id="btnDelete" disabled="disabled">
                                                   Delete
                                                </a>
                                               
                                                <a id="btnUpdate" disabled="disabled">
                                                    Update                                                
                                                </a>
                                               
                                                <a id="btnAdd">
                                                    Add                                                           
                                                 </a>
                                       </div>
                                   </ItemTemplate>
                           
                                </telerik:RadPanelItem>
                            </Items>
                           
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelBar>


The problem is, that the anchor are not displayed inside the RadPanelItem.
The same happenes for me if I use the <br> tag. It seems like it doesn't work inside the RadPanelItem (although it works in your demos).
Can you please help me and tell me what am I doing wrong?

I used the demo: http://demos.telerik.com/aspnet-ajax/panelbar/examples/applicationscenarios/accessingnestedcontrols/defaultcs.aspx

Thanks a lot!
Covertix
Top achievements
Rank 1
 answered on 29 Apr 2012
1 answer
113 views
Hi, I have an automatic CRUD grid, but the filtering process is not working. Can you help me?

Insert/Delete/Edit all is working ok, but the Filtering is not.

<telerik:RadGrid id="grdReporto"
        ShowStatusBar="true" DataSourceID="sqlReporto"
        runat="server" OnItemCommand="grdReporto_ItemCommand" OnItemCreated="grdReporto_ItemCreated"  OnItemInserted="grdReporto_ItemInserted"
        OnItemDeleted="grdReporto_ItemDeleted" OnDataBound="grdReporto_DataBound" OnItemUpdated="grdReporto_ItemUpdated"
        AllowPaging="true" AllowFilteringByColumn="true"
        AllowSorting="true" AllowNaturalSort="false"
        AutoGenerateColumns="false"
        AllowMultiRowSelection="false">
    <GroupingSettings CaseSensitive="false" />
    <MasterTableView PageSize="15" NoDetailRecordsText="Sin Informacion"  CommandItemDisplay="Top" NoMasterRecordsText="Sin Informacion" AutoGenerateColumns="false"
        DataSourceID="sqlReporto" DataKeyNames="rowno" AllowFilteringByColumn="true">
        <CommandItemTemplate>
            <table style="width:100%">
                <tr>
                    <td width="50%" align="left">
                        <asp:LinkButton ID="InitInsertButton"  Text="Nuevo Usuario" CommandName="InitInsert" runat="server">
                        <img src="../../img/21.png" alt="" /> Nuevo Usuario
                        </asp:LinkButton>
                    </td>
                    <td width="50%" align="right">
                        <asp:LinkButton ID="LinkButton9" Text="Refresca" CommandName="Rebind" runat="server">
                        <img src="../../img/21.png" alt="" /> Refresca
                        </asp:LinkButton>
                    </td>
                </tr>
            </table>
        </CommandItemTemplate>
        <Columns>
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Reporto" ImageUrl="../../img/accept.png" UniqueName="Reporto" />
            <telerik:GridBoundColumn
                UniqueName="rowno" ReadOnly="true"
                DataField="rowno" Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Matricula" SortExpression="matricula" UniqueName="matricula"  EditFormColumnIndex="0">
                <ItemTemplate>
                    <asp:Literal runat="server" ID="litMatricula" Text='<%# Eval("matricula") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <span>
                        <telerik:RadTextBox runat="server" ID="txtMatricula" Width="150px" Text='<%# Bind("matricula") %>' />
                        <span style="color: Red">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtMatricula" ErrorMessage="*" runat="server" />
                        </span>
                    </span>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Nombre" SortExpression="nombre" UniqueName="nombre"  EditFormColumnIndex="0">
                <ItemTemplate>
                    <asp:Literal runat="server" ID="litNombre" Text='<%# Eval("nombre") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <span>
                        <telerik:RadTextBox runat="server" ID="txtNombre" Width="200px" Text='<%# Bind("nombre") %>' />
                        <span style="color: Red">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtNombre" ErrorMessage="*" runat="server" />
                        </span>
                    </span>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Correo (sin @)" SortExpression="email" UniqueName="email"  EditFormColumnIndex="1">
                <ItemTemplate>
                    <asp:Literal runat="server" ID="litEmail" Text='<%# Eval("email") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <span>
                        <telerik:RadTextBox runat="server" ID="txtEmail" Width="150px" Text='<%# Bind("email") %>' />
                        <span style="color: Red">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="txtEmail" ErrorMessage="*" runat="server" />
                        </span>
                    </span>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Ext" SortExpression="extension" UniqueName="extension"  EditFormColumnIndex="1">
                <ItemTemplate>
                    <asp:Literal runat="server" ID="litExt" Text='<%# Eval("extension") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <span>
                        <telerik:RadTextBox runat="server" ID="txtExt" Width="100px" Text='<%# Bind("extension") %>' />
                        <span style="color: Red">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="txtExt" ErrorMessage="*" runat="server" />
                        </span>
                    </span>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn
                DataField="lastupdate" ReadOnly="true"
                HeaderText="Actualizacion" Visible="false"
                SortExpression="lastupdate"
                UniqueName="lastupdate">
            </telerik:GridBoundColumn>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" />
            <telerik:GridButtonColumn ConfirmText="Eliminar este Usuario?" ConfirmDialogType="RadWindow"
                ConfirmTitle="Eliminar" ButtonType="ImageButton" CommandName="Delete" Text="Eliminar"
                UniqueName="DeleteColumn">
            </telerik:GridButtonColumn>
        </Columns>
        <EditFormSettings ColumnNumber="2" CaptionDataField="nombre" CaptionFormatString="Editar Usuario {0}" InsertCaption="Nuevo Usuario">
            <FormTableItemStyle Wrap="False"></FormTableItemStyle>
            <FormCaptionStyle CssClass="tb1"></FormCaptionStyle>
            <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" />
            <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
            <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
            <EditColumn ButtonType="ImageButton" InsertText="Inserta" UpdateText="Actualiza"
                UniqueName="EditCommandColumn1" CancelText="Cancelar">
            </EditColumn>
            <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
        </EditFormSettings>
    </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true" />
    <PagerStyle Mode="NumericPages"></PagerStyle>
</telerik:RadGrid>
iomega 55
Top achievements
Rank 1
 answered on 29 Apr 2012
10 answers
278 views
Hi there,

We are in the process of upgrading the telerik controls in our project from Telerik Controls ASP.NET AJAX Q1 2008 to Telerik Controls ASP.Net AJAX Q2 2009 (Yes its Q1 2008 to Q2 2009).

We discovered a weird behaviour on the RadComboBox that was working fine in the Q1 2008 version where the selected item is not updated at all.

The webpage in question generates the controls dynamically such that every time the submit button is click, it submits the current page and parses the next page controls.
The entire process in brief can be describe in the following:
  1. An xml document (comprising of xmlnodes where each node is a possible page to be displayed) is loaded from the database and stored in session. See eg. of a single node with 1 RadComboBox.

    <item name="PostalAddressState" displaySource="" dataSource="" label="State" control="DropDownList" direction="Horizontal" required="True" entityColumnName="Address.State" entityType="PostalAddress" width="80px"
                                <field label="Select" value="0" selected="False" fieldType="String" goTo=""/> 
                                <field label="ACT" value="ACT" selected="False" fieldType="String" goTo=""/> 
                                <field label="NSW" value="NSW" selected="False" fieldType="String" goTo=""/> 
                                <field label="NT" value="NT" selected="False" fieldType="String" goTo=""/> 
                                <field label="QLD" value="QLD" selected="False" fieldType="String" goTo=""/> 
                                <field label="SA" value="SA" selected="False" fieldType="String" goTo=""/> 
                                <field label="TAS" value="TAS" selected="False" fieldType="String" goTo=""/> 
                                <field label="VIC" value="VIC" selected="False" fieldType="String" goTo=""/> 
                                <field label="WA" value="WA" selected="True" fieldType="String" goTo=""/> 
                            </item> 

2. The web application selects the appriopriate node to display based on a index and translates the xml into a string of text using xslt.
<telerik:RadComboBox id="rcb{@id}" runat="server" Skin="WebBlue" AllowCustomText="false" MarkFirstMatch="true" 
               HighlightTemplatedItems="true" width="{@width}" EnableItemCaching="false"
                    <items> 
                      <xsl:for-each select="field"
                        <xsl:choose> 
                          <xsl:when test="@selected='True'"
                            <telerik:RadComboBoxItem Value="{@value}" Selected="{@selected}" text="{@label}" /> 
                          </xsl:when> 
                          <xsl:otherwise> 
                            <telerik:RadComboBoxItem Value="{@value}" text="{@label}" /> 
                          </xsl:otherwise> 
                        </xsl:choose> 
                      </xsl:for-each> 
                    </items> 
                  </telerik:RadComboBox> 

3. The resulting string would end up looking exactly like a typical aspx code. e.g.
<telerik:RadComboBox id="rcbID24" runat="server" Skin="WebBlue" AllowCustomText="false" MarkFirstMatch="true" HighlightTemplatedItems="true" width="100px" EnableItemCaching="false"
        <items> 
          <telerik:RadComboBoxItem Value="0" text="Select" /> 
          <telerik:RadComboBoxItem Value="Br" text="Br" /> 
          <telerik:RadComboBoxItem Value="Captain" Selected="True" text="Captain" /> 
          <telerik:RadComboBoxItem Value="Dr" text="Dr" /> 
          <telerik:RadComboBoxItem Value="Father" text="Father" /> 
          <telerik:RadComboBoxItem Value="Miss" text="Miss" /> 
          <telerik:RadComboBoxItem Value="Mr" text="Mr" /> 
          <telerik:RadComboBoxItem Value="Mrs" text="Mrs" /> 
          <telerik:RadComboBoxItem Value="Ms" text="Ms" /> 
          <telerik:RadComboBoxItem Value="Professor" text="Professor" /> 
          <telerik:RadComboBoxItem Value="Rev" text="Rev" /> 
          <telerik:RadComboBoxItem Value="Sir" text="Sir" /> 
          <telerik:RadComboBoxItem Value="Sr" text="Sr" /> 
          <telerik:RadComboBoxItem Value="The Hon." text="The Hon." /> 
        </items> 
      </telerik:RadComboBox> 

4. This string is then added to the webpage through Page.ParseControl(string). where all the controls are added to a placeholder.

5. User keys in the values and submits the page where the values would then be written back into the xmlDocument, processed and the next xmlnode would be selected to be displayed. this would continue until there is nothing left to be displayed and the xmldocument will then be saved.

I hope you guys arent lost in my explaination of how things work till now.. but in summary, its basically
xmldocument --> xslt translation --> string of aspx code --> binded to page using page.parsecontrol() -->get next node in xmldocument when user clicks submit. --> repeat all over again.


Ok. The weird behaviour where the selected item is not displayed happens when a single node that has a previously selected value or default selected value is being displayed. (see e.g. 3 above where the item "Captain" is selected.) If the user selects a different item in the list, like "Mr" on the same example, this item would now be selected. and would be saved back in the document. However, the selected item is not reflected back onto the radcomboBox even though a new item is selected. the radcombobox instead retains the "Captain" as the selected item. see flow below. of the debugging we went through.

xmldocument --> xslt translation --> string of aspx code --> binded to page using page.parsecontrol() --> radcombobox default value is "Captain"-->user selects "Mr" in combobox and clicks submit. --> "Mr" is written back in the xmldocument. --> system notices a change in the node, saves the change and retrieves updated node (same node) where "Mr" is now the selected item --> xslt translation--> string of aspx code (Where "Mr" is selected item) --> binded to page using page.parsecontrol(). ["Captain" is now selected]-->
radcomboBox selected item is "captain" when displayed to the user.

The moment the string is binded using page.parseControl(), the selected item was reverted back to the original item. but if we copied the snipper of page.Parsecontrol, from line 17 to line 21 and pasted it after line 21, the correct selected item would be persisted on the combobox.
// transformedContent is the output from xslt. 
                string transformedContent = obj.GetHtml(Context); 
                 
                Control ctrl = new Control(); 
                ctrl = Page.ParseControl(transformedContent); 
 
                // Debug statement to show that the combobox in question retains the correct selected value. 
                foreach (Control ccc in ctrl.Controls) 
                { 
                    if (ccc is RadComboBox && ccc.ID == "rcbID24"
                    { 
                        string vvv = ((RadComboBox)ccc).SelectedValue;                         
                    } 
                } 
                 
                // Clear and dispose of any controls from any previously parsed node. 
                pclXmlOutput.Controls.Clear();                 
                pclXmlOutput.Dispose(); 
 
                // Add the NEW control. 
                pclXmlOutput.Controls.Add(ctrl); 
                 
 
                // Check to see if the comboBox has changed its value. 
                foreach (Control ccc in ctrl.Controls) 
                { 
                    if (ccc is RadComboBox && ccc.ID == "rcbID24"
                    { 
                        string vvv = ((RadComboBox)ccc).SelectedValue; 
                    } 
                } 

One small note. The code here is being used in a RadWindow.

Can anyone help?













Shawn Krivjansky
Top achievements
Rank 1
 answered on 28 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?