Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
85 views
I have an employee profile that contains sensitive fields such as passwords and identification numbers. By default, the fields are masked so the values are hidden, but noticeably present. In order to see these fields' data, the user clicks a RadButton configured as a check box to change it's checked state to true (show passwords).

I wired up a function to launch a function:
function openPasswordWin() {
     var oWnd = radopen("frmConfirmShowPassword.aspx", "RadWindow1");
}

When that form closes, I get the entered user name and password and authenticate their access. All fine and dandy, works well.

The problem is that after the user does this, I am having trouble on subsequent check changes. The user does not need to be reauthenticated during the session, but gettting the handlers to unhook or hook up hasn't been working. This is what I've tried:
'This is in the Page_Load method
If Session("ShowPassword") Is Nothing Then
    chkShowPassword.Attributes.Remove("onclick")
    chkShowPassword.Attributes.Add("onclick", "openPasswordWin(); return false;")
    RemoveHandler chkShowPassword.CheckedChanged, AddressOf chkShowPassword_CheckedChanged
Else
    If Session("ShowPassword") = "0" Then
       chkShowPassword.Attributes.Remove("onclick")
       chkShowPassword.Attributes.Add("onclick", "openPasswordWin(); return false;")
       RemoveHandler chkShowPassword.CheckedChanged, AddressOf chkShowPassword_CheckedChanged
    Else
       chkShowPassword.Attributes.Remove("onclick")
       AddHandler chkShowPassword.CheckedChanged, AddressOf chkShowPassword_CheckedChanged
       chkShowPassword.Attributes.Add("onclick", "chkShowPassword_CheckedChanged")
     End If
End If

The results are inconsistent in getting the click event of the check box button to fire, adding the handler doesn't seem to work. Any suggestions?

Thanks in advance,
Sn
Stephen
Top achievements
Rank 1
 answered on 29 Aug 2012
5 answers
531 views
Hello,

I apologize if this is a duplicate post, I did some searching and although there are some other related posts I could not find one exactly matching my issue that had a solution that worked.  I am creating RadWindows dynamically via javascript (no server code involved) and have set my radwindowmanager initializebehavior to 'maximize' so when the window opens up it is maximized.  I also allow the user to minimize and resize. When I resize the window and move the window around the screen, then minimize, then restore, the window returns to the position and size I last had it as I expected.  However, if I open the window maximized, then minimize it, then restore, the window will not restore maximized.  It comes up a smaller size and centered on the page.  It doesn't seem to remember that it was maximized.  Is there anything I can do to correct this issue?  I found I can use the onclientcommand to always maximize on restore, but I would rather the window return to the initial size and position it was before it was minimized.

Thank you!
Richard
Jens Olesen
Top achievements
Rank 1
 answered on 29 Aug 2012
2 answers
114 views
Hello,

I'm trying to create a menu with RadPanelBar for showing groups of services, each group with their services associated. This menu has two levels, the parent level with the name of the group, and the child level with the name of the service. Because the user can select multiple services into a group, the child must be a Checkbox, and here I have the problem.

At this moment I handle two options: I have a DataBindings with a RadPanelItemBinding that give me the structure parent-child with the data correctly formed, but without the checkboxes. I don't know how can I use another control into the DataBindings structure, neither if I can.

In the other side, I have an ItemTemplate with the Checkboxes doing the same, but it doesn't differentiate the information about the parent and the child.

  <telerik:RadPanelBar ID="RadPanelBar1" runat="server" ExpandMode="SingleExpandedItem" DataFieldID="ID" DataFieldParentID="ParentID" Width="90%">
            <DataBindings>
                <telerik:RadPanelItemBinding ImageUrlField="ImageUrl" TextField="Name" Expanded="True" ChildGroupHeight="200px" />
            </DataBindings>
             
            <ItemTemplate>
                <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# ((ServicePanelbarContainer)Container.DataItem).Name %>'/>
            </ItemTemplate>
        </telerik:RadPanelBar>


I'm binding the data to the RadPanelBar with this structure.

Thanks for your help.

 int i = 1;
            foreach (ServiceGroup serviceGroup in groupList)
            {
                serviceGroup.ImageUrl = "../../Img/Icons/" + serviceGroup.ImageUrl;
 
                parsedGroupList.Add(new ServicePanelbarContainer()
                {
                    ParentID = 0,
                    ID = i,
                    Name = serviceGroup.Name,
                    ImageUrl = serviceGroup.ImageUrl
                });
                 
                int j = i;
                i++;
                 
                foreach (Service s in serviceGroup.Service)
                {
                    parsedGroupList.Add(new ServicePanelbarContainer()
                    {
                        ParentID = j,
                        ID = i,
                        Name = s.Name,
                        ImageUrl = ""
                    });
 
                    i++;
                }
            }

RadPanelBar1.DataSource = parsedGroupList;
RadPanelBar1.DataBind();
Sternico
Top achievements
Rank 1
 answered on 29 Aug 2012
3 answers
78 views
I am attempting to use the RadCaptcha  control with custom audio files, but each letter has static tagged to the end of it at run time. The files that I am using were originally recorded for our phone system and currently work just fine elsewhere.

I am guessing that it has something to do with the bit rate or frequency of the files, but I don't know allot about audio, and I can not find any specifications as to what the RadCaptcha control is expecting (other then a wav file).
Slav
Telerik team
 answered on 29 Aug 2012
