Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
143 views

Do you have to have a DataSource defined in the .aspx for htis to work ? 

What i was doing initially was databinding a list to my combobox in the code behind (page load)

I'm trying to get this working with automaticloadondemand but failing. 

I've tried adding it into itemsrequested as well but no luck. I was hoping i'd be able to do this automatically rather than have to handle the request each time and have to calculate how many items are returned and what other ones need to display (showmoreresults box)

etc etc.

Regards,

Alan

Dimitar Terziev
Telerik team
 answered on 05 Mar 2012
6 answers
112 views
Hi,

I am using RadAjaxPanel in my DotNetNuke Application, I'm trying to do a RadAjaxPanel ajaxRequest (invoked on the client) to call the server event-handler. I do have a server-side AjaxRequest handler defined but it never gets call because of something with the request. What do I have to do to figure this out?

Please Help Me !!!

function chkBox_Click(chk)
            {
                
                var combo = $find("<%= cmbRoleName.ClientID %>");
                var text = "";             
               
                //get the collection of all items
                var items = combo.get_items();
                
                //enumerate all items
                for (var i = 0; i < items.get_count(); i++)
                {
                    var item = items.getItem(i);
                    
                    //get the checkbox element of the current item
                    var chkRole = $get(combo.get_id() + "_i" + i + "_chkRole");
                                        
                    if (chkRole.checked)
                    {
                        text = item.get_text()
                        var ajaxPanel = window['<%=rapUserJobMapping.ClientID %>'];
                        var ajaxValue = "ADDUSERS\r\n"+ text;   
                        alert(ajaxValue)
                        ajaxPanel.AjaxRequest(ajaxValue);
                            
                        

                    }                   

                }               
                
            }   
Maria Ilieva
Telerik team
 answered on 05 Mar 2012
1 answer
62 views
Hi,

  I am having a combobox and during itemsrequested e.Text always returns null..And after reaching end of the combobx the same data binds again....what i have to do in javascript?Help me..

Thnx in advance
:)
Dimitar Terziev
Telerik team
 answered on 05 Mar 2012
3 answers
193 views
Greetings,

I have in my grid a GridTemplateColumn which display "INDEF" or "MA". When it's "INDEF", i would like my row to change of color:


this is my try:

protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = (GridDataItem)e.Item;
 
        if (item["typedestickets"].Text == "INDEF")
        {
            item.BackColor = System.Drawing.Color.Red;
        }
    }
}
The column in question:


                <telerik:GridTemplateColumn  HeaderText="Type de tickets"
    UniqueName="typedestickets">
    <ItemTemplate><asp:Label id="test" runat="server"></asp:Label></ItemTemplate>
</telerik:GridTemplateColumn>


Thanks in advance for your help
Ronan BARRANGER
Top achievements
Rank 1
 answered on 05 Mar 2012
1 answer
154 views

Here is another issue with Telerik Control. Following is the scenario:

 

We have three panels on the form which is Ajax enabled:

1.       Panel 1 – where user enters information.

2.       Panel 2 – where user uploads document using Telerik RADAsyncUpload control.

3.       Panel 3 -  where user confirms his information and uploaded files before he submits.

 

Issue:                                      

 

The user has the option to go back and forth between above three panels to update any information. But the problem arises when user selects files in Telerik RADAsyncUpload control and he goes back to the Panel 1 and Comes back to the Panel 2 (or from Panel 3 to Panel 2). The files that the user is selected are lost. The telerik upload control doesn’t maintain the state of the selected files. Instead it goes back to the initial state.

 

We tried to use the “PostbackTriggers” property but it is not working.

 

Please assist us asap.

Thanks.
N
Dimitar Terziev
Telerik team
 answered on 05 Mar 2012
1 answer
148 views
Hi,

I have a radpanelbar in a RadAjaxUpdate panel . I need to post back the page when i click or expand  the radpanel item . But got an error.
System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).    at System.Web.UI.ControlCollection.AddAt(Int32 index, Control child)     at Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated)   

