Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
63 views
Hi,

This is my grid and datasource. When i delete its raise this error. Why that?

Could not find control 'RadComp' in ControlParameter 'IDCcomID'.


 <telerik:RadGrid ID="RadGrid5" runat="server" AutoGenerateColumns="False"  AllowAutomaticInserts="True"
        AllowAutomaticUpdates="True" AllowAutomaticDeletes="false"
                                        GridLines="None" DataSourceID="SqlDataSource2" Width="400px"
                                AllowSorting="True" Skin="Web20" >
                                <MasterTableView AutoGenerateColumns="False" DataKeyNames="DocNo" CommandItemDisplay="TopAndBottom" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" >
                                
                                    <Columns>
                                                                             
                                        <telerik:GridBoundColumn DataField="DocNo" HeaderText="Doc No" Visible="false" ReadOnly="true"
                                            UniqueName="DocNo">
                                        </telerik:GridBoundColumn>
                                        
                                      <telerik:GridTemplateColumn UniqueName="TemplateColumn1" HeaderText="Doc Own AppComment">                                        
                                        <ItemTemplate>                                        
                                         <telerik:RadComboBox runat="server"
                                             ID="RadComp"
                                             DataTextField="DocOwnAppComment"
                                             DataValueField="DocOACID"
                                             HighlightTemplatedItems="true"
                                             Height="190px"
                                             Width="220px"
                                             DropDownWidth="420px"
                                                DataSourceID="ContactsDataSource"
                                                SelectedValue='<%#Bind("IDCcomID") %>'></telerik:RadComboBox>
                                        
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                        
                                        <telerik:RadComboBox runat="server"
                                             ID="RadCompEdit"
                                             DataTextField="DocOwnAppComment"
                                             DataValueField="DocOACID"
                                             HighlightTemplatedItems="true"
                                             Height="190px"
                                             Width="220px"
                                             DropDownWidth="420px"
                                                DataSourceID="ContactsDataSource"
                                                SelectedValue='<%#Bind("IDCcomID") %>'></telerik:RadComboBox>
                                                
                                        
                                        </EditItemTemplate>                                        
                                        </telerik:GridTemplateColumn>                                    
                                        
                                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmText="Are you sure delete this record?"
                                            Text="Delete" UniqueName="column">
                                        </telerik:GridButtonColumn>
                                       </Columns>
                                    
                                </MasterTableView>
                              </telerik:RadGrid>


 <asp:SqlDataSource ID="SqlDataSource2"
                                    ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" runat="server"
                                    SelectCommand="SELECT DocNo , [IDCcomID] FROM [tbl_DATA_IDCcomment] WHERE (DocNo = @DocNo)"
                                    DeleteCommand="DELETE FROM [tbl_DATA_IDCcomment] WHERE [DocNo] = @DocNo and IDCcomID=@IDCcomID "
                                    InsertCommand="INSERT INTO tbl_DATA_IDCcomment(DocNo, IDCcomID) VALUES (@DocNo, @IDCcomID)" >
                                  <SelectParameters>                                                                           
                                        <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="DocNo" />
                                    </SelectParameters>
                                                                        
                                     <DeleteParameters>
                                           <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="DocNo" />   
                                           <asp:ControlParameter ControlID="RadComp" PropertyName="SelectedValue" Type="Int32" Name="IDCcomID" />  
                                    </DeleteParameters>
                                    <InsertParameters>
                                            <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="DocNo" />   
                                           <asp:ControlParameter ControlID="RadCompEdit" PropertyName="SelectedValue" Type="Int32" Name="IDCcomID" />  
                                    </InsertParameters>
                                </asp:SqlDataSource>








lakmal
Top achievements
Rank 2
 answered on 04 Sep 2009
2 answers
228 views
Hi. I am looking at the demo http://demos.telerik.com/aspnet-ajax/calendar/examples/functionality/specialdays/defaultcs.aspx
I love the layout and idea but is it possible to display multipe appointments on one day? For instance, what if the user had to pay their mortgage on the same day they had a date (See example for clarification). After, I would like the user to be able to click on the day open a new window and edit the appointment.

Thanks, love the controls!
Steve Napurano
Top achievements
Rank 1
 answered on 04 Sep 2009
