Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
67 views
every time i press a button, whatever which button in the page.
it always pop out a window for an error, I will attach the message pic to it, please have a look
 
I have register for the raduploadhandler oin the web config
Dimitar Terziev
Telerik team
 answered on 14 Jun 2011
1 answer
116 views
Hello,

I get the error that the Telerik.Web.UI.StyleSheetFolder application setting is required when adding a stylesheet that's not a telerik stylesheet or an embedded one.  My question is can I set this as a property right on the RadStylesheetManager control itself, instead of in application settings?

Thanks.
Simon
Telerik team
 answered on 14 Jun 2011
1 answer
123 views
Is it possible to add and remove a row in a RADGrid using the client-side API?

The row will contain four columns - a drag and drop column, a column with a row number, a column with a text box and a column with a remove button (which needs to remove the row)

I'd like a text link above the grid to add the row.
Daniel
Telerik team
 answered on 14 Jun 2011
1 answer
70 views
I have a RadMenu in Mega Drop Down mode.
A childitem is added, and a UserControl is added to the child.

Code for adding the UserControl dynamically:
e.Item.GroupSettings.ExpandDirection = ExpandDirection.Down
e.Item.GroupSettings.OffsetX = "-476"
 
childItem = New RadMenuItem()
childItem.CssClass="MenuSlide"
e.item.Items.Add(childItem)
 
Dim uc_Products As products = DirectCast(LoadControl("~/includes/products/products.ascx"), products)
childItem.Controls.Add(uc_Products)
In the userControl there is a Repeater which must be Ajaxified so that it can be updated while the menu item is expanded.
I try it like so:

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />
 
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="600px" EnableAJAX="true"
LoadingPanelID="RadAjaxLoadingPanel1" EnablePageHeadUpdate="True"
HorizontalAlign="NotSet">
 
<asp:Button Text="productlines" id="btn_productlines" runat=server />
 
<asp:Repeater id="rpt_Footer" runat="server" OnItemCommand="UpdateProductGroups"
<HeaderTemplate><ul class="ProductFooter"></HeaderTemplate>
<ItemTemplate>
<li style="float:left;">
 
<asp:Literal runat=server id="ltl_rewrite" Text='<%# Container.DataItem("rewrite") %>' />
 
<asp:ImageButton
ImageUrl='<%#FormatThumbnail(Container.DataItem("foto"))%>'
Tooltip='<%#Container.DataItem("description")%>'
id="btn_Type" runat="server" />
</li>
</ItemTemplate>
<FooterTemplate></ul></FooterTemplate>
</asp:Repeater>
<asp:Label runat=server id="aa" Text="aaa" />
</telerik:RadAjaxPanel>
And in the CodeBehind:
Sub UpdateProductGroups(ByVal Sender As Object, ByVal e As RepeaterCommandEventArgs)
aa.Text = "bbb"
End Sub
When I click in the Repeater a full Postback is occuring instead of an Ajax update.

Any suggestions?

Thanks,
Marc
Kate
Telerik team
 answered on 14 Jun 2011
18 answers
388 views
Hi ,
I am using Rad AsyncUpload and to add additionla fields like Description  I am using the javascript :
function addTitle(radUpload, args) {
              
  var curLiEl = args.get_row();<br>
                var firstInput = curLiEl.getElementsByTagName("input")[0];               <br>
                var table = document.createElement("table");           <br>
<br>
                <br>
                //A new row for a Description field                <br>
                row = table.insertRow(-1);<br>
                cell = row.insertCell(-1);<br>
                input = CreateInput("Desc", "text");           <br>
                label = CreateLabel("Description", input.id);<br>
                cell.appendChild(label);<br>
                cell = row.insertCell(-1);<br>
                cell.appendChild(input);<br>
<br>
                //Add a File label in front of the file input<br>
                var fileInputSpan = curLiEl.getElementsByTagName("span")[0];<br>
                var firstNode = curLiEl.childNodes[0];<br>
                label = CreateLabel("File", radUpload.getID());<br>
                curLiEl.insertBefore(label, firstNode);<br>
                curLiEl.insertBefore(table, label);<br>
              }<br>
