Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
75 views
Hallo,

i will change the snooze times for reminder. I didn't need snooze time 5, 10 and 15 minutes befor start event, because i have only all times events without time.

Regards,
Christian
Frank
Top achievements
Rank 1
 answered on 18 Jun 2012
11 answers
297 views
I'm not clear on how to do this and I assume someone out there has done it.
Slav
Telerik team
 answered on 18 Jun 2012
1 answer
48 views
my problem is that when I want to edit my appointment, the calendar that have to be linked not select default.
I manage to see a list of calendar that is in my database but I can not select a schedule to open by default to which it belongs.

Thank you for your help .
Peter
Telerik team
 answered on 18 Jun 2012
1 answer
52 views
I have a combobox and it fires event onItemsRequested. In the code, I bring some class objects and convert them to table and bind with combobox. So far so good. but when the data returned is zero then I want to show error message on the screen that combobox is empty because of the errorr... I update the label (id = lblError) during the code i.e. lblError.Text = "blah bla blah...." but it does not get updated on the screeen. I have ajaxmanager on the aspx page and lblError is included under the ajax settings. so I basically I want to update the label during Combobox_ItemRequested event.

  RadComboBox rcb = (RadComboBox)sender;
 rcb.ClearSelection();
 rcb.Text = string.Empty;
  rcb.Items.Clear();
  rcb.ShowMoreResultsBox = false;
  rcb.BackColor = System.Drawing.Color.Empty;
  
 Employee[] lemployee = Employee.Search();
  
                            if (lemployee.Length == 0)
                            {
                                lblError.Text = "No employee found";
                                return;
                            }
                            else
                            {
                                lblError.Text = "";
                                 
                                DataTable dtable = new DataTable();
                                DataRow orow;
  
                                dtable.Columns.Add("empID");
                                dtable.Columns.Add("name");
                                dtable.Columns.Add("SortFlag");
                                dtable.Columns.Add("Address");
  
                                foreach (Employee oemp  in lEmployee)
                                {
                                    orow = dtable.NewRow();
  
                                    orow["empID"] = oemp.empId.ToString();
                                    orow["name"] = oemp.name.Trim();
                                    orow["Address"] = oemp.Address;
                                    orow["SortFlag"] = "2";
  
                                    dtable.Rows.Add(orow);
                                }
  
                                rcb.DataSource = dtable;
                                rcb.DataBind();
}


Kalina
Telerik team
 answered on 18 Jun 2012
2 answers
303 views
Hello,

I am using telerik controls in a DotNetNuke 6 environment.  I have a RadListBox that needs to be refreshed on DataBind, but no matter what I try, it will not work.  The button is located in a RadWindow, and the page cannot postback upon closing of this window.  I've been trying to figure out the solution for hours and I have yet to find one.  Any help is appreciated, my code is below:

// My RadAjaxManager
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rdlb_assets" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rdlb_assets">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rdlb_assets" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Windows7" />

// My RadListBox
<telerik:RadListBox ID="rdlb_assets" 
                                            runat="server" 
                                            AutoPostBack="true"
                                            EnableDragAndDrop="True" 
                                            OnClientDragStart="OnClientDragStart"
                                            OnClientDragging="OnClientDragging" 
                                            OnClientDropping="OnClientDropping" 
                                            OnClientLoad="RadListBoxLoad"
                                            OnClientItemDoubleClicked="doubleClick"
                                            EnableEmbeddedSkins="false"
                                            Skin="PrestoRadSkin" 
                                            AllowAutomaticUpdates="True">
                        </telerik:RadListBox>

// Javascript fired once the button to close the window is clicked
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind"); 

// Code behind for RadAjaxManager1_AjaxRequest
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if (e.Argument == "Rebind")
            {
                    rdlb_assets.Items.Clear();
                    rdlb_assets.DataSource = LoadAssets(thisContent);
                    rdlb_assets.DataBind();
            }
        }

Thank you!

Vanessa
Vanessa
Top achievements
Rank 1
 answered on 18 Jun 2012
5 answers
521 views
Hi

