Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
162 views
Hi all:

I currently have the very basics set up with using the ComboBox that also allows users to select multiple items using a checkbox.  Code below:
<telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="myDS"
    DataTextField="fullname" DataValueField="id" oncopy="return false;" onpaste="return false;"
                    oncut="return false;" onkeypress="return tabOnly(event)" onmousewheel="return false"
                    OnClientDropDownOpening="OnClientDropDownOpening" OnClientDropDownClosing="OnClientDropDownClosing"
                    OnClientSelectedIndexChanging="OnClientSelectedIndexChanging" OnClientBlur="OnClientBlur"
                    Width="200px" AllowCustomText="True" ChangeTextOnKeyBoardNavigation="False">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# Eval("fullname") %>' Checked="true"/>
                    </ItemTemplate>
</telerik:RadComboBox>
As you can see, by default ALL of the checkboxes are checked.  Not what I want/need.  For the life of me I can't seem to figure out how to bind my data.  Below is the sqldatasource I'm using for this list, which pulls ALL options, which is what I want, but when a user edits information, I want the items that should be selected... selected.
<asp:SqlDataSource ID="myDS" runat="server"
    ConnectionString="<%$ ConnectionStrings:myconnection %>"
    SelectCommand="SELECT DISTINCT contacts.id, contacts.fullname FROM contacts ORDER BY fullname">
</asp:SqlDataSource>
The query that pulls the "selected" contacts should look like this:
SELECT id, areaID, contactID FROM area_contact_map WHERE areaID = 6 AND (blnRemoved IS NULL OR blnRemoved = 0)
I've been reverse engineering all of the demos here on the site, but I can't seem to get this.  Any further help would be greatly appreciated.

Thanks,
TL
Terri-Lynn
Top achievements
Rank 1
 answered on 10 Nov 2011
4 answers
233 views
Hi,
I'm using a RadTextBox like so :
HTML:
<div class="MyClass">
<telerik:RadTextBox ID="txtCloseDateWeeks" runat="server"/>
</div>

CSS:
.MyClass span input
    {width:200px !important;}

I need to use this css structure for other controls within my divs, including making the radComboBoxes the same size as the RadTextBoxes.

As you probably know, when the  RadTextBox is rendered, it appears in the HTML as :


<span class="RadInput RadInput_Outlook" id="ctl00_ctl00_txtCloseDateWeeks_wrapper" style="white-space: nowrap;">
    <input name="ctl00_ctl00_txtCloseDateWeeks_text" class="riTextBox riEnabled" id="ctl00_ctl00_txtCloseDateWeeks_text" style="width: 125px;" type="text" size="20" _events="[object Object]" value="1"/>
    <input name="ctl00$ctl00$txtCloseDateWeeks" title="" class="rdfd_" id="ctl00_ctl00_txtCloseDateWeeks" style="width: 1px; height: 1px; overflow: hidden; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: -18px; margin-right: 0px; margin-bottom: 0px; margin-left: -1px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; visibility: hidden;" type="text" control="[object Object]" value="1"/>
    <input name="ctl00_ctl00_txtCloseDateWeeks_ClientState" id="ctl00_ctl00_txtCloseDateWeeks_ClientState" type="hidden" autocomplete="off"/>


The 1st <Input> tag seems to be the control on the page which correctly has a width of 200px

The 2nd <Input> tag is where the problem lies. This is also 200px (because of the CSS) but even though 
 overflow: hidden; visibility: hidden;
it still renders on the page - I can't see it until I analyse with a HTML viewer, but it's being rendered to the right of the textbox and pushing my <div> out by another 200px which of course totally screws up the rest of the layout.

The 3rd <Input> tag doesn't show on the page and has a property type="hidden"  This might be why.

In the attached image - you can see the blue line of the 2nd <input> tag

Help me, please !!!!!!
Kevin
Top achievements
Rank 2
 answered on 10 Nov 2011
3 answers
261 views
Hi,

I'm trying to set the header date formatting for the MonthView to not have a leading zero.

When I make the format change for the "first day" like this MonthView-FirstDayHeaderDateFormat="MMM d", the values are formatted correctly as Feb 1.