<br>
            function CreateLabel(text, associatedControlId) {<br>
                var label = document.createElement("label");<br>
                label.innerHTML = text;<br>
                label.setAttribute("for", associatedControlId);<br>
                label.style.fontSize = 12;<br>
                return label;<br>
            }<br>
<br>
            function CreateInput(inputName, type) {<br>
                var input = document.createElement("input");<br>
                input.type = type;<br>
                input.name = inputName;<br>
                input.style.height = "18px";<br>
                input.style.width = "130px";<br>
                input.style.fontSize = "12px";<br>
                input.style.fontFamily = "Calibri";               <br>
                return input;<br>
            }


for OnClientAdded="addTitle" event of RadAsync File Upload.I am able to display them in a row by row.But I need to display them in a same <td> of the AsyncUploadI tried out by changing the javascript but could not found a solution for it.
Please help me out with a suggestion

Thanks In Advance,
h@r!.
Peter Filipov
Telerik team
 answered on 14 Jun 2011
1 answer
76 views
Hello,

I need the localizationfile for the RADTreeList control but I cannot find it in my installfiles (Telerik\RadControls for ASP.NET AJAX Q3 2010\App_GlobalResources). Is it a shared file?

Thx in advance

Daniel
Telerik team
 answered on 14 Jun 2011
1 answer
60 views
I have a RadGrid where multiple rows can be selected.  But whatever 1 Row the user clicks on, that is the one I want to show the details for.  Currently, if I click on a Row that has NOT been selected already, I can get the ID using RadGrid.SelectedValue.  But if I click on a Row that has been ALREADY selected, I get the ID of the Row that was selected BEFORE the currently selected Row.  Should I be getting it some other way? 

thanks

mark

Code:

 

<P>protected void radgridSearchResults_SelectedIndexChanged(object sender, 
EventArgs e)<BR>        
{<BR>            //get 
the Selected Row and populate the 
Details...<BR>            
try<BR>            
{<BR>                
if (radgridSearchResults.SelectedValue != 
null)<BR>                
{<BR>                    
//GridDataItem dataItem = 
(GridDataItem)radgridSearchResults.SelectedItems[radgridSearchResults.SelectedItems.Count 
1];<BR>                    
//int selectedIndex = 
int.Parse(ViewState["CurrentRowIndex"].ToString());<BR>                    
//GridDataItem dataItem = 
(GridDataItem)radgridSearchResults.SelectedItems[selectedIndex];<BR>                    
//var scriptId = dataItem.GetDataKeyValue("id").ToString();</P>
<P>                    
var scriptId = radgridSearchResults.SelectedValue.ToString();</P>
<P>                    
                    
ViewState[Globals.CurrentScriptId] = scriptId;<BR>                    
//Pass Id to another function...
setDetails(
int.Parse(scriptId.ToString()));<BR>                    
}<BR>            
}<BR>            catch 
(System.Exception 
ex)<BR>            
{<BR>                
//Error code removed....
return
;<BR>            
}<BR>        }</P>
Vasil
Telerik team
 answered on 14 Jun 2011
0 answers
102 views

Hi,


I have one rad combo box. I have to fill it with options array in java script.Here is code.

I am using one function for adding options to combo box.here is the function .

   function addOption(selectbox, text, value) {
                var optn = document.createElement("OPTION");
                optn.text = text;
                optn.value = value;
                selectbox.options.add(optn);

            }
And I am looping and adding options to combobox.

 for (var i = 0; i < strArray.length; i++) {

                addOption($find("<%= SavedPresetMenu.ClientID %>"), strArray1[i], strArray[i]);
                } Here SavedPresetMenu is rad combobox Id.In the above function I am getting one javascript error.
selectbox.options is undefined.And if I clear options array also getting same error.

 $find("<%= SavedPresetMenu.ClientID %>").options.length = 0;
In this line also getting  same error. How to use rad combobox in this situation.

Any ideas, suggestions would be greatly appreciated.


Thanks,
Bhagath.






Bhagath Reddy
Top achievements
Rank 1
 asked on 14 Jun 2011
