Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
113 views
I am using RadScheduler.Here is Demo http://demos.telerik.com/aspnet-ajax/scheduler/examples/contextmenu/defaultcs.aspx. Its working fine. i want to customize it. I want to show event on popup menu when click on "more" button.How can i prevent go to day calander when click on more button and get the date by jquery of that where "more" button clicked.
Thanks.
Plamen
Telerik team
 answered on 30 Nov 2012
1 answer
157 views
How can i restrict typing of special charecters in a radcombobox
Shinu
Top achievements
Rank 2
 answered on 30 Nov 2012
2 answers
105 views
I have 3 RadComboBoxes on a web page. I have everything set in the SelectedIndexChanged of the first combobox to fill and select and load the  list of Item of the second combobox, same with the second to the third. What I have is cascading comboboxes that on selection of the first combobox's item it's SelectedIndexChange event loads all of that item.values in the second combobox that are referenced by the selected item.value (or e.value) of the first combobox. Also, the second to the third works the same way. What I need to do is on the page_load of the webpage have the cascade combobox selections take place. How can this be done on page_load and then once the page is loaded? Example of code for the first combobox is shown (note: the second to the third follows the same model) below:

protected void ComboBoxGroup_SelectedIndexChanged (object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    GroupProgram.Item proItem = new GroupProgram.Item(sqlConn, Convert.ToInt32(e.Value));

    ComboBoxProgram.DataValueField = Program.Const_ProgramID;
    ComboBoxProgram.DataTextField = Program.Const_ProgramText;

    ComboBoxProgram.DataSource = proItem.List;
    ComboBoxProgram.DataBind();  
}

Now, as you can see when the user selects a Group combobox item it's selectedIndexChange event is called and the Program combobox has its bound list pulled from the e.value ID field. The problem is that on page load I will set the Group combobox selected  item in the onLoad event; however, I need to know how to call it's selectedIndexChanged event dynamically when it's item value is set.
Also, what is the best way to handle the 3 cascading radcomboxes after the page has loaded?

Thanks,


Steve Holdorf
Dimitar Terziev
Telerik team
 answered on 30 Nov 2012
1 answer
117 views
How  can i desable the cursor in a rad combobox
Shinu
Top achievements
Rank 2
 answered on 30 Nov 2012
0 answers
111 views

Hi,

We are using telerik Rad Ajax Controls for our website, Technologies, ASP.NET, C#.  We are using Visual Studio 2010 and framework 4.0 for our web application development. 

Scenario is as follows,

                We have .aspx page for showing personal information of user where we have used RadPanelBar to categorize the information.  There are 6 RadPanelItem in RadPanelBar and user can save each panel information separately i.e. there is save button in every panel.  And again there is Save button at the bottom (It is not in rad panel bar) of the page to save all the information in the form.  HTML Tables are used to show controls/fields in each panel.  Now when we click on save button either it is individual panel save button or save button at the bottom to save all the information the controls on that panel or some other panel controls get distorted.  It not happens every time, but suddenly sometime on click of save button, controls of any other panel or same panel get distorted.  I have given proper width to table and columns of the table and to controls also.  Is it CSS ISSUE?  Please help me out.  Here is the code snippet for more understanding,