However, when I make the following format change for the remaining day headers: MonthView-DayHeaderDateFormat="d", it doesn't format the values as I would have expected (eg. 2). It instead formats the day headers as 02/02/2010.

Is there something I'm doing wrong?

Thanks,
Greg
Neil
Top achievements
Rank 1
 answered on 10 Nov 2011
2 answers
199 views
Hi,

I am wondering if you can provide globalization resourse file RadEditor.Dialogs.resx for Russian and Spanish languages. Standard installation of Telerik does not supply those cultures. Please advise.

Thanks! 
brian
Top achievements
Rank 1
 answered on 10 Nov 2011
2 answers
68 views
Hi all,

I'm having trouble with editor "past as text" functionality. After I click the "submit" button It does not paste any text when browsing with Internet Explorer IE9 (It works with Chrome). Other functionalities seems to work fine.

Any help would be appreciated. Thank you

Telerik.Web.UI.dll

Version
2009.1.527.35
Filipe
Top achievements
Rank 1
 answered on 10 Nov 2011
9 answers
152 views
Hello.  We've been using RadEditor Lite on our WSS 3.0 site for 2 years now.  It's been working great so far.  We're on the latest version (4.5.6).

Few days ago, we noticed that in FireFox 6, editing rich-text fields (and Wiki pages) in SharePoint does not fire up RadEditor any more.  The rich-text content is only editable in HTML code, same as would be the case if RadEditor Lite were not installed at all.  The same rich-text content works fine in Chrome, Safari, and IE, but not on FireFox 6.  Strangely, it works fine in FireFox 5 and lower versions, which but not FireFox 6.

Seeing how rapidly FireFox gets updated nowadays, maybe the problem will go away with the next FF update... But I thought I'd mention this here anyways, and see if there is POSSIBLY a quick fix of any kind.

Thanks!
Taylor
Top achievements
Rank 1
 answered on 10 Nov 2011
15 answers
324 views
In my project, for localization, I need to Rresponse.Redirect the page itself.
Once redirect the page, it will read one given XML file and generate TreeNode dynamicly through the querystring "locale".
But after redirect several times, the whole TreeView cannot be operated no longer although its nodes have displayed in browser.
This problem will occur in IE and Chrome. Firefox and Opera are good.
Plamen
Telerik team
 answered on 10 Nov 2011
1 answer
100 views
Hello,

I have a page with a grid and some labels. On grid item command event (grid is ajax enabled with RadAjaxManager) I want to do some code and then return an alert with the results. The following code works (shows the alert) in IE, Chrome and Opera, but not in Firefox.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    DefaultLoadingPanelID="RadAjaxLoadingPanel1"
    onajaxrequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="MyGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="MyGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="MyGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="MyButton">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Label1" />
                <telerik:AjaxUpdatedControl ControlID="Label2" />
                <telerik:AjaxUpdatedControl ControlID="Label3" />
                <telerik:AjaxUpdatedControl ControlID="Label4" />
                <telerik:AjaxUpdatedControl ControlID="Label5" />
                <telerik:AjaxUpdatedControl ControlID="Label6" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

protected void MyGrid_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    if(e.CommandName == "MyCommand")
    {
        ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('StartupScript');", true); 
        RadAjaxManager1.ResponseScripts.Add("alert('ResponseScripts');");
    }
}

Any ideas?

Thanks in advance.
Marco
Top achievements
Rank 1
 answered on 10 Nov 2011
2 answers
142 views
This is the old sample, it works for me: 
http://demos.telerik.com/aspnet-classic/controls/examples/integration/aspnetajax/autosaveradeditor/defaultCS.aspx
    
Here are my steps
  1. In "Design View", I insert a "Textbox".
  2. Swith to "Preview", click the newly add Textarea, typein "abc".
  3. Swith to "Html" view, I can see my input was taken - it was changed to <INPUT style="WIDTH: 100px; HEIGHT: 22px" value=abc>


I tried same steps for the new sample, but I can not see "value=abc" added:
http://demos.telerik.com/aspnet-ajax/editor/examples/autosave/defaultcs.aspx

Please point to me what I missed (or it is a bug?), thanks for your help!

