Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
293 views
Hi there,

First, I'm running 2011.1.413.40

I have a RadComboBox that uses AutoComplete with Web Services to populate itself with matching items. Code be here:

<

 

 

telerik:RadComboBox ID="rcbTimeClientSearch" runat="server" AllowCustomText="true" Height

="100px" 

 

MarkFirstMatch="false" Width="150px" EmptyMessage="Client Search" EnableLoadOnDemand

="true" 

 

 

DataTextField="ClientName" DataValueField="ClientRef" EnableAutomaticLoadOnDemand

="True"

ItemsPerRequest="10" ShowMoreResultsBox="true" EnableVirtualScrolling="true" Filter="Contains" AutoPostBack="true"

 

<WebServiceSettings Method="GetTimeClient" Path="~/UserControls/ComboSearch.asmx" />

</telerik:RadComboBox>

 

 

The GetTimeClient method returns a RadComboBoxDataobject as you would expect.

This control works as expected in IE8, Chrome 11.0.696.65, FireFox 4, i.e. when you start typing, matching results from the web service are displayed. However, in IE9, I get the following client-side error as soon as the combo-box is dropped-down via the button, or the focus is set to the control:

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

I also get some very odd characters in the box...

If I run IE9 in Compatibility View, it's fine.

I am running the RadComboBoxControl in a user control, but even if it placed on a normal .aspx page, it still errors.

Any thoughts?

Thank you,

Mike K.
Dimitar Terziev
Telerik team
 answered on 08 Jun 2011
2 answers
115 views
Hello,
 Is
it possible table with many tempaltecolumns (in edit mode)  everything to update?
<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="True"
                CellSpacing="0" DataSourceID="SqlDataSource2" GridLines="None"
                ShowFooter="True" AllowAutomaticDeletes="True"
                AllowAutomaticUpdates="True" ShowStatusBar="True" AllowMultiRowEdit="True">
                <ClientSettings>
                    <Selecting AllowRowSelect="True" />
                </ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="kdId"
                    DataSourceID="SqlDataSource2" CommandItemDisplay="Top"
                    InsertItemPageIndexAction="ShowItemOnFirstPage" EditMode="InPlace">
<CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="Add"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridTemplateColumn DataField="ArtId" DataType="System.Int32"
            FilterControlAltText="Filter ArtId column" HeaderText="Category"
            SortExpression="ArtId" UniqueName="ArtId">
            <EditItemTemplate>
                <telerik:RadComboBox ID="RadComboBox3" Runat="server"
                    DataSourceID="SqlDataSource1" DataTextField="ArtName" DataValueField="ArtId"
                    SelectedValue='<%# Bind("ArtId") %>'>
                </telerik:RadComboBox>
            </EditItemTemplate>
            <InsertItemTemplate>
                <telerik:RadComboBox ID="RadComboBox2" Runat="server"
                    DataSourceID="SqlDataSource1" DataTextField="ArtName" DataValueField="ArtId"
                    SelectedValue='<%# Bind("ArtId") %>' EmptyMessage="Add New Category">
                </telerik:RadComboBox>
            </InsertItemTemplate>
            <ItemTemplate>
                <telerik:RadComboBox ID="RadComboBox1" Runat="server"
                    DataSourceID="SqlDataSource1" DataTextField="ArtName" DataValueField="ArtId"
                    SelectedValue='<%# Bind("ArtId") %>'
                    onitemdatabound="RadComboBox1_ItemDataBound"
                    onselectedindexchanged="RadComboBox1_SelectedIndexChanged"
                    AutoPostBack="True">
                </telerik:RadComboBox>
            </ItemTemplate>
            <HeaderStyle Width="80px" />
            <ItemStyle Width="80px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="Info"
            FilterControlAltText="Filter Info column" HeaderText="Details"
            SortExpression="Info" UniqueName="Info">
            <EditItemTemplate>
                <asp:TextBox ID="InfoTextBox" runat="server" Text='<%# Bind("Info") %>'></asp:TextBox>
            </EditItemTemplate>
            <InsertItemTemplate>              
                <telerik:RadTextBox ID="Info" Runat="server" Height="15px"
                    TextMode="MultiLine" Width="250px" Text='<%# Bind("Info") %>'>
                    <ClientEvents OnBlur="Blur" OnFocus="Focus" />
                </telerik:RadTextBox>
            </InsertItemTemplate>
            <ItemTemplate>
                <telerik:RadTextBox ID="Info" Runat="server" Height="15px"
                    Text='<%# Bind("Info") %>' TextMode="MultiLine" Width="250px">
                    <ClientEvents OnBlur="Blur" OnFocus="Focus" />
                </telerik:RadTextBox>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn FilterControlAltText="Filter CodaAccount column"
            HeaderText="Coda Account" UniqueName="CodaAccount" ReadOnly="True">
            <InsertItemTemplate>
                <asp:Label ID="Label1" runat="server"></asp:Label>
            </InsertItemTemplate>
            <ItemTemplate>
                <asp:Label ID="CodaAccount" runat="server" Text="Label"></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="60px" />
            <ItemStyle Width="60px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="Anzahl" DataType="System.Int32"
            FilterControlAltText="Filter Anzahl column" HeaderText="Number"
            SortExpression="Anzahl" UniqueName="Anzahl">
            <EditItemTemplate>
                <telerik:RadNumericTextBox ID="Anzahl" Runat="server"
                    Culture="de-DE" DbValue='<%# Bind("Anzahl") %>' Width="50px">
                    <EnabledStyle HorizontalAlign="Right" />
                </telerik:RadNumericTextBox>
            </EditItemTemplate>
            <InsertItemTemplate>
                <telerik:RadNumericTextBox ID="Anzahl" Runat="server" Culture="de-DE"
                    Width="50px" DbValue='<%# Bind("Anzahl") %>'>
                    <NumberFormat DecimalDigits="0" />
                    <EnabledStyle HorizontalAlign="Right" />
                </telerik:RadNumericTextBox>
            </InsertItemTemplate>
            <ItemTemplate>
                <telerik:RadNumericTextBox ID="Anzahl" Runat="server" Culture="de-DE"
                    DbValue='<%# Bind("Anzahl") %>' Width="50px">
                    <NumberFormat DecimalDigits="0" />
                    <EnabledStyle HorizontalAlign="Right" />
                </telerik:RadNumericTextBox>
            </ItemTemplate>
            <HeaderStyle Width="50px" />
            <ItemStyle Width="50px" HorizontalAlign="Right" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="Preis" DataType="System.Decimal"
            FilterControlAltText="Filter Preis column" HeaderText="Price"
            SortExpression="Preis" UniqueName="Preis" FooterText="Total:">
            <EditItemTemplate>
                <asp:TextBox ID="PreisTextBox" runat="server" Text='<%# Bind("Preis") %>'></asp:TextBox>
            </EditItemTemplate>
            <InsertItemTemplate>
                <telerik:RadNumericTextBox ID="Preis" Runat="server"
                    Culture="de-DE" Width="60px" DbValue='<%# Bind("Preis") %>'>
                    <EnabledStyle HorizontalAlign="Right" />
                </telerik:RadNumericTextBox>
            </InsertItemTemplate>
            <ItemTemplate>
                <telerik:RadNumericTextBox ID="Preis" Runat="server"
                    Culture="de-DE" DbValue='<%# Bind("Preis") %>'
                    Width="60px">
                    <EnabledStyle HorizontalAlign="Right" />
                </telerik:RadNumericTextBox>
            </ItemTemplate>
            <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
            <HeaderStyle Width="60px" />
            <ItemStyle Width="60px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn FilterControlAltText="Filter Total column"
            HeaderText="Total" UniqueName="Total" ReadOnly="True">
            <InsertItemTemplate>
                <asp:LinkButton ID="Insert" runat="server" CommandName="PerformInsert" ToolTip="Insert"><img src="Image/AddRecord.gif" alt="Insert" style="border-style:none"/></asp:LinkButton>  
                <asp:LinkButton ID="Cancel" runat="server" CommandName="Cancel" ToolTip="Cancel"><img src="Image/Cancel.gif" alt="Cancel" style="border-style:none"/></asp:LinkButton>  
            </InsertItemTemplate>
            <ItemTemplate>
                <asp:Label ID="lblTotal" runat="server" Width="60px" CssClass="lblCSSright"></asp:Label>
            </ItemTemplate>
            <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
            <HeaderStyle Width="60px" />
            <ItemStyle Width="60px" />
        </telerik:GridTemplateColumn>
        <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column">
        </telerik:GridEditCommandColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
    <CommandItemStyle Height="25px" />
 
    <CommandItemTemplate>
        <asp:LinkButton ID="lnkAdd" runat="server" CommandName="InitInsert"><img src="Image/AddRecord.gif" style="border-style: none" /> Add</asp:LinkButton>   
        <asp:LinkButton ID="lnkUpd" runat="server" CommandName="UpdateAll"><img src="Image/Update.gif" style="border-style: none"/> Update</asp:LinkButton>   
    </CommandItemTemplate>
 
