Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
178 views
Is there any way to view rad tree nodes just in leaves?
I wrote this code but all nodes was checkbox.
<telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="True"/> 

Mahdi
Top achievements
Rank 1
 answered on 17 Sep 2009
1 answer
187 views
Dear Support,

I have created a custom class that inherits from FileBrowserContentProvider and have implemented all the neccesary methods.  I sometimes require to reject an uploaded file in the StoreFile method due to some business logic but was not able to figure how that could be implemented. Returning a non-empty string and throwing an exception did not work well. Since the class inherited from FileBrowserContentProvider has no access to the Page-derived class, I am not able to add an Error to the page. 

Could you please help in directing me to a neat solution to my problem?


Thanks in advance,

Omtara
Fiko
Telerik team
 answered on 17 Sep 2009
1 answer
165 views
Hi,
I am using RadComboBox with item template of checkboxes as described in the demo:
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx

I am setting the checked items using javascript. this code works perfectly on all browsers but IE6. in IE6 the checkboxes are not checked.

Has anybody encoutered such problem?

This is my javascript code:

function onCheckBoxClick(chk) {  
 
            var combo = $find("<%=cmbExt.ClientID %>");  
 
            //holds the text of all checked items  
            var text = "";  
            //holds the values of all checked items  
            var values = "";  
            //get the collection of all items  
            var items = combo.get_items();  
 
            //enumerate all items  
            for (var i = 0; i < items.get_count(); i++) {  
                var item = items.getItem(i);  
                //get the checkbox element of the current item  
                var chk1 = $get(combo.get_id() + "_i" + i + "_chk1");  
                if (chk1.checked) {  
                    text += item.get_text() + ", ";  
                    values += item.get_value() + ",";  
                }  
            }  
            //remove the last comma from the string  
            text = removeLastComma(text);  
            values = removeLastComma(values);  
 
            var extValues = document.getElementById("<%= hiddenExtensions.ClientID %>");  
            extValues.value = values;  
            var ExtValuesHiddenField = document.getElementById("<%=ExtValuesHiddenField.ClientID %>");  
            ExtValuesHiddenField.value = values;  
 
            if (text.length > 0) {  
                //set the text of the combobox  
                combo.set_text(text);  
                combo.ToolTip = text;  
            }  
            else {  
                //all checkboxes are unchecked  
                //so reset the controls  
                if (items.get_count() == 0) {  
                    var HiddenFieldNoExtensionsString = document.getElementById("<%=HiddenFieldNoExtensionsString.ClientID %>");  
                    combo.set_text(HiddenFieldNoExtensionsString.value);  
                }  
                else {  
                    var HiddenFieldSelectExtensionsString = document.getElementById("<%=HiddenFieldSelectExtensionsString.ClientID %>");  
                    combo.set_text(HiddenFieldSelectExtensionsString.value);                   
                }  
            }  
        }  
 
        //this method removes the ending comma from a string  
        function removeLastComma(str) {  
 
            return str.replace(/, $/, "");  
        }  
 
        function ExtensionsComboClientLoad(sender) {  
 
            var extValues = document.getElementById("<%= hiddenExtensions.ClientID %>");  
 
            var ExtValuesHiddenField = document.getElementById("<%=ExtValuesHiddenField.ClientID %>");  
            ExtValuesHiddenField.value = extValues.value;  
 
            var combo = $find("<%=cmbExt.ClientID %>");  
 
            //get the collection of all items  
            var items = combo.get_items();  
 
            var text = "";  
 
            if (extValues != null && extValues.value != null && extValues.value != "") {  
 
                var ext_array = extValues.value.split(", ");  
 
                for (var j = 0; j < ext_array.length; j++) {  
 
                    //enumerate all combo items  
                    for (var i = 0; i < items.get_count(); i++) {  
 
                        var item = items.getItem(i);  
                        //get the checkbox element of the current item  
                        var chk1 = $get(combo.get_id() + "_i" + i + "_chk1");  
 
                        var itemitemValue = item.get_value();  
                        if (itemValue == ext_array[j]) {  
                            chk1.checked = true;  
                            text += item.get_text() + ", ";  
                        }  
                    }  
                }  
            }              
              
            if (text.length > 0) {  
                //remove the last comma from the string  
                text = removeLastComma(text);  
 
                //set the text of the combobox  
                combo.set_text(text);  
                combo.ToolTip = text;  
 
            }  
            else {  
                if (items.get_count() == 0) {  
                    var HiddenFieldNoExtensionsString = document.getElementById("<%=HiddenFieldNoExtensionsString.ClientID %>");  
                    combo.set_text(HiddenFieldNoExtensionsString.value);  
 
                }  
                else {  
                    var HiddenFieldSelectExtensionsString = document.getElementById("<%=HiddenFieldSelectExtensionsString.ClientID %>");  
                    combo.set_text(HiddenFieldSelectExtensionsString.value);  
 
                }  
            }  
        } 