Stanley
Top achievements
Rank 1
 answered on 10 Nov 2011
1 answer
175 views
Hi,

I'm using a Radgrid in my web project, I'm having issues getting the Radgrid's height to size according to the content.
Basically I wish to have the radgrid take up full height and width of the page.
I need to use vertical and horizontal bars should it overflow and using static headers, as well as the columns to be inline with the header.

My page is within a masterpage and radgrid within an ajaxpanel, I have tried the radgrid within a table setting parent to 100% height & width 100%, as well as the ajaxpanel.

But still no luck at getting the desired outcome.
Any assistance would be greatly appreciated.

Thanks in advance.

(Below code I'm using)


      <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1" Height="100%">
              
       <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script type="text/jscript">
            function myRefreshGrid() {
                var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                masterTable.rebind();
            }


            function OnClientPageLoad(sender, args) {
                setTimeout(function() {
                    sender.set_status("");
                }, 0);
            }


            function RowDblClick(sender, eventArgs) {
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
            }


           
        </script>    
       </telerik:RadScriptBlock>

        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="odsSiteDetails" GridLines="None" ShowFooter="True" AllowFilteringByColumn="True" AutoGenerateColumns="False" Height="100%" Width="100%">
            <AlternatingItemStyle Wrap="False" /><ItemStyle Wrap="False" />
            <MasterTableView DataKeyNames="ID" DataSourceID="odsSiteDetails" TableLayout="auto" Width="100%">
                <CommandItemSettings ExportToPdfText="Export to Pdf" />
                <RowIndicatorColumn Visible="False"><HeaderStyle Width="40px" /></RowIndicatorColumn>
                <ExpandCollapseColumn><HeaderStyle Width="40px" /></ExpandCollapseColumn>
                <Columns>
                 <telerik:GridButtonColumn CommandName="Select" Text="Edit" UniqueName="cmdSelect"></telerik:GridButtonColumn>
                 <telerik:GridButtonColumn ButtonType="ImageButton" UniqueName="Charts" HeaderText="" CommandName="Charts" ImageUrl="~/Images/chart.png"></telerik:GridButtonColumn>
                 <telerik:GridBoundColumn ShowFilterIcon="True" autopostbackonfilter="True" currentfilterfunction="Contains" datafield="ID" datatype="System.Int32" filtercontrolalttext="Filter ID column" headertext="ID" readonly="True" sortexpression="ID" uniquename="ID" visible="False"></telerik:GridBoundColumn>
                 <telerik:GridBoundColumn ShowFilterIcon="True" autopostbackonfilter="True" currentfilterfunction="Contains" datafield="Description" filtercontrolalttext="Filter Site column" headertext="Site" sortexpression="Site" uniquename="Site"></telerik:GridBoundColumn>
                 <telerik:GridBoundColumn ShowFilterIcon="True" autopostbackonfilter="True" currentfilterfunction="Contains" datafield="Address" filtercontrolalttext="Filter Address column" headertext="Address" sortexpression="Address" uniquename="Address"></telerik:GridBoundColumn>
                 </Columns>
                <EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn></EditFormSettings>
            </MasterTableView>
            <GroupingSettings CaseSensitive="False" />
            <ClientSettings>
         <Scrolling AllowScroll="true" UseStaticHeaders="true"></Scrolling>
           </ClientSettings>
            <EditItemStyle Wrap="False" />
            <ActiveItemStyle Wrap="False" />
        </telerik:RadGrid>
       
        
</telerik:RadAjaxPanel>
      <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" Skin="Default">
          
                </telerik:RadAjaxLoadingPanel>
                
    
    <div>
        <telerik:RadWindowManager ID="RadWindowManager1" OnClientPageLoad="OnClientPageLoad" runat="server"></telerik:RadWindowManager>
    </div>
                     
        <asp:ObjectDataSource ID="odsSiteDetails" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="SelectSiteDetails" TypeName="site">
            <SelectParameters>
                <asp:Parameter DefaultValue="-1" Name="ID" Type="Decimal" />
            </SelectParameters>
        </asp:ObjectDataSource>
     
</asp:Content>

Pavlina
Telerik team
 answered on 10 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?