</MasterTableView>
<FilterMenu EnableImageSprites="False"></FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
            </telerik:RadGrid>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                ConnectionString="<%$ ConnectionStrings:webzeus %>" SelectCommand="SELECT ArtName, ArtId, CodaKonto
FROM KostenArt ORDER BY ArtName"></asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSource2" runat="server"
                ConnectionString="<%$ ConnectionStrings:webzeus %>"
                 
                SelectCommand="SELECT [kdId], [Number], [ArtId], [Anzahl], [Preis], [Info] FROM [KostenDetail] WHERE ([Number] = @Number)"
                DeleteCommand="DELETE FROM [KostenDetail] WHERE [kdId] = @kdId"
                InsertCommand="INSERT INTO [KostenDetail] ([Number], [ArtId], [Anzahl], [Preis], [Info]) VALUES (@Number, @ArtId, @Anzahl, @Preis, @Info)"
                UpdateCommand="UPDATE [KostenDetail] SET [Number] = @Number, [ArtId] = @ArtId, [Anzahl] = @Anzahl, [Preis] = @Preis, [Info] = @Info WHERE [kdId] = @kdId">
                <DeleteParameters>
                    <asp:Parameter Name="kdId" Type="Int32" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:SessionParameter Name="Number" SessionField="curNumber" Type="Int32" />
                    <%--<asp:Parameter Name="Number" Type="Int32" />--%>
                    <asp:Parameter Name="ArtId" Type="Int32" />
                    <asp:Parameter Name="Anzahl" Type="Int32" />
                    <asp:Parameter Name="Preis" Type="Decimal" />
                    <asp:Parameter Name="Info" Type="String" />
                </InsertParameters>
                <SelectParameters>
                    <asp:SessionParameter Name="Number" SessionField="curNumber" Type="Int32" />
                </SelectParameters>
                <UpdateParameters>
                    <asp:SessionParameter Name="Number" SessionField="curNumber" Type="Int32" />
                    <%--<asp:Parameter Name="Number" Type="Int32" />--%>
                    <asp:Parameter Name="ArtId" Type="Int32" />
                    <asp:Parameter Name="Anzahl" Type="Int32" />
                    <asp:Parameter Name="Preis" Type="Decimal" />
                    <asp:Parameter Name="Info" Type="String" />
                    <asp:Parameter Name="kdId" Type="Int32" />
                </UpdateParameters>
            </asp:SqlDataSource>