3 answers
709 views
I have experienced lots of problems with the RadCombobox control with trying to bind it while having Enableloadondemand set to true
I'm currently binding on my gridview OnDataBound event by creating a single item and inserting it at index 0.

Now when i need to change te selected Item the enableloadondemand fires correctly and loads items filtered on the text typed in the text area.

after selecting an item the OnSelectedIndexchanged event fires and the radcombobox text is updated to the text of the selected item.
however the Value never gets updated and I will have to perform another query to my recordset to select the value.

Since the text gets updated normally when selecting a different item how come the value doesn't ?
i have a snippet with how i handle the selectedindexchanged event.

protected void RCB1_Selectedindexchanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    RadComboBox rcb = (RadComboBox)sender; // combobox that fires event
    string hi = rcb.SelectedValue; // combobox value, always old value
    string ha = rcb.Text; // combobox text, always text from newly selected item
    string hu = e.OldValue; // working correctly always value of previously selected item
    string ho = e.OldText; //working correctly always text of previously selected item
    string he = e.Value; // not working as one would expect it to work, always OLD value
    string hy = e.Text; // working as expected always NEW text
    string hiy = rcb.SelectedItem.Value; // Always old value
    string hyi = rcb.SelectedItem.Text; // always old value
    DataView dv = (DataView)SqlDataSource2.Select(new DataSourceSelectArguments());
    string huu; // correct value after looping through intire datasource, would like to avoid this 
    foreach (DataRowView row in dv)
    {
        if (row["Naambedrtot"].ToString() == rcb.Text)
        {
            huu = row["klantnummer"].ToString();
        }
    }
    if (e.OldValue != e.Value) // always the same so selected value never gets changed
    {
        rcb.SelectedValue = e.Value;
    }
}

Is this the correct behavior ?

I would think that if you can send the correct new text , the new value should be simple too.
Carlos Franken
Top achievements
Rank 1
 answered on 14 Jun 2011
5 answers
182 views
Hi,

I am using  grdiview in a radtooltip the problem is that when user click on a checkbox in a radtooltip the tooltip disappears which I really don't want.

                        <telerik:RadToolTip ID="RadToolTipJobStatus" runat="server" CssClass="tooltipBackColor"
                            ManualClose="true" ManualCloseButtonText="Close" TargetControlID="lblJobStatus"
                            RelativeTo="Element" HideDelay="4000" HideEvent="LeaveTargetAndToolTip" ShowCallout="true"
                            Position="TopRight" Width="550px" Height="200px">
                            <asp:GridView ID="gvJobStates" runat="server" AutoGenerateColumns="False" ShowHeader="true"
                                OnRowDataBound="gvJobStates_RowDataBound" Width="100%" OnRowCreated="gvJobStates_RowCreated">
                                <HeaderStyle BackColor="SkyBlue" />
                                <Columns>
                                    <asp:TemplateField SortExpression="JobStateName">
                                        <HeaderTemplate>
                                            <asp:Label ID="lblHeader" Text="Stage" runat="server"></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lblJobStateName" runat="server" Text='<%# Eval("JobStateName") %>'
                                                Font-Bold='<%# Eval("IsCompleted")%>' />
                                            <asp:HiddenField ID="hidJobStateKey" runat="server" Value='<%# Eval("ID")%>' />
                                            <asp:HiddenField ID="hidJobKey" runat="server" Value='<%# Eval("JobID")%>' />
                                        </ItemTemplate>
                                        <ItemStyle Width="45%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:Label ID="Label1" Text="Marked By" runat="server"></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lblUserName" runat="server" />
                                        </ItemTemplate>
                                        <ItemStyle Width="45%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:Label ID="Label2" Text="Completed" runat="server"></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="cbIsCompleted" runat="server" AutoPostBack="true" OnCheckedChanged="cbIsCompleted_CheckedChanged"
                                                Checked='<%# Eval("IsCompleted")%>' ValidationGroup='<%# Eval("ID")%>' />
                                        </ItemTemplate>
                                        <ItemStyle Width="10%" HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </telerik:RadToolTip>

Marin Bratanov
Telerik team
 answered on 14 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?