7 answers
538 views
I'm having trouble with getting the 'no records' message/template working correctly.

My particular issue is that the NoRecordsTemplate is not being shown when there are no records and the initial data binding takes place on the server side. When the grid is rebound on the client side, then no record message is shown correctly.

In trying to determine why, I created a small test project and found I had the opposite problem. I could not get the no records message to NOT show. I'm hoping that in finding out why I cannot hide the message, I will find out why I can not get it to show in my main project.

Setting the EnableNoRecordsTemplate to false does not hide the message, regardless of whether the <NoRecordsTemplate> element is there.

I cannot find anything in the documentation to suggest why the EnableNoRecordsTemplate has no effect.

Here is my simple grid;

        <telerik:RadGrid ID="RadGrid1" runat="server"> 
            <MasterTableView EnableNoRecordsTemplate="false"> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="FirstName" /> 
                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title" /> 
                    <telerik:GridBoundColumn DataField="TitleOfCourtesy" HeaderText="TitleOfCourtesy" /> 
                </Columns> 
                <NoRecordsTemplate> 
                    <div> 
                        No records custom message.</div> 
                </NoRecordsTemplate> 
            </MasterTableView> 
        </telerik:RadGrid> 

Here is the only code behind used;

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init 
        RadGrid1.DataSource = New Object() {} 
        RadGrid1.DataBind() 
    End Sub 

I have tried the latest internal build, but with the same results.
Ryan
Top achievements
Rank 1
 answered on 04 Sep 2009
3 answers
103 views
Hi,

I have a RadPanelBar with multiple items. In one of them I have placed a RadTreeView in the item template.
Expand/collapse functionality works as expected in IE and FireFox, but in Google Chrome the item containing the RadTreeView is always expanded and cannot be collapsed.

Regards,
Konrad
Konrad
Top achievements
Rank 1
 answered on 04 Sep 2009
2 answers
140 views
I am trying to create a checkbox column from a string field that comes back from my stored procedure which returns a 1 or 0 however it does not seem to be working... can someone shed some light as to what i might be doing wrong ?

 

<telerik:GridCheckBoxColumn DataField="Monday"

 

 

HeaderText="Monday"

 

 

AllowSorting="true"

 

 

UniqueName="Monday" DataType="System.Boolean">

 

 

</telerik:GridCheckBoxColumn>

the field name from the table is called 'Monday'

thank you for any help you can give

 

Daniel
Telerik team
 answered on 04 Sep 2009
1 answer
72 views
Hello,

I'm having some trouble using a RadEditor and a RadTreeview on an ASP UpdatePanel. The updatepanel is on an RadTabstrip wit RadMultipage.

There is a (asp) dropdownbox that determines which controls should be displayed.

When i choose the dropdownitem that show the RadEditor, i get a javascript error 5 times: Error: Object expected

When i choose the dropdownitem that show the RadTreeView, i get a javascript error 4 times: Error: 'Telerik.Web.UI.RadTreeView' is null or not an object

When I work without the updatepanel, there is no problem. But it's much nicer with the updatepanel, so i'd like to keep it ...

Can you help me please?

Thanks !
Rumen
Telerik team
 answered on 04 Sep 2009
1 answer
482 views
Hi all
I have searched quite a bit to find an answer to this problem.
My scenario is WCM and i have followed the RadEditor For Moss included help file telling me to
In the config file:
<property name="AllowScripts">True</property>
In the layoutpage (articleleft.aspx in this scenario) opened in SharePoint Designer - i have changed the <PublishingWebcontrols:RichHTMLField ... with the <radE:RadHtmlfield.... and in that very control set the  AllowSpecialTags="True"

Now while the editor leaves the <script language="javascript">function xx(){alert("Hello world");}</script> uppon publishing it still strips my call for the xx function wich i try to call from a button <button onClick="xx">Click Me</button> - the "onClick=xx" has simply been stripped uppon publishing the pageinstance. This is also true for a <a href="javascript:xx()"... as well.

What do i do wrong? I think i have set all the props right according to the instructions provided by telerik?

I might ad that the problem dosnt occur in the webpart wich seems to accept any wich javascript code and functioncalls i want to use. BUT... i need to insert script in the WCM so...? please help.
Per Hoyer Stensnaes
Top achievements
Rank 1
 answered on 04 Sep 2009