Having looked at some of the examples of people using radwindow and radgrid rebinds. I have worked on trying to get a radgrid rebind using javascript after altering some data in a modal window.

Although what i am trying gets only so far.

I call this following javascript function from the modal window

    function test()       
    {  
        var grid = $find("<%= RadGrid1.ClientID %>");  
        grid.ajaxRequest();      
    } 

the following code is called from the OnAjaxRequest="RadGrid1_AjaxRequest"  set in the telerik:RadAjaxManager
    protected void RadGrid1_AjaxRequest(object sender, AjaxRequestEventArgs e)  
    {  
        RadGrid1.Rebind();  
    } 

on doing this i am getting an "object doesnt support this property method error"

Any help would be greatly appreciated.

Thanks
Robert
Top achievements
Rank 1
 answered on 18 Jun 2012
1 answer
128 views
Hello. I present a simplified version of the implementation in which I found this problem.

Let's suppose I have a user control, called Redirector, which only has a link button for markup, and who's job it is to redirect to a certain page:
Public Class Redirector
Inherits UserControl
Private Sub lnkRedirect_Command(sender As Object, e As System.Web.UI.WebControls.CommandEventArgs) Handles lnkRedirect.Command
Response.Redirect("~/WebForm2.aspx")
End Sub
End Class

I want to put this on a page, inside of a RadWindow, along with some other controls. Here's the markup for my page:

<%@ Register TagPrefix="testApp" TagName="Redirector" Src="~/Redirector.ascx" %>
 
<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1" >
 
    Page 1
    <br />
    <asp:Button ID="btnOpen" runat="server" Text="Open" />
 
 
    <trk:RadWindow runat="server" ID="MainRadWindow">
        <ContentTemplate>
     
            Hello there.
 
            <trk:RadAjaxPanel ID="InnerAjaxPanel" runat="server">
 
                <ul>
                    <li>
                        <testApp:Redirector ID="Redirector1" runat="server" />
                    </li>
                    <li>
                        <asp:Button ID="btnPostBack" runat="server" Text="Postback" />
                    </li>
                    <li>
                        <asp:Label ID="lblTime" runat="server" />
                    </li>
                </ul>
 
            </trk:RadAjaxPanel>
 
        </ContentTemplate>
    </trk:RadWindow>
        
 
</asp:Content>

And here is the code-behind for the page:

Public Class WebForm1
    Inherits System.Web.UI.Page
 
    Private Sub btnOpen_Command(sender As Object, e As System.Web.UI.WebControls.CommandEventArgs) Handles btnOpen.Command
        MainRadWindow.VisibleOnPageLoad = True
    End Sub
 
    Private Sub btnPostBack_Command(sender As Object, e As System.Web.UI.WebControls.CommandEventArgs) Handles btnPostBack.Command
        lblTime.Text = Now.TimeOfDay().ToString
    End Sub
End Class

If the user opens the RadWindow and immediately clicks the linkbutton, Page.Redirect() happens with no problem. However, if the user first clicks on btnPostback, and then clicks the linkbutton, the InnerAjaxPanel throws a javascript error.

    Microsoft JScript runtime error: Unable to get value of the property '_events': object is null or undefined

Could you please look into this and let me know what is causing the problem, and how I could fix it?

Thank you.
Maria Ilieva
Telerik team
 answered on 18 Jun 2012
2 answers
102 views
Dear All,
    I have developing product in 4 tier architecture by asp.net using c sharp and i have done RadGrid but how navigate from grid page to update page with ID.how to pass id from grid page to update page without using NavigateURL

my code is:
<telerik:RadGrid ID="radgrdUserList" runat="server" AllowPaging="true" AllowSorting="true"
                AutoGenerateColumns="false" >
                <MasterTableView ClientDataKeyNames="ID" DataKeyNames="ID">
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="UserName" HeaderText="User Name">
                            <ItemTemplate>
                                <asp:HyperLink ID="lnkUserName" runat="server" Text='<%#Eval("UserName") %>' NavigateUrl='<%#"~/UserDetails.aspx?ID=" +
                                                                Eval("ID") %>'></asp:HyperLink></ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="First Name" UniqueName="FirstName" DataField="FirstName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="Last Name" UniqueName="LastName" DataField="LastName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="Date of Join" UniqueName="DOB" DataField="DOB">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="Created By" UniqueName="CreatedBy" DataField="CreatedBy">
                        </telerik:GridBoundColumn>
                          </Columns>
                </MasterTableView></telerik:RadGrid>

