Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
111 views
I've been trying to dynamically bind a list to the data source of a GridDropDownColumn in a detail table. I have manage to get it to mostly work, but it isn't binding the first row's cell. I've been using the code below in various radGrid1 subs, and I keep getting the same results. I believe that I'm binding the data source after the first row is created and bound, but where do i put it so I can bind the data source before the first one.

Thanks for any help.

If (e.Item.OwnerTableView.Name = "DetailTable") Then
 
    If _list Is Nothing Then
        _list = Managers.DataManager.LoadAll
    End If
 
    'set the data sourse
    If TypeOf e.Item Is GridDataItem Then
 
        If Not _IsBound Then
            Dim item As GridDropDownColumn = TryCast(e.Item.OwnerTableView.GetColumnSafe("ddcCondition"), GridDropDownColumn)
            Dim itemManager As GridDropDownColumnEditor = TryCast(item.ColumnEditor, GridDropDownColumnEditor)
            itemManager.DataSource = _list
            itemManager.DataBind()
            _IsBound = True
        End If
    End If
End If
Vasil
Telerik team
 answered on 01 Mar 2011
4 answers
204 views
Hi,

I have been using Menu ASP .NET RadControl from RadMenu.Net2.dll.
That worked fine.

Now, I'm trying to update this control with latest ASP .NET AJAX RadMenu control from Telerik.Web.UI.dll.

The requirements and exceptions came up to me as it will require ScriptManager before RadControl is used in the code and ScriptManager in turn requires Form Tag with RunAt server.

I have done that which lands me with this kind of exception.
System.ArgumentException: Script control 'xnaMenu' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl


Anybody has faced this similar problem? I do see similar exception reported on RadDock control and Telerik team provided another new dll as temporary solution. So, what was changed in the DLL? I would like to know if I can overcome same thing in my code, or I need new temporary DLL from telerik :)

Thanks,
Chirag
Helen
Telerik team
 answered on 01 Mar 2011
18 answers
473 views
I have seen several posts on this topic, but have not seen a solution that will work yet.  I want to add a linkbutton to my group header that will use data from the group header in the postback.

I have something like the following:

LinkButton lnk = new LinkButton();
lnk.ID = "lnkReservations";
lnk.Text = "View All";
lnk.CommandArgument = (DataRowView)item.DataItem["employer_id"].ToString();
lnk.Command += new CommandEventHandler(lnkReservations_Command);
item.DataCell.Controls.Add(lnk);

I have tried adding to the event handlers for PreRender, ItemCreated, ItemDataBound but have not been successful in any of those attempts in getting the linkbutton to behave correctly.

Is there a simple solution to add a linkbutton to a groupheader that will execute a function based on the data/header where the control sits?  Is there any kind of special column that I can add to turn a header into a linkbutton?
Kavya
Top achievements
Rank 2
 answered on 01 Mar 2011
6 answers
60 views
hi,

i created a grid for my project. But now i faced a GridDropDownColumn problem. What i done is i put a DataSourceID="SqlDataSource2"  in a GridDropDownColumn. when page load, i cant get first row data unless i refresh it through refresh button on MasterTableView. then for other record can display normally.

any helps is appreaciated. Thank you.

Best regards,
Nasri
Arteta Sam
Top achievements
Rank 1
 answered on 01 Mar 2011
10 answers
261 views
Hi Telerik Team,

I've implemented the MOSSRadEditor Placeholder for a client who is complaining about the slowness loading the page due to the RadEditor in Edit mode.  There can be as many as 10 placeholders on the page at once and the page loads really slowly as a result.

We want to try ContentAreaMode = 'Div' to see if it offers a speed improvement but we cannot find where to apply this setting.  With the RadEditor it is a simple attribute, but because we are using the MOSSRadEditor placeholder, we cannot set the "ContentAreaMode" property.

I also tried adding: <property name="ContentAreaMode">Div</property> to the config.xml file but this has no effect.

Is this attribute supported with the MOSSRadEditor?  If not, can you suggest things we might be able to do to speed up the loading of the RadEditor in Edit mode?  The client is nearly ready to pull the Editor altogether due to the speed issue.

Thanks
Obaid Ullah
Top achievements
Rank 1
 answered on 01 Mar 2011
1 answer
148 views
Hi,

In my application i wanted to use tabstrip with ten tabs. Once i appplied ScrollChildern="True".

1.Tab Scrolling is not working in Firefox/Google Crome
2. In Internet explorer i can see scrolling buttons but if i reach at 5th tab and if i hit button(Basically when page post back) Scrolling reverse button get disable.

I am attaching screenshots and code block. Let me know what i m doing wrong.