Protected Sub RadGrid1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
    If (e.CommandName = "UpdateAll") Then
        For Each editedItem As GridEditableItem In RadGrid1.EditItems
            Dim newValues As Hashtable = New Hashtable
            e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem)
            SqlDataSource2.UpdateCommand = String.Format("UPDATE KostenDetail SET ArtId = '{0}', Anzahl = '{1}', Preis = '{2}', Info = '{3}' WHERE kdId = '{4}'",
                                            newValues("ArtId"), newValues("Anzahl"), newValues("Preis"), newValues("Info"),
                                            editedItem.GetDataKeyValue("kdId").ToString())
            SqlDataSource2.Update()
        Next
    End If
    RadGrid1.Rebind()
End Sub
Iana Tsolova
Telerik team
 answered on 08 Jun 2011
3 answers
184 views
I Have RadAjaxManager and RadScriptManager , i used RadAjaxManager cotrol a button. but when i click the button, it doesnt response, when i comment for the RadAjaxManager, then the button can work d? anyone can help me solve the problem?

<telerik:RadScriptManager ID="ScriptManager1" runat="server"></telerik:RadScriptManager>
 
<telerik:RadWindow ID="RadWindow1" runat="server"
            Behaviors="Resize, Close, Move" Height="300px" Modal="True"
            NavigateUrl="ForgotPassword.aspx" Overlay="True" ReloadOnShow="True"
            VisibleStatusbar="False" Width="450px">
        </telerik:RadWindow>
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="lnkLogin">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="lnkLogin" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="lblMsg" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
this is my code
Dimitar Terziev
Telerik team
 answered on 08 Jun 2011
1 answer
59 views


If i click to add image or video it shows error like this.......
"
Web.config registration missing!
 The Telerik dialogs require a HttpHandler registration in the web.config file. Please, use the control's Smart Tag to add the handler automatically, or see the help for more information: Controls > RadEditor > Dialogs > Introduction

"

Rumen
Telerik team
 answered on 08 Jun 2011
3 answers
72 views
Hi,

   I am using telerik rad rotator (dll licensed version : 2009.3.1208.20 )  in SharePoint 2010 site.I want to set rotator's IntialItemIndex property using javascript.Currently i have written following code server side to set rotator's IntialItemIndex :

 

 

 

 

protected

 

void SetInaitialItemIndex(object sender, EventArgs e)

 

 

{

 

 

 

try

 

 

 

 

 

 

 

 

{

 

 

 

LinkButton senderControl = sender as LinkButton;

 

 

 

 

string indexAsString = senderControl.Text; // Get the value - it should be a number;

 

 

 

 

 

 

 

 

 

 

int initialIndex = int.Parse(senderControl.Text);// Parse to int

 

 

 

 

 

 

 

 

initialIndex = initialIndex - 1;

 

BannerRotator.InitialItemIndex = initialIndex;

 

// Assign the new value ;

 

 

 

 

 

 

 

 

}

 

 

 

catch (Exception oEx)

 

 

{

 

 

 

// HttpContext.Current.Response.Write("Set Inaitial Item Index :" + oEx.Message);

 

 

 

 

 

 

 

 

}

 

}

 

 

 

I want to change above code logic in client side javascript,As i have 5 link buttons on my User control and i am calling above function(SetInaitialItemIndex) in linkbutton' onClick event like below.Also i have attached the screen shot of my web part as attachment.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<asp:LinkButton BorderWidth="0" ID="lnkbtn1" runat="server" Text="1" ForeColor="white" CssClass="prismimagelink" OnClick="SetInaitialItemIndex"></asp:LinkButton>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<asp:LinkButton BorderWidth="0" ID="lnkbtn2" runat="server" Text="2" ForeColor="white" CssClass="prismimagelink" OnClick="SetInaitialItemIndex"></asp:LinkButton

 

 

 

>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<asp:LinkButton BorderWidth="0" ID="lnkbtn3" runat="server" Text="3" ForeColor="white" CssClass="prismimagelink" OnClick="SetInaitialItemIndex"></asp:LinkButton

 

 

 

>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<asp:LinkButton BorderWidth="0" ID="lnkbtn4" runat="server" Text="4" ForeColor="white" CssClass="prismimagelink" OnClick="SetInaitialItemIndex"></asp:LinkButton

 

 

 