I have the following code
<telerik:RadAjaxPanel ID="DemoPanelBarPanel" runat="server" EnableAJAX="true">
 
    <telerik:RadPanelBar ID="uxProfileList" OnClientItemClicked="OnClientItemExpand" OnClientItemExpand="OnClientItemExpand" ExpandMode="FullExpandedItem" Width="100%" runat="server">
 
                            <Items>
                                <telerik:RadPanelItem runat="server" Text="Personal Info" Value="PersonalInfo" Font-Bold="true"  >
                                </telerik:RadPanelItem>
                                <telerik:RadPanelItem runat="server" Text="Profile Info" Value="ProfileInfo" Font-Bold="true" >
                                </telerik:RadPanelItem>
                                <telerik:RadPanelItem runat="server" Text="Education" Value="Education" Font-Bold="true" >
                                </telerik:RadPanelItem>
                                <telerik:RadPanelItem runat="server" Text="WorkExperience" Value="WorkExperience" Font-Bold="true" >
                                </telerik:RadPanelItem>
                            </Items>
 
                        </telerik:RadPanelBar>
</telerik:RadAjaxPanel>
<script  type="text/javascript" language="javascript">
 
    function OnClientItemExpand(sender, args) {
 
 
 
        $find("<%= DemoPanelBarPanel.ClientID%>").ajaxRequestWithTarget("<%= DemoPanelBarPanel.ClientID%>", args.get_item().get_value());
 
 
    }    
</script>
DemoPanelBarPanel.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(OnProfileAjaxPanelAjaxRequest);
void OnProfileAjaxPanelAjaxRequest(object sender, AjaxRequestEventArgs e)
       {
          if (e.Argument.Equals("PersonalInfo"))
           {
              RadPanelItem item = uxProfileList.Items.FindItemByValue(e.Argument);
           }
       }

Dimitar Terziev
Telerik team
 answered on 05 Mar 2012
1 answer
46 views
I have a radtextbox on an aspx page that renders correctly on all major desktop browsers. On the IPad with the latest browser it draws the top half of the textbox only. I can click in the textbox and it will redraw correctly, but on form load I get the top half only. Is this a known issue corrected with upgrades to the IPad browser or Telerik controls?

I am using v. 2011.2.712.40

Thanks,
Ben
Maria Ilieva
Telerik team
 answered on 05 Mar 2012
3 answers
108 views
Hello,
I've tried to activate radcompression on my IIS7 server and SL application (4.0 SL), I got this exception

{System.Xml.XmlException: Unexpected end of file. Following elements are not closed: RelatesTo, Header, Envelope.
   at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3)
   at System.Xml.XmlExceptionHelper.ThrowUnexpectedEndOfFile(XmlDictionaryReader reader)
   at System.Xml.XmlBufferReader.ReadUniqueId()
   at System.Xml.XmlBinaryReader.ReadElementContentAsUniqueId()
   at System.ServiceModel.Channels.RelatesToHeader.ReadHeader(XmlDictionaryReader reader, AddressingVersion version, String actor, Boolean mustUnderstand, Boolean relay)
   at System.ServiceModel.Channels.MessageHeaders.ReadBufferedHeader(XmlDictionaryReader reader)
   at System.ServiceModel.Channels.MessageHeaders.Init(MessageVersion version, XmlDictionaryReader reader, IBufferedMessageData bufferedMessageData)
   at System.ServiceModel.Channels.BufferedMessage..ctor(IBufferedMessageData messageData)
   at System.ServiceModel.Channels.BinaryMessageEncoderFactory.BinaryMessageEncoder.ReadMessage(ArraySegment`1 buffer, BufferManager bufferManager, String contentType)
   at System.ServiceModel.Channels.HttpInput.DecodeBufferedMessage(ArraySegment`1 buffer, Stream inputStream)}

from the AuthenticationService.svc as far as it calls the IsLoggedIn method... if I disable the compression everithing works fine...any suggestion?

I'm using 2012.1.215.40 version of dll...any suggestion?
Martin
Telerik team
 answered on 05 Mar 2012
3 answers
146 views
How do I put multiple unique RadHtmlField controls on a single Page Layout in a MOSS 2007 Publishing?
Stanimir
Telerik team
 answered on 05 Mar 2012
1 answer
176 views
I trust there is a really obvious answer here, and I'm just looking write through it. One of the great things about this forum is someone will probably tell me. 