1 answer
114 views
Hi,

I just read on this link http://www.telerik.com/help/aspnet-ajax/tooltip_tooltipmanageroverview.html  that by just putting RadToolTipManager on the page, all the existing controls having tooltips will be converted to RadToolTip. 
Do we have to also add all of our controls to the TargetControls collection of tooltipManager or not ? as we want to apply RadToolTip on all of our controls. 
But this is what not happening right now. 
Any help....

Regards,
Haris
Georgi Tunev
Telerik team
 answered on 04 Sep 2009
13 answers
785 views
RE: 102 Telerik RadControls
Lab: External Streamer Pages


I followed the steps in the tutorial for moving the RadCombox into a user control but cannot get it to function. It works fine in the previous lab when the RadComboBox is on the aspx page directly.

A break point show me that the function RadComboBox1_ItemsRequested
in CountryStreamer.aspx never gets hit .

Am I missing something ?




public

partial class CountryStreamer : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void RadComboBox1_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)

{

DataTable dt = FetchMatchingCountries(e.Text);

RadComboBox combo = (RadComboBox)o;

combo.Items.Clear();

foreach (DataRow row in dt.Rows)

{

RadComboBoxItem item = new RadComboBoxItem(

row[

"Country"].ToString().ToLower());

item.Value = row[

"Code"].ToString();

combo.Items.Add(item);

}

}

private DataTable FetchMatchingCountries(string partialName)

{

string mdbPath = Server.MapPath("~/App_Data/Combobox.mdb");

OleDbConnection dbCon = new OleDbConnection(

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdbPath);

dbCon.Open();

string sql = "SELECT * from CountryCodes WHERE Country LIKE '" +

partialName.Replace(

"'", "''") + "%'";

OleDbDataAdapter adapter = new OleDbDataAdapter(sql, dbCon);

DataTable dt = new DataTable();

adapter.Fill(dt);

dbCon.Close();

return dt;

}

}

----------------------------------------------------------

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="CountryStreamer.aspx.cs" Inherits="CountryStreamer" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<

head runat="server"><title>Untitled Page</title></head>

<

body><form id="form1" runat="server"><div>

Start typing a Country Name:

<telerik:RadComboBox ID="RadComboBox1" runat="server"

AllowCustomText="True" EnableLoadOnDemand="True"

MarkFirstMatch="True" HighlightTemplatedItems="True"

ItemRequestTimeout="200" Width="150px"

OnClientItemsRequesting="RadComboBox1_ItemsRequested">

</telerik:RadComboBox></div></form></body></html>

-------------------------------------------------------------

public partial class CountryPicker : System.Web.UI.UserControl

{

protected void Page_Load(object sender, EventArgs e)

{

}

}

------------------------------------------------------

<%

@ Control Language="C#" AutoEventWireup="true" CodeFile="CountryPicker.ascx.cs" Inherits="CountryPicker" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadComboBox ID="RadComboBox1" runat="server"

AllowCustomText="True" EnableLoadOnDemand="True" MarkFirstMatch="True"

Width="150px" ItemRequestTimeout="200" HighlightTemplatedItems="True"

ExternalCallBackPage="~/CountryStreamer.aspx">

</

telerik:RadComboBox>

-----------------------------------------

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<%

@ Register TagPrefix="uc1" TagName="CountryPicker" Src="~/CountryPicker.ascx" %>

<

head runat="server"><title>Untitled Page</title></head>

<

body><form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<div>
<uc1:CountryPicker ID="cpPicker" runat="server" />
</
div></form></body></html>

 

Atanas Korchev
Telerik team
 answered on 04 Sep 2009
4 answers
99 views
Just recently after installing the latest ASP AJAX controls, Visual Studio has started to rewrite some of the aspx code depending on which Telerik control I happen to have selected in design view.

For example,  'telerik:AjaxSetting' has been rewritten as 'telerik.web.ui.ajaxsetting'. Once this has happended, the page won't build and the design view object won't render.

Can you suggest why this has started to happen as it take some time to make all the corrections, particularly for a complex RadGrid.

Regards,
Jonathan
Jonathan
Top achievements
Rank 1
 answered on 04 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?