>

 

 

 

 

 

 

 

 

 

 
<asp:LinkButton BorderWidth="0" ID="lnkbtn5" runat="server" Text="5" ForeColor="white" CssClass="prismimagelink" OnClick="SetInaitialItemIndex"></asp:LinkButton

 

 

 

>

Please help me and give the code to set initialitemindex property server side.
Its very urgent issue ,i have to release site within 1 day.
Reply ASAP

Thanks,
Divya


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Niko
Telerik team
 answered on 08 Jun 2011
1 answer
72 views
Hi,
I am using telerik radeditor, dll version "2010.2.713.35". Right now we have allowed the users to put any content in the editor, but we would like to restrict them from posting any C# or java script code. please let me know how can i achieve this?

Thanks,
Santosh Kumar
Rumen
Telerik team
 answered on 08 Jun 2011
2 answers
85 views
Hi,

This has been working perfectly up until this morning when I arrived at work. I'm the only one who has changed anything on this project for weeks.. see screenshot attached.

Its rendering itself inside a form that I have in the master page?

This happens in all browsers.. across multiple platforms.. I don't understand why it is happening :/

Regards,

Shane
Rumen
Telerik team
 answered on 08 Jun 2011
2 answers
59 views
Dear Telerik!

Could you please advice me on the following issue:

I'm making a web page with a grid, one of columns of which contains RadDockZones. Thus each line of the grid contains exactly one RadDockZone. There are other RadDockZones on the page (not in the grid!) in which all RadDocks are initially put.

I need to make some of my empty RadDockZones forbidden for all new RadDocks after one RadDock got put in it. (it actually realizes a one-to-one relationship between one type of entities and another)

There are excellent examples on you site showing similar behaviour. Like this one:
http://www.telerik.com/community/forums/aspnet-ajax/docking/limit-number-of-docks-per-zone-without-displaying-placeholder.aspx

But this method does not work for those RadDockZones which live inside the Grid! 

Does being inside a grid change something for a RadDockZone? Why such RadDockZone still enables a RadDock to get put inside it even if the RadDock has the RadDockZone's client ID among the forbidden ones?

I do appreciate any help...

- Stepan.
Stepan
Top achievements
Rank 1
 answered on 08 Jun 2011
1 answer
79 views
wat i want to is i just want to set radtooltip for my checkboxlist item whose text=Home & Office (free) but its not showing i dont know where i m doing mistake kindly help me out

 foreach (ListItem li in chkPlans.Items)
            {
                if (li.Text == "Home & Office (free)")
                {
                    RadToolTip rd = new RadToolTip();
                    rd.TargetControlID = "chkPlans_0";
                    rd.IsClientID = true;
                    rd.ShowEvent = ToolTipShowEvent.OnMouseOver;
                    rd.Position = ToolTipPosition.Center;
                    rd.Text = "testing2";
                    this.Form.Controls.Add(rd);
                    //li.Attributes.Add("title", "testing");


                }




                li.Text = li.Text + " ?";
            }
Marin Bratanov
Telerik team
 answered on 08 Jun 2011
2 answers
58 views
I have a grid using a GridDateTimeColumn formatted from a stored procedure as mm/dd/yyyy.  The textbox alongside the DatePicker to filter zero supresses in the month and day so Equal To filtering doesn't work.  How do I fix this?
<telerik:GridDateTimeColumn UniqueName="ShipDate" DataField="ShipDate" PickerType="DatePicker" HeaderText="Ship Date" DataFormatString="{0:D}" CurrentFilterFunction="EqualTo" DataType="System.DateTime" FilterListOptions="VaryByDataType" >
</telerik:GridDateTimeColumn>
SELECT StoreNumber,
       AO.BoothNumber,
       AO.ItemID,
       ItemDescription,
       CONVERT(VARCHAR,ShipDate,101) AS ShipDate, .....
Elliott
Top achievements
Rank 2
 answered on 08 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?