Thanks,
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TabStripScrollTest.aspx.cs" Inherits="RadControlsWebApp1.TabStripScrollTrest" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>TabStrip Scroll Test</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <telerik:RadScriptManager runat="server" ID="RadGridScriptManager">
                </telerik:RadScriptManager>
    <table width="100%" cellpadding="0px" border="1">
        <tr>
            <!-- Left Content Start-->
            <td valign="top" align="center" style="width:20%;border:1px solid #EEE;color:#666;">
                <div id="leftdiv" class="leftdivtitle">
                 
                </div>
                Left Contents goes here
            </td>
            <!-- Left Content End -->
            <!-- Right Content Start -->
            <td valign="top" style="width:20%;color:#EEE;">
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="pnlTab">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="radBtnBack" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="radBtnSkip" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="radBtnNext" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="radBtnFinish" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="radBtnBack">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="pnlTab" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="radBtnSkip">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="pnlTab" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="radBtnBack" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="radBtnSave">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="pnlTab" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="pnlViewAgreement" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="radBtnNext">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="pnlTab" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
                </telerik:RadAjaxManager>
                <asp:Panel runat="server" ID="pnlRightContent" Height="600px" ScrollBars="Auto" Style="position: relative;">
                    <asp:Panel runat="server" ID="pnlTab">
                        <asp:HiddenField ID="previousTabHidden" runat="Server" />
 
                         
 
                        <telerik:RadTabStrip ID="radTabStripCompanyRegistration" runat="server" MultiPageID="radMultiPageCompanyRegistration"
                            AutoPostBack="true" SelectedIndex="0" ScrollChildren="True"
                            Skin="WebBlue">
                            <Tabs>
                                <telerik:RadTab runat="server" Text="Company Info" PageViewID="radPageViewCompanyInfo"
                                    Font-Bold="True" Selected="True">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Addresses" PageViewID="radPageViewAddresses"
                                    Font-Bold="True">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Contacts" PageViewID="radPageViewContacts" Font-Bold="True">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Company Details" PageViewID="radPageViewCompanyDetails"
                                    Font-Bold="True">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Operating Areas" PageViewID="radPageViewOperatingAreas"
                                    Font-Bold="True">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Credit Details" PageViewID="radPageViewCreditDetails"
                                    Font-Bold="True">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Agreement" PageViewID="radPageViewAgreement"
                                    Font-Bold="True">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Insurance" PageViewID="radPageViewInsurance"
                                    Font-Bold="True">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Summary" PageViewID="radPageViewSummary" Font-Bold="True">
                                </telerik:RadTab>
                            </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage runat="server" ID="radMultiPageCompanyRegistration" SelectedIndex="0"
                            Width="100%">
                            <!-- Company Info Tab Start-->
                            <telerik:RadPageView runat="server" ID="radPageViewCompanyInfo" BorderColor="#666666"
                                BorderWidth="1px" Height="500px" Selected="true">
                                <asp:Panel runat="server" ID="pnlCompanyInfo" CssClass="companyregpanel">
                                    <%--  <uc1:CompanyInfo ID="CompanyInfo" runat="server" />--%>
                                </asp:Panel>
                            </telerik:RadPageView>
                            <!-- Company Info Tab End-->
                            <!-- Addresses Tab Start -->
                            <telerik:RadPageView runat="server" ID="radPageViewAddresses" BorderColor="#666666"
                                BorderWidth="1px" Height="500px">
                                <asp:Panel runat="server" ID="pnlAddresses" CssClass="companyregpanel">
                                    <%--<uc2:addresses id="Addresses" runat="server" />--%>
                                </asp:Panel>
                            </telerik:RadPageView>
                            <!-- Addresses Tab End -->
                            <!-- Contact Tab Start -->
                            <telerik:RadPageView runat="server" ID="radPageViewContacts" BorderColor="#666666"
                                BorderWidth="1px" Height="500px">
                                <asp:Panel runat="server" ID="pnlContacts" CssClass="companyregpanel">
                                    <%--<uc3:contacts id="Contacts1" runat="server" />--%>
                                </asp:Panel>
                            </telerik:RadPageView>
                            <!-- Contact Tab End -->
                            <!-- Company Details Tab Start -->
                            <telerik:RadPageView runat="server" ID="radPageViewCompanyDetails" BorderColor="#666666"
                                BorderWidth="1px" Height="500px">
                                <asp:Panel runat="server" ID="pnlCompanyDetails" CssClass="companyregpanel">
                               <%--     <uc4:companydetails id="CompanyDetails1" runat="server" />--%>
                                </asp:Panel>
                            </telerik:RadPageView>
                            <!-- Company Details Tab End -->
                            <!-- Operating Ares Tab Start -->
                            <telerik:RadPageView runat="server" ID="radPageViewOperatingAreas" BorderColor="#666666"
                                BorderWidth="1px" Height="500px">
                                <asp:Panel runat="server" ID="pnlOperatingAreas" CssClass="companyregpanel">
                                  <%--  <uc5:operatingareas id="OperatingAreas1" runat="server" />--%>
                                </asp:Panel>
                            </telerik:RadPageView>
                            <!-- Operating Ares Tab End -->
                            <!-- Credit Details Tab Start -->
                            <telerik:RadPageView runat="server" ID="radPageViewCreditDetails" BorderColor="#666666"
                                BorderWidth="1px" Height="500px">
                                <asp:Panel runat="server" ID="pnlCreditDetails" CssClass="companyregpanel">
                                   <%-- <uc6:creditdetails id="CreditDetails1" runat="server" />--%>
                                </asp:Panel>
                            </telerik:RadPageView>
                            <!-- Credit Details Tab End -->
                            <!-- Agreement Tab Start -->
                            <telerik:RadPageView runat="server" ID="radPageViewAgreement" BorderColor="#666666"
                                BorderWidth="1px" Height="500px">
                                <asp:Panel runat="server" ID="pnlViewAgreement" CssClass="companyregpanel">
                             <%--       <uc7:agreement id="Agreement1" runat="server"></uc7:agreement>--%>
                                </asp:Panel>
                            </telerik:RadPageView>
                            <!-- Agreement Tab End -->
                            <!-- Insurance Tab Start -->
                            <telerik:RadPageView runat="server" ID="radPageViewInsurance" BorderColor="#666666"
                                BorderWidth="1px" Height="500px">
                                <asp:Panel runat="server" ID="pnlInsurance" CssClass="companyregpanel">
                                  <%--  <uc8:insurance id="Insurance1" runat="server"></uc8:insurance>--%>
                                </asp:Panel>
                            </telerik:RadPageView>
                            <!-- Insurance Tab End -->
                            <!-- View Summary Tab Start -->
                            <telerik:RadPageView runat="server" ID="radPageViewSummary" BorderColor="#666666"
                                BorderWidth="1px" Height="500px">
                                <asp:Panel runat="server" ID="pnlSummary" CssClass="companyregpanel" Height="460px"
                                    ScrollBars="Vertical">
                                   <%-- <uc9:summary id="Summary1" runat="server"></uc9:summary>--%>
                                </asp:Panel>
                            </telerik:RadPageView>
                            <!-- View Summary Tab End -->
                        </telerik:RadMultiPage>
                    </asp:Panel>
                    <hr style="color: #333; clear: both;" />
                    <table>
                        <tr>
                            <td align="center">
                                <telerik:RadButton ID="radBtnComment" runat="server" Text="View/Add Comments" ButtonType="LinkButton"
                                    AutoPostBack="False" BackColor="White" BorderColor="White" UseSubmitBehavior="false"
                                    ForeColor="#5b7993">
                                </telerik:RadButton>
                            </td>
                            <td>
                                 </td>
                            <td>
                                <telerik:RadButton ID="radBtnBack" runat="server" Text="Back" Width="50px" Visible="false"
                                   >
                                </telerik:RadButton>
                            </td>
                            <td>
                                 </td>
                            <td>
                                <telerik:RadButton ID="radBtnSkip" runat="server" Text="Skip" Width="50px" >
                                </telerik:RadButton>
                            </td>
                            <td>
                                 </td>
                            <td>
                                <telerik:RadButton ID="radBtnSave" runat="server" Text="Validate" Width="50px" >
                                </telerik:RadButton>
                            </td>
                            <td>
                                 </td>
                            <td>
                                <telerik:RadButton ID="radBtnNext" runat="server" Text="Next" Width="50px"
                                    UseSubmitBehavior="False">
                                </telerik:RadButton>
                            </td>
                            <td>
                                 </td>
                            <td>
                                <telerik:RadButton ID="radBtnFinish" runat="server" Text="Finish" Width="50px" UseSubmitBehavior="False"
                                    Visible="False">
                                </telerik:RadButton>
                            </td>
                            <td>
                                <asp:HiddenField ID="hdnCompanyId" runat="server" Value="0" />
                            </td>
                        </tr>
                    </table>
                    <div id="CompRegDiv" class="bigModule" visible="false" runat="server">
                        <table id="tblError" runat="server" visible="true">
                            <tr>
                                <td colspan="5">
                                    <div class="bigModuleBottom">
                                        <asp:Label ID="lblWarning" runat="server" Text="" CssClass="requiredsign"></asp:Label>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:Panel>
                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
                </telerik:RadAjaxLoadingPanel>
                <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
                    <Windows>
                        <telerik:RadWindow ID="CompanyCommentWindow" runat="server" Title="Company Comments"
                            Width="765" Height="500" Behaviors="close" />
                    </Windows>
                </telerik:RadWindowManager>
            </td>
            <!-- Right Content End -->
        </tr>
    </table>
    </div>
    </form>