Thanks is advance,
Ruth
Yana
Telerik team
 answered on 17 Sep 2009
3 answers
115 views
Hi,

I link an external CSS file to an Editor from codebehind:

NLtext.CssFiles.Add("~/" & TablePrefixStrip & "/css/telerik.css")

This works OK, the stylesheet is coupled.
But when I try to select classes from this sheet and add it with

NLtext.CssClasses.Add("Links class ", ".link")

it cannot find the classes. I think this problem occurs when a stylesheet is coupled which lies above the root of our CMS.

But even when I try

NLtext.CssFiles.Add("http://f2p-server:8136/css/telerik.css")
NLtext.CssClasses.Add("Links class", ".MarLeft")

It is not working.

Please assist, TIA

Marc
Rumen
Telerik team
 answered on 17 Sep 2009
1 answer
92 views
I have a telerik grid control and use in-place editing. Since telerik does not support checkboxlist columns, I want to popup a small window with a checkboxlist and a close button when the user clicks on a cell that requires the user to select multiple items. When the close button on the popup is hit, I want to populate the cell with a comma separated list of choices selected. Is this possible and is there an example that I can look into for doing this?

Thanks
Shanthala
Princy
Top achievements
Rank 2
 answered on 17 Sep 2009
2 answers
81 views
Hello,
I am using Q1 2009 DLL,

My problem is, I can view Advanced form pop-up by setting modal property to true.
But when I create template for insert/ edit, I cant view them in Pop-up.
Why is it so ??

Please provide solution

Thank You!!!
Ashish Sapkale
Top achievements
Rank 1
 answered on 17 Sep 2009
1 answer
103 views
I am using the form decorator and in IE8 I see my buttons on the page and then they blink into the skinned version. In IE7 the blink happens faster, but it's still there... I have just finished installing the lastest version of rad controls, hoping that would fix my issue - it does not. The odd thing is that on your demo page, the buttons don't show at first then the skinned versions appear. I looked at the source, and it doesn't look like your doing anything special to hide them in code behind or HTML. The only forum posts I can find on the subject are from 2008 so I'm not clear if this is a generally accepted issue or not. I have fixed the padding issue using css, but I still have the blinks. Help.

Chris
Martin
Telerik team
 answered on 17 Sep 2009
1 answer
64 views
Hi,
     Greetings. We are using Telerik Treeview with check box functionality. We need to make some Ajax calls when we uncheck the check box for doing some validations. Can you please provide me with some code sinppets on how to achieve that functionality.

Thanks
Hemangajit
Shinu
Top achievements
Rank 2
 answered on 17 Sep 2009