<telerik:RadPanelItem runat="server" Text="Host Country - Home Address" Value="HostAddr">
                                            <Items>
                                                <telerik:RadPanelItem runat="server" Value="HostHomeAddress">
                                                    <ItemTemplate>
                                                        <div class="text" style="background-color: #edf9fe">
                                                            <table cellpadding="5" cellspacing="0" border="0" width="730px">
                                                                <tr>
                                                                    <td align="right" colspan="3" style="text-align: right;" valign="middle">
                                                                        <asp:CheckBox ID="primary_addr_checkbox3" runat="server" OnClick="UnCheckOther(this)" />
                                                                        Mark as primary Mailing Address
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="3">
                                                                        <asp:Label ID="lblmsgHostCHA" runat="server" Font-Names="Verdana"></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" valign="top" width="width250px">
                                                                          
                                                                    </td>
                                                                    <td align="right" valign="top">
                                                                        <asp:Button ID="btnSaveHostCHA" runat="server" CausesValidation="false" OnClick="btnSaveHostCHA_Click"
                                                                            OnClientClick="clearMsg()" Text="Save Changes" />
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                          
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" valign="top" width="width250px">
                                                                        <asp:Label ID="lblHostHomeCountry" runat="server" AssociatedControlID="ddlHostHomeCountry"
                                                                            Font-Names="Verdana" ForeColor="#696969" Text="Country"></asp:Label>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                        <asp:DropDownList ID="ddlHostHomeCountry" runat="server" AutoPostBack="true" DataTextField="Name"
                                                                            DataValueField="ID" Font-Names="Verdana" OnSelectedIndexChanged="ddlHostHomeCountry_SelectedIndexChanged"
                                                                            Width="200px">
                                                                        </asp:DropDownList>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                          
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td width="width250px">
                                                                        <asp:Label ID="lblHostHomeStreet1" runat="server" AssociatedControlID="txtHostHomeStreet1"
                                                                            Font-Names="Verdana" ForeColor="#696969" Text="Street 1"></asp:Label>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                        <asp:TextBox ID="txtHostHomeStreet1" runat="server" CssClass="textInput" Font-Names="Verdana"
                                                                            MaxLength="50" Width="200px"></asp:TextBox>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                          
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" valign="top" width="width250px">
                                                                        <asp:Label ID="lblHostHomeStreet2" runat="server" AssociatedControlID="txtHostHomeStreet2"
                                                                            Font-Names="Verdana" ForeColor="#696969" Text="Street 2"></asp:Label>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                        <asp:TextBox ID="txtHostHomeStreet2" runat="server" CssClass="textInput" Font-Names="Verdana"
                                                                            MaxLength="50" Width="200px"></asp:TextBox>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                          
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" valign="top" width="width250px">
                                                                        <asp:Label ID="lblHostHomeCity" runat="server" AssociatedControlID="txtHostHomeCity"
                                                                            Font-Names="Verdana" ForeColor="#696969" Text="City"></asp:Label>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                        <asp:TextBox ID="txtHostHomeCity" runat="server" CssClass="textInput" Font-Names="Verdana"
                                                                            MaxLength="50" Width="200px"></asp:TextBox>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                          
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" valign="top" width="width250px">
                                                                        <asp:Label ID="lblHostHomeState" runat="server" AssociatedControlID="ddlHostHomeState"
                                                                            Font-Names="Verdana" ForeColor="#696969" Text="State/Province"></asp:Label>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                        <asp:DropDownList ID="ddlHostHomeState" runat="server" DataTextField="Name" DataValueField="StateProvinceID"
                                                                            Font-Names="Verdana" Width="200px">
                                                                        </asp:DropDownList>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                          
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" valign="top" width="width250px">
                                                                        <asp:Label ID="lblHostHomeZip" runat="server" AssociatedControlID="txtHostHomeZip"
                                                                            Font-Names="Verdana" ForeColor="#696969" Text="Zip/Postal Code"></asp:Label>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                        <asp:TextBox ID="txtHostHomeZip" runat="server" CssClass="textInput" Font-Names="Verdana"
                                                                            MaxLength="20" Width="200px"></asp:TextBox>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                          
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                            <br />
                                                        </div>
                                                    </ItemTemplate>
                                                </telerik:RadPanelItem>
                                            </Items>
                                        </telerik:RadPanelItem>


Thank you in advance.
Akshay
Top achievements
Rank 1
 asked on 30 Nov 2012
1 answer
144 views
Hi

I am creating RadScheduler in web part sharepoint 2010. But it not display same in project.

You can see my error in picture.
 
Can you provide me with some help please?

Thanks.
Plamen
Telerik team
 answered on 30 Nov 2012
2 answers
300 views
Hi This is the code for my Grid view As you know there is no RowCommand on RadGrid that why I need some help on how to convert all this code to RadGrid Code

  1.         protected void gv_Movie_RowCommand(object sender, GridViewCommandEventArgs e)
  2.         {
  3.             //get the row number of the selected row
  4.     // The error is at line 5
  5.             int rowNo = int.Parse(e.CommandArgument.ToString());
  6.             //get the selected row
  7.             GridViewRow row = gv_movie.Rows[rowNo];
  8.             //Get movie ID, which is on the 1st column of the gridview
  9.             string movieID = row.Cells[0].Text;
  10.             if (e.CommandName == "Select")
  11.             {
  12.                 Response.Redirect("");
  13.             }
  14.             else if (e.CommandName == "Update")
  15.             {
  16.                 Response.Redirect("");
  17.             }
  18.         }
Shinu
Top achievements
Rank 2
 answered on 30 Nov 2012
3 answers
129 views
I'm using a RadGrid to insert/edit records.  I'm using the FormTemplate.  The problem I'm experiencing is that when you click on the Add A New Record button on the grid it doesn't expand to show the form template.  Instead this error bubbles up:  'Telerik.Web.UI.GridInsertionObject' does not contain a property with the name 'Address'.