When i click UserName then pass Id from gridview page to update page in code behind code using query string or session, and how to receive ID in update page for update particular row details.
Susi
Top achievements
Rank 1
 answered on 18 Jun 2012
2 answers
148 views
Just bought the telerik controls, have radgrid working on other pages fine, but this one is not selecting the right value from the database. it shows the dropdownlist but it's always the first one.

Select Command returns: 1 or 0 bit value in sql
ColumnName in sql is :EventTitleStatus

The odsGetTitleStatuses: returns a datatable:
Yes: 1
No: 0


   <telerik:GridDropDownColumn DataSourceID="odsGetTitleStatuses"  DataType="System.Int32" HeaderText="Visible"
                    FilterControlAltText="Filter column1 column" ListTextField="StatusText" SortExpression="EventTitleStatus"
                    ListValueField="StatusValue" UniqueName="EventTitleStatus" DataField="EventTitleStatus">
                </telerik:GridDropDownColumn>

What am I doing wrong??
Charles
Top achievements
Rank 1
 answered on 18 Jun 2012
1 answer
193 views
Hi,

I find combobox little complex in its usage.     This is what i wish to do while using it inside grid control , I am using form template (in grid)...

1. I want combo to display intital value as "select"   (to force user to select dropdown)
2. if user does not select it should show error message.  
3. Above should also be true when user resets this choice back to "select" (initial value)
4. Since this is multicolumn using template,   it should display 1st row as "select" in all columns available in multicolumn
    or atleast in 1st column.


I tried doing above but failed on point #2 and Point #4.  

<telerik:RadComboBox Width="250px" HighlightTemplatedItems="true"
                    runat="server"   ID="cbCurrencyCode" AppendDataBoundItems="True"
                    DataSourceID="EntityDataSource2"
                    SelectedValue='<%# Bind("FKCurrencyCode") %>'
                    onitemdatabound="cbCurrencyCode_ItemDataBound"  >
      <Items>
          <telerik:RadComboBoxItem runat="server" Text="- Select -" Value="- Select -" />
      </Items>
     <HeaderTemplate>
            <ul>
                <li class="col1">Code</li>
                <li class="col2">Name</li>
            </ul>
        </HeaderTemplate>
        <ItemTemplate>
            <ul>
                <li class="col1">
                    <%# DataBinder.Eval(Container.DataItem, "CurrencyCode")%></li>
                <li class="col2">
                    <%# DataBinder.Eval(Container.DataItem, "CurrencyName")%></li>
            </ul>
        </ItemTemplate>
                </telerik:RadComboBox>
  
                <br />
  <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="cbCurrencyCode"
InitialValue="- Select -" ErrorMessage="Please select." ValidationGroup="SearchFormValidationGroup"
CssClass="validator" />


protected void cbCurrencyCode_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e)
     {
         e.Item.Text = ((DAL.MasterCurrency)e.Item.DataItem).CurrencyCode;
         //((DataRowView)e.Item.DataItem)["CurrencyCode"].ToString();
         e.Item.Value = ((DAL.MasterCurrency)e.Item.DataItem).CurrencyCode;
         //((DataRowView)e.Item.DataItem)["CurrencyCode"].ToString();
     }


a. I also had to write above code, which i feel is unnecessary and there should be a better approach.
b. Form do get submitted, without doing any selection.  validationcontrol should have stopped, but it did not.
c. first row in the multicolumn list remains blank.  I want that it should display 'Select' and its value also should be "Select" so that validation can stop form submit.


I hope i was able to explain.  Any advice?

Regards












Peter
Telerik team
 answered on 18 Jun 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?