1 answer
174 views
Dear Telerik Team,
Thank you for your support .
I use RadGrid with popup edit form.Its works fine.My issue is when I set modal=TRUE for popup, the whole window greys out.I search this topic in forum.but the answer doesn't works.please advise me to handle this sitution.Thanks in advance.Hope the best solution from you soon.Below is the code.HereWith I also attach the screenshot of my situation.I didn't  use any grouping or scrolling in my grid.

 var popUp;  
   function PopUpShowing(sender, eventArgs)  
   {  
       popUp = eventArgs.get_popUp();  
       var windowHeight = document.body.offsetHeight;  
       var windowWidth = document.body.offsetWidth;  
       var popUpWidth = popUp.style.width.substr(0,popUp.style.width.indexOf("px"));  
       var popUpHeight = popUp.style.height.substr(0,popUp.style.height.indexOf("px"));  
       popUp.style.left = (Math.floor((windowWidth - popUpWidth)/2)-10).toString() + "px";  
       popUp.style.top = (Math.floor((windowHeight - popUpHeight)/2)).toString() + "px";  
   }  

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>

           
            <telerik:RadGrid  ID="RadGrid1" runat="server" Skin="Vista" Style="left: 16px; position: absolute;
                top: 112px" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" GridLines="None" AllowAutomaticUpdates="false" AutoGenerateEditColumn="false">
                <MasterTableView ClientDataKeyNames="sno" DataKeyNames="sno" EditMode="PopUp"  DataSourceID="SqlDataSource1">
               
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton">
                        <ItemStyle CssClass="MyImageButton" />
                       
                        </telerik:GridEditCommandColumn>
                                       <telerik:GridBoundColumn DataField="companyname" EditFormColumnIndex="0" HeaderText="Company Name" UniqueName="companyname" ColumnEditorID="GridTextBoxColumnEditor1" Visible="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="firstname" EditFormColumnIndex="0" HeaderText="First Name" UniqueName="firstname" ColumnEditorID="GridTextBoxColumnEditor2">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="lastname" EditFormColumnIndex="0" HeaderText="Last Name" UniqueName="lastname" ColumnEditorID="GridTextBoxColumnEditor3">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="worktitle" EditFormColumnIndex="0" HeaderText="Work Title" UniqueName="worktitle" ColumnEditorID="GridTextBoxColumnEditor4">
                        </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="department" EditFormColumnIndex="1" HeaderText="Dept" UniqueName="department" ColumnEditorID="GridTextBoxColumnEditor8">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="businessphone" EditFormColumnIndex="1" HeaderText="Off. Phone" UniqueName="businessphone" ColumnEditorID="GridTextBoxColumnEditor5">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="cellphone" EditFormColumnIndex="1" HeaderText="Mobile" UniqueName="cellphone" ColumnEditorID="GridTextBoxColumnEditor6">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="decisionrole" EditFormColumnIndex="0" HeaderText="Decision Role" UniqueName="decisionrole" Visible="false" ColumnEditorID="GridTextBoxColumnEditor7">
                        </telerik:GridBoundColumn>
                      
                        <telerik:GridBoundColumn DataField="homephone" EditFormColumnIndex="1" HeaderText="Home Phone" UniqueName="homephone" Visible="false" ColumnEditorID="GridTextBoxColumnEditor9">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="email"  EditFormColumnIndex="1" HeaderText="Email" UniqueName="email">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="sno" HeaderText="S.No" ReadOnly="true" UniqueName="sno" Visible="False">
                        </telerik:GridBoundColumn>
                    </Columns>
                   <EditFormSettings PopUpSettings-Modal="true"  ColumnNumber="2" PopUpSettings-Height="200px" PopUpSettings-Width="400px">

                   <EditColumn UniqueName="EditCommandColumn1">
                  
                   </EditColumn>
                   </EditFormSettings>
                  
                </MasterTableView>
                <ClientSettings >
               <ClientEvents OnPopUpShowing="PopUpShowing" />
                    <Selecting AllowRowSelect="True"  />
                    <Scrolling AllowScroll="false"/>
                </ClientSettings>
            </telerik:RadGrid>


Shinu
Top achievements
Rank 2
 answered on 17 Sep 2009
2 answers
120 views

Hi,

I am using telerik radgrid “RadControls ASPNET AJAX 2009” .  Everything is ok with grid when I use IE6 and IE7 but when I user IE8 I get the problem of overlapping of data to other columns. Please  provide me solution whether it’s a browser compatibility issue or something I have done wrong.

brijendra gtm
Top achievements
Rank 1
 answered on 17 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?