I'm using an object datasource to populate the grid and do inserts and updates.  Here's the data object I'm using:

public class Person : BusinessBase<Person>, IPerson, IAggregateRoot
{
    public User.User Owner { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string FullName
    {
        get { return LastName + ", " + FirstName; }
    }
    public DateTime BirthDate { get; set; }
    public Address.Address Address { get; set; }
    public IList<Item.Item> Items { get; set; }
 
    protected override void validate()
    {
         
    }
}

public class Address : BusinessBase<Address>, IAddress, IAggregateRoot
{
    public string Street { get; set; }
    public string City { get; set; }
    public string State { get; set; }
    public string ZipCode { get; set; }
    protected override void validate()
    {
         
    }
}


And here's the form template I created for it.

            <EditFormSettings EditFormType="Template" InsertCaption="New Person">
                <FormTemplate>
                    <div id="PersonDiv" >
                        <table>
                            <tr>
                                <td>
                                    First Name:
                                </td>
                                <td>
                                    <telerik:RadTextBox runat="server" ID="txtFirstName" MaxLength="50" Text='<%# Bind("FirstName") %>' />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtFirstName" ErrorMessage="A first name is required" ValidationGroup="vgPerson" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Last Name:
                                </td>
                                <td>
                                    <telerik:RadTextBox runat="server" ID="txtLastName" MaxLength="50" Text='<%# Bind("LastName") %>' />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtLastName" ErrorMessage="A last name is required" ValidationGroup="vgPerson" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Use your address:
                                </td>
                                <td>
                                    <telerik:RadButton ToggleType="CheckBox" runat="server" ID="cbUseYourAddress" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Street:
                                </td>
                                <td>
                                    <telerik:RadTextBox runat="server" ID="txtStreet" MaxLength="50" Text='<%# Bind("Address.Street") %>' />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtStreet" ErrorMessage="A street is required" ValidationGroup="vgPerson" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    City:
                                </td>
                                <td>
                                    <telerik:RadTextBox runat="server" ID="txtCity" MaxLength="50" Text='<%# Bind("Address.City") %>' />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    State:
                                </td>
                                <td>
                                    <telerik:RadTextBox runat="server" ID="txtState" MaxLength="2" Text='<%# Bind("Address.State") %>' />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Zip code:
                                </td>
                                <td>
                                    <telerik:RadTextBox runat="server" ID="txtZipCode" MaxLength="10" Text='<%# Bind("Address.ZipCode") %>' />
                                </td>
                            </tr>
<%--                            <tr>
                                <td>
                                    Birth date:
                                </td>
                                <td>
                                    <telerik:RadDatePicker ID="dpBirthDate" runat="server" DbSelectedDate='<%# Bind("BirthDate") %>' />
                                </td>
                            </tr>--%>
                            <tr>
                                <td colspan="2">
                                    <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' ValidationGroup="vgPerson" />
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                                CommandName="Cancel" ValidationGroup="vgPerson" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="vgPerson" ShowMessageBox="True" ShowSummary="False" />
                </FormTemplate>           

When I'm referencing the address information in the Bind I have to use 'Address.Street' in order to get to the street field of the Address object.  Same format for the other fields in the address object.  It would seem the form template doesn't like that.  Any suggestions would be very much appreciated.

Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Nov 2012
3 answers
233 views
How do I pre-expand the grid to show the DetailsTable child items by default and also have them in edit mode as well?

This doesn't work as it obviously places the parent rows in Edit Mode:

protected void rgUnits_PreRender(object sender, EventArgs e)
        {
            for (int i = 0; i < rgUnits.MasterTableView.PageSize; i++)
            {
                rgUnits.EditIndexes.Add(i);
            }

            rgUnits.Rebind();
        }

<MasterTableView  ...
<DetailTables>
 <telerik:GridTableView...

I need it to be pre-expanded and in edit mode for the child rows.
Shinu
Top achievements
Rank 2
 answered on 30 Nov 2012
1 answer
112 views
I have a radgrid which each row has a detail grid.
I am making the grid programmatically.

I have these set :
RadGrid1.AutoGenerateHierarchy = True
RadGrid1.MasterTableView.AutoGenerateColumns = True

With the above setting I can remove columns from master table using, 
Protected Sub RadGrid1_PreRender(sender As Object, e As EventArgs)
    RadGrid1.MasterTableView.GetColumn("ID").Visible = False
End Sub

However, I cannot find a way to do this (or something similar) for the Hierarchy created tables.

Any Suggestions?
Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Nov 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?