</body>
</html>

Kamen Bundev
Telerik team
 answered on 01 Mar 2011
4 answers
89 views
I'm playing with your automaticspell example (see http://www.telerik.com/community/forums/aspnet-ajax/spell/outlook-like-functionality.aspx), and it works just great!  I've modified the example slightly so it's invoked from an ASP ImageButton click instead of the onblur event of a textbox.  So far, so good.

Now what I'd like to do is have multiple buttons invoke the spellCheck script, and the results of the callback depend on which button was clicked.  One way I was thinking of doing this would be to have different callbacks for each of the buttons, and change to the appropriate one for the spellService.add_complete.  Is there a way to remove a callback from the get_spellCheckService?
Henry
Top achievements
Rank 1
 answered on 01 Mar 2011
1 answer
146 views
Hello,

I've been searching the forums and found some similar topics but I still can't get it to work so I thought I'd post my own to see what I'm doing wrong.

My situation is simple, I have a ComboBox and I want the dropdown to have checkboxes, as I understand there is no easy way to just add a checkbox to a ComboBox, instead I have to use the ItemTemplate.

At the moment I have a class that uses the ITemplate, it has a InstantiateIn method and there it gets the "dynamic" data from a DB.

It looks something like this, don't mind the extra code it's still very early and just trying to get things to work:

public void InstantiateIn(Control container)
        {
            object[] searchoptions = GetProxy().GetSearchOptionList();
            DataSet so = (DataSet)searchoptions[0];
            List<SearchOption> searchOpt = new List<SearchOption>();
            for (int k = 0; k < so.Tables.Count; k++)
                for (int j = 0; j < so.Tables[k].Rows.Count; j++)
                {
                    SearchOption search = new SearchOption();
                    search.ID = so.Tables[k].Rows[j].ItemArray[0].ToString();
                    search.name = so.Tables[k].Rows[j].ItemArray[1].ToString();
                    searchOpt.Add(search);
                    CheckBox box = new CheckBox();
                    box.Text = search.name;
                    box.ID = search.ID;
                    box.DataBinding += new EventHandler(box_DataBinding);
                    container.Controls.Add(box);
                }
}

It simply loops over it and takes out all the data, and attaches a Eventhandler

private void box_DataBinding(object sender, EventArgs e)
        {
            CheckBox target = (CheckBox)sender;
            RadComboBoxItem item = (RadComboBoxItem)target.BindingContainer;
            string itemText = (string)DataBinder.Eval(item, "Text");
            target.Text = itemText;
        }

But this doesn't work, the biggest problem is that I don't really get it myself why I have to go on with Templates and all this, I just want a dropdown with checkboxes, so maybe I'm overcomplicating things here or maybe I just don't understand.

Any help is welcome.
Helen
Telerik team
 answered on 01 Mar 2011
1 answer
1.2K+ views
Hi All,

I tried the below code to display the date and time(24 hrs)... the time part not working wht i need..

<asp:TextBox ID="txt_date2" runat="server"></asp:TextBox>
<telerik:RadInputManager ID="RadInputManager1" runat="server">
  <telerik:DateInputSetting BehaviorID="DateInputBehavior3"  DateFormat="dd/MM/yyyy HH:mm">
             
            <TargetControls>
                <telerik:TargetInput ControlID="txt_date2"  />
            </TargetControls>
        </telerik:DateInputSetting>
 
</telerik:RadInputManager>

I want like, suppose the user type 24 in txtbox, on tab out automatically the txtbox should display  '24/02/2011 19:55"
the time should be also take in 24hs format ....Please give me solution to do this task...

Thanks
Tsvetina
Telerik team
 answered on 01 Mar 2011
2 answers
94 views

Hoping someone can direct me down the correct path.  Trying to have a Treeview control on a page where users can use the checkbox feature on the fields they would like queried out of the database. 

This is what I have: Category (6 categories)
Group Desc (to many to list)
Friendly Column Name (to many to list)

See attached image of the data that I return from SQL.

I would like
    Category
        Group Desc
            Friendly Name (datatextfield = QualifiedName)

When attempting to get it working I get several different errors.  Currently the error is

These columns don't currently have unique values.


<telerik:radtreeview id="RadTreeView1" runat="server" checkboxes="True" datafieldid="Category"
            datafieldparentid="GroupDescr" datasourceid="SqlDataSource1" datatextfield="FriendlyName" DataValueField="QualifiedName"></telerik:radtreeview>
Joe Riley
Top achievements
Rank 1
 answered on 01 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?