Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
81 views
Basically, I'd like to render the contents of a page to the screen and then start a long running process.  Is it possible for the page to load and after the contents are loaded to the page, do a partial postback with AJAX and have the contents of the page remain on the screen?
Pavlina
Telerik team
 answered on 26 Sep 2009
5 answers
78 views
I am binding a RadContextMenu control to a hierarchical dataset and am having problems with     literals appearing at the bottom of the menu. This only happens when the menu is set longer than the list of items. The control is rendering properly in Firefox.

ASPX Code:
<telerik:RadContexMenu ID="RadMenu1" runat="server" /> 
 

Populated as follows
DataSet links = new DataSet();

adapter.Fill(links);
RadMenu1.DataTextField = "TagName";
RadMenu1.DataNavigateUrlField = "";
RadMenu1.DataFieldID = "TagId";
RadMenu1.DataFieldParentID = "TagParentId";
RadMenu1.DataSource = links;
RadMenu1.DataBind();

RadMenu1.ExpandDelay = 1;
RadMenu1.EnableRootItemScroll = false;
RadMenu1.DefaultGroupSettings.Flow = ItemFlow.Vertical;
RadMenu1.DefaultGroupSettings.Height = Unit.Pixel(200);



Note that with only a couple items added to the root level of the menu I will get the '&nbsp;' literals appearing at the end of the menu. If however the list is longer than the control, the control scrolls as desired and no extraneous characters display.
Simon
Telerik team
 answered on 26 Sep 2009
2 answers
286 views
Hi, I'm using a radgrid with a FormTemplate that has many textboxes and a couple of other standard asp.net controls. One of the textboxes is for saving a password, before the insert is sent to the database I'd like to take the password text, hash it up then send the hash to the database (I'm using entity framework for accessing the db).

Problem is I seem to be able to do everything but actually save the record. Below is some of my code but
a) nothing gets to the db and
b) the grid stays in insert mode and the values clean out on clicking the "insert" like

Any any sight would be much appreciated.


<telerik:RadGrid ID="CandidateGrid" runat="server" AutoGenerateColumns="false" DataSourceID="CandidateData"
            AllowFilteringByColumn="true" AllowPaging="true" OnItemCommand="CandidateGrid_Command" OnInsertCommand="CandidateGrid_Insert">
            <PagerStyle Mode="NumericPages" Visible="true" />
            <MasterTableView DataSourceID="CandidateData" DataKeyNames="OptimumUserId" AllowMultiColumnSorting="true"
                GroupLoadMode="Server" AllowAutomaticUpdates="true" AllowAutomaticInserts="true"
                CommandItemDisplay="Top">
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="../Assets/Images/document_edit.png" />
                    <telerik:GridCheckBoxColumn DataField="IsActive" HeaderText="Active" />
                    <telerik:GridBoundColumn DataField="OptimumPayrollId" HeaderText="Payroll Id" />
                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" />
                    <telerik:GridBoundColumn DataField="Surname" HeaderText="Surname" />
                    <telerik:GridBoundColumn DataField="Email" HeaderText="Email" />
                </Columns>
                <EditFormSettings EditFormType="Template">
                    <FormTemplate>
                        <table>
                            <tr>
                                <td>
                                    Active:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:CheckBox ID="ActiveCheckBox" runat="server" Checked='' />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Payroll Id:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:TextBox ID="PayrollIdTextBox" runat="server" Text='<%# Bind("OptimumPayrollId") %>' />
                                    <asp:RequiredFieldValidator ID="PayrollIdTextBoxValidation" runat="server" ControlToValidate="PayrollIdTextBox"
                                        ErrorMessage="Required" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    First Name:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%# Bind("FirstName") %>' />
                                    <asp:RequiredFieldValidator ID="FirstNameValidation" runat="server" ControlToValidate="FirstNameTextBox"
                                        ErrorMessage="Required" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Surname:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:TextBox ID="SurnameTextBox" runat="server" Text='<%# Bind("Surname") %>' />
                                    <asp:RequiredFieldValidator ID="SurnameValidation" runat="server" ControlToValidate="SurnameTextBox"
                                        ErrorMessage="Required" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Email:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
                                    <asp:RequiredFieldValidator ID="EmailValidation" runat="server" ControlToValidate="EmailTextBox"
                                        ErrorMessage="Required" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Password:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:TextBox ID="PasswordTextBox" runat="server" Text='' />
                                    <asp:RequiredFieldValidator ID="PasswordValidation" runat="server" ControlToValidate="PasswordTextBox"
                                        ErrorMessage="Required" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <asp:LinkButton ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                    </asp:LinkButton>&nbsp;
                                    <asp:LinkButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                        CommandName="Cancel"></asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                    </FormTemplate>
                </EditFormSettings>