1 answer
92 views
I would like to use the iCal export capability in a situation where we are not actually using the Scheduler or Calendar components. We have events in a SQL Server table, for which we would just like to add a simple "Add to my calendar" button, in which case we download an ICS file. Most users are on Outlook.
Ivana
Telerik team
 answered on 29 Aug 2012
1 answer
564 views
I have used telerik product version 2009.3.1103.35.

QA found issue like cross side script vulnerability request attack on telerik Webresource.axd file.
how to resolve this issue without upgrading to new telerik version ?

and also provide the year/quarter of this version 2009.3.1103.35.

Thanks,
-Venkat
Kate
Telerik team
 answered on 29 Aug 2012
15 answers
226 views
Hi,

We are binding few appointments to the scheduler. By default, it will be in month view. But when we click Day View or Week View, an error is been thrown from Javascript and still the scheduler appears in Month View.

The error is as follows:

Error: Sys.WebForms.PageRequestManagerServerErrorException: Height must be non negative.
Parameter name: value

Any hint on solving this issue is appreciated.
Dev
Top achievements
Rank 1
 answered on 29 Aug 2012
1 answer
57 views
This behaviour happens with RadTextbox but not with a standard textbox so may be a bug:

I have a RadTextbox and a Div (Runat=Server) on a usercontrol
The Div has ContentEditable=true set.
When you type in the RadTextbox, the div text updates (Script)When you type in the Div, the RadTextbox text updates.

The problem is if you change the text in the div (RadTextbox text changes as it should), when you click in the RadTextbox, the text resets back to its proginal value.

Heres the basic script:


  function TitleChanged(ObjSource, objDestination) {
        try {
        document.getElementById('<%= DivTitle.ClientID %>').innerHTML = ObjSource.value;
                TitleText = ObjSource.value;
                MakeDirty();
            }
            catch (err) {
            }
        }
          
        function TitleDivChanged() {
            try {
                TitleText=document.getElementById('<%= DivTitle.ClientID %>').innerHTML;
                document.getElementById('<%= txtTitle_WorkingDeal.ClientID %>').value = TitleText;
                MakeDirty();
            }
            catch (err) {
            }
        }
 
 
 
 
 <telerik:RadTextBox ID="txtTitle_WorkingDeal" runat="server"  Width="350" EmptyMessage="Deal Title"
                                               MaxLength="100" Rows="1"
                                              SelectionOnFocus="SelectAll" Text="" ValidationGroup="WorkingDeal"
                                              Wrap="False"
OnKeyup="TitleChanged(this, 'divTitle')"></telerik:RadTextBox>
 

 

<div ID="divTitle" onkeyup="TitleDivChanged()" CONTENTEDITABLE="true" runat="server" class="Title" style="color: #000000">TITLE</div>

 
This Works:
      <asp:TextBox ID="txtTitle_WorkingDeal" runat="server"  Width="350"
                                        MaxLength="100" Rows="1"
                                           OnKeyup="TitleChanged(this, 'divTitle')"></asp:TextBox>
Vasil
Telerik team
 answered on 29 Aug 2012
3 answers
99 views
I need to reset a radcombox in the server side, I am using the ClearCheckedItems method but it is not working, after the callback the checkboxes continue checked.

Is there any way for resetting a radcombox in the server side?

Thanks in advance
Kalina
Telerik team
 answered on 29 Aug 2012
2 answers
161 views
Hello,

I am working with a Rad Grid which is bound to an sql datasource in asp.net. It is displaying data from user defined tables so I need to generate alot of the grid at runtime with c# and work with auto generated columns. My problem is that I can't get the edit form to show any controls what so ever. I'm new to telerik controls so there might be something obvious I'm missing. 

I'm gathering from the examples on this site that to setup an edit form control for each column I just create a GridTextBoxColumnEditor 
as below and then in c# set the columns 'ColumnEditorID' to the ID of the GridTextBoxColumnEditor. Firstly, am I correct in thinking this is the way to map a grid column to a control in the edit form? The relevant code is below along with the way I've setup my datasource and radgrid. What am I missing?


protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
    {
        if (e.Column is GridBoundColumn)
        {
            (e.Column as GridBoundColumn).ColumnEditorID = "GridTextBoxColumnEditor1";
        }
    } 

<asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          DataSourceMode="DataReader"
          ConnectionString="Server=(local); Database=v7; uid=Vestri; pwd=v3str199!;"
          DeleteCommand='<%=SqlDeleteQuery %>'>
        </asp:SqlDataSource>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="true" AllowAutomaticUpdates="true" OnItemDeleted="RadGrid1_ItemDeleted" 
        DataSourceID="SqlDataSource1" AutoGenerateColumns="true" OnColumnCreated="RadGrid1_ColumnCreated">
            <MasterTableView>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle HorizontalAlign="Center" CssClass="editButton" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete" CommandName="Delete" Text="Delete"
                            UniqueName="DeleteColumn" ButtonType="ImageButton">
                            <ItemStyle HorizontalAlign="Center" CssClass="deleteImage" />
                    </telerik:GridButtonColumn>                 
                </Columns>
                <EditFormSettings ColumnNumber="3" CaptionDataField="Town" CaptionFormatString="Edit properties of {0}"
                    InsertCaption="New Town">
                    <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                    <FormCaptionStyle CssClass="EditFormHeader"></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="Insert Order" UpdateText="Update record"
                    UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                </EditColumn>
                <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
            </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="200px" />
Andrey
Telerik team
 answered on 29 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?