We have a date data entry implementation which works with a RadMaskedTextBox, and ASP.NET image control, and a single DatePicker on a master page. It took some work and is far from perfect, but it's much better than the RadDateInput with built-in Date Picker for data entry, so all that's good. This implementation involves storing a reference to each RadMaskedTextBox in a Javascript array so it can be accessed by index. Now I need to extend this implementation to some date entry on some existing grids.

So far I have the functionality working fine on Edit (will paste code below), but I can't make it work on Insert, because I can't figure out how to get the GridDataItem which is the relevant RadMaskedTextBox on the client-side.

On the server (and this all works fine for Edit and Insert):
protected void LeaseRenewalRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is Telerik.Web.UI.GridEditableItem)
    {
        GridEditableItem editableItem = (GridEditableItem)e.Item;
        RadMaskedTextBox startDateTextBox;
        if (e.Item.IsInEditMode)
        {
            if (e.Item.OwnerTableView.IsItemInserted)
            {
                Image startDateCalendarImage = (Image)editableItem.FindControl("RenewalInsertStartDateCalendarImage");
                if (startDateCalendarImage != null)
                {
                    startDateCalendarImage.Attributes.Add("onclick", "ShowGridDatePopup('Insert','Start','" + editableItem.ItemIndex + "');");
                }
 
                Image endDateCalendarImage = (Image)editableItem.FindControl("RenewalInsertEndDateCalendarImage");
                if (endDateCalendarImage != null)
                {
                    endDateCalendarImage.Attributes.Add("onclick", "ShowGridDatePopup('Insert','End','" + editableItem.ItemIndex + "');");
                }
 
                startDateTextBox = (RadMaskedTextBox)editableItem.FindControl("RenewalInsertStartDateRadMaskedTextBox");
            }
            else
            {
                Image startDateCalendarImage = (Image)editableItem.FindControl("RenewalStartDateCalendarImage");
                if (startDateCalendarImage != null)
                {
                    startDateCalendarImage.Attributes.Add("onclick", "ShowGridDatePopup('Edit','Start','" + editableItem.ItemIndex + "');");
                }
 
                Image endDateCalendarImage = (Image)editableItem.FindControl("RenewalEndDateCalendarImage");
                if (endDateCalendarImage != null)
                {
                    endDateCalendarImage.Attributes.Add("onclick", "ShowGridDatePopup('Edit','End','" + editableItem.ItemIndex + "');");
                }
 
                startDateTextBox = (RadMaskedTextBox)editableItem.FindControl("RenewalStartDateRadMaskedTextBox");
            }
 
            if (startDateTextBox != null)
            {
                startDateTextBox.Focus();
                startDateTextBox.Attributes.Add("onfocus", "this.select()");
            }
        }
    }
}

On the client, the following code works great for edit, but it does not work for insert. For insert, index is -1, and 
        row = MasterTable.get_dataItems()[index];
returns null, and thus nothing works.

I can't find any different way to get a reference to the RadMaskedTextBox here.

Please help. Thanks.


function ShowGridDatePopup(editinsert, startend, index) {
    // alert(index);
    var grid = $find("<%=LeaseRenewalRadGrid.ClientID %>");
    var MasterTable = grid.get_masterTableView();
    var dateTextBox;
    var row;
    if (editinsert == "Edit") {
        row = MasterTable.get_dataItems()[index];
        if (startend == "Start") {
            dateTextBox = row.findControl("RenewalStartDateRadMaskedTextBox");
        }
        else {  // End
            dateTextBox = row.findControl("RenewalEndDateRadMaskedTextBox");
        }
        if (dateTextBox != null) {
            dateControls[8] = dateTextBox;
            ShowDatePopup(8, "TopRight", true);
        }
    }
    else { // Insert
        row = MasterTable.get_dataItems()[index];
        if (startend == "Start") {
            dateTextBox = row.findControl("RenewalInsertStartDateRadMaskedTextBox");
        }
        else {  // End
            dateTextBox = row.findControl("RenewalInsertEndDateRadMaskedTextBox");
        }
        if (dateTextBox != null) {
            dateControls[9] = dateTextBox;
            ShowDatePopup(9, "TopRight", true);
        }
    }
}


Maria Ilieva
Telerik team
 answered on 05 Mar 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?