...
 protected void CandidateGrid_Insert(object source, GridCommandEventArgs e)
    {

        e.Canceled = true;
        ListDictionary newValues = new ListDictionary();

        OptimumProviders.MembershipProvider p = new MembershipProvider();
        GridEditableItem editedItem = e.Item.OwnerTableView.GetInsertItem();

        string password = (editedItem.FindControl("PasswordTextBox") as TextBox).Text;
        bool isActive = (editedItem.FindControl("ActiveCheckBox") as CheckBox).Checked;
        string encodedPassword = p.EncodePassword(password);

        newValues["Password"] = encodedPassword;
        newValues["IsActive"] = isActive;

        e.Item.OwnerTableView.InsertItem(newValues);
    }
Chris
Top achievements
Rank 1
 answered on 26 Sep 2009
1 answer
180 views
I am trying to remove the border and shadhow from the ProgressArea, but I cannot seem to get rid of the styling on .ruShadow.  How would I remove any kind of border and drop shadow from the ProgressArea.  ruShadow is not specificed in the CSS for the Skin so it seems I can only override it on the ProgressTemple, but I keep getting two divs rendered for ruShadow (the one automatically added by the ProgressArea and the one I seem to be adding below).

                                   <ProgressTemplate> 
                                   <div class="ruShadow" style="background: transparent; margin: 0; padding: 0;">  
                                       <div id="radProgressArea_Panel">  
                                            <ul class="ruProgress" style="border-style: none ;border-width: 0; padding-top: 15px;"
                                               <li class="ruFilePortion">  
                                                   <div class="ruBar"
                                                        <div runat="server" id="PrimaryProgressBarInnerDiv"><!-- --></div
                                                    </div> 
                                                    Part:  <span runat="server" id="PrimaryPercent"></span>% (<span runat="server" id="PrimaryValue"></span>
                                                    <br /> 
                                                    Total:  <span runat="server" id="PrimaryTotal"></span> 
                                                </li> 
                                                <li class="ruFileCount">     
                                                    <div class="ruBar"
                                                        <div runat="server" id="SecondaryProgressBarInnerDiv"><!-- --></div
                                                    </div> 
                                                    Part:  <span runat="server" id="SecondaryPercent"></span>% (<span runat="server" id="SecondaryValue"></span>
                                                    <br /> 
                                                    Total:  <span runat="server" id="SecondaryTotal"></span> 
                                                </li> 
                                            </ul> 
                                        </div> 
                                    </div> 
                                    </ProgressTemplate> 

Genady Sergeev
Telerik team
 answered on 26 Sep 2009
1 answer
441 views
Hello,

I want to allow an empty value to be selected in my RadComboBox.  I would just add a manual entry and add the AppendDataBoundItems="true" to it, but the thing is I refresh this RadComboBox on the client side too.  So I would like to allow an empty entry, without having to ensure an empty record is there.  Is that possible?  If not, is adding the empty entry the solution?

Thanks.
Peter
Telerik team
 answered on 26 Sep 2009
1 answer
100 views
I am executing some code that looks like this:

        Private Sub SetAllTelerikControlsSkin(ByVal Container As Control, ByVal Skin As String
            For Each ctl In Container.Controls 
                If Not (ctl.GetType().GetProperty("Skin"Is NothingThen 
                    ctl.EnableEmbeddedSkins = False 
                    ctl.Skin = Skin 
 
                End If 
                'Keep digging. If I have children, set them. 
                If Not (ctl.GetType().GetProperty("HasChildren"Is NothingAndAlso ctl.HasChildren Then 
                    'Is a container control; call myself 
                    SetAllTelerikControlsSkin(ctl, Skin) 
                End If 
            Next ctl 
 
        End Sub 
 

Starting out the Container parameter is "Me". 

The problem is that any container controls, specifically the RadMultiPage's children (it's PageViews) don't get caught up here because it would seem that RadMultiPage doesn't have a property "Skin" and it doesn't have the Property "HasChildren" either. Do I have to do a special property call for MultiPage / PageViews in order to iterate down into them to set skin properties? 

Any ideas so I don't have to go into the source code and set every RAD control manually by name whenever I add one to the control? I also plan on doing the same for any user controls in my page. 
Vesko
Top achievements
Rank 2
 answered on 26 Sep 2009
1 answer
91 views
Hi,

have a simple comboBox  that initiall displays an emptyMessage ( like "please select").
ComboBox is set to autopostback and AllowCustomMessage is true

Can't seem to find a way to reset the comboBox to it's initial state from servers side.

Tried setting selectedIndex to something like -1, but that doesn't work.

thanks
Vesko
Top achievements
Rank 2
 answered on 26 Sep 2009
1 answer
110 views
hi

Based on the example which show only 1 parameter(CustomerID) http://demos.telerik.com/aspnet-ajax/window/examples/usingurlforserverarguments/defaultcs.aspx

How do i achieve 2 parameters? CustomerID and Customer Name? Thanks
Georgi Tunev
Telerik team
 answered on 26 Sep 2009
3 answers
99 views
Hello

I am not sure if this an issue with my PC or a possible problem with Telerik RadWinow as I have not been able to recreate it on another machine.

I am using IE 7 and when I have a modal rad window open if I click the "X" on the main browser 100% of the time IE will say "internet explorer has stopped working" and then will freeze for a little bit and then restart.

I have tested this on a couple of other PCs and don't get the problem, so I am just wondering if anyone else has come across this or can I just ignore it and assume its a quirk of my PC?

Thanks

Bex
Georgi Tunev
Telerik team
 answered on 26 Sep 2009
1 answer
49 views
Hi friends,
   I'm using a radscheduler with recurrence facility, I'm also checking resouce availability in this , wht my problem is , i will expalin this using an example

i have 2 rooms R1 and R2  and 3 users - A,B,C

A and B has meeting in R1 at 10am - 11 am
so i cant schedule meeting for A & B at the same time in room R2 - i checked this , and there is no problem

suppose i'm using a recurrence and no problem while inserting the appointment , problem is while ediiting that recurrence

while ediiting 2 options will ask

1. edit this occurence
2. edit the series

while editing  the 1st option i'm getting an error - object reference not set to an instance of an object
for second option no pblm is there

here is the code

private IEnumerable<Resource> GetResources(string resType)
        {
            List<Resource> availableUsers = new List<Resource>(Owner.Resources.GetResourcesByType("User"));
            List<Resource> availableResources = new List<Resource>();
            IEnumerable<Resource> resources = Owner.Resources.GetResourcesByType(resType);
            
            foreach (Appointment appointmentInRange in Owner.Appointments.GetAppointmentsInRange(Appointment.Start, Appointment.End))
            {
                if (appointmentInRange == Appointment)
                    continue;

                foreach (Resource occupiedUser in appointmentInRange.Resources.GetResourcesByType("User"))
                {
                    availableUsers.Remove(occupiedUser);
                }
                if (availableUsers.Count == 0)
                {
                    found = true;
                }
            }

            return availableUsers;          
        }

Please help... If anyone of u have an idea

thanking You
Regards
Chinnu

Peter
Telerik team
 answered on 26 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?