Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
193 views
Hi there,

can you please give me a hint (or better some code example *g*) how to remove elements like the foldertree, the url-field and the button to create new folders (as you can see on the screenshot I attached)?

I know how to remove those elements from the FileExplorer but the ImageManager seems to be another component than the FileExplorer but with a similar look.

Thank you very much!

Greetings from Germany.
Ricky Mattischeck
Ricky Mattischeck
Top achievements
Rank 1
 answered on 08 Jan 2010
1 answer
109 views
Hi,

I have a treeview menu which implements a context menu.

When this is initially loaded the context menu works fine and executes the contextmenuclick event just fine, this then reloads the page as expected - however once reloaded the context menu no longer fires the event?  Should I look at rebinding this to the client side event or is there a quick fix?

This page is implemented in DNN without an ajax manager.

Thanks,
Lee
Dimitar Milushev
Telerik team
 answered on 08 Jan 2010
1 answer
187 views

Hello,

We are using Latest Telerik dll version "2009.3.1103.35".

We have Radgrid and use Cleint side inline Row deleting functionality.

We have set "OnRowDeleting" and "OnRowDeleted" Attributes to fire respective methods.It was working fine in previous versions ,but not now.

I have read somewhere that "RowDeleted" and "RowDeleting" events are replaced by "RowChanged" and "RowChanging" events,is that true?

And if Yes, Kindly provide us demo code / Project to achive above functionality...


Code :

 

 

 

<telerik:RadGrid ID="radGridSupplierDetails" Height="250px" runat="server" GridLines="None"

 

 

 

 

 

 

PageSize="200" AutoGenerateColumns="False" EnableEmbeddedSkins="False" EnableViewState="False">

 

 

 

 

 

 

<ClientSettings EnableRowHoverStyle="true" >

 

 

 

 

 

 

<Selecting AllowRowSelect="true" />

 

 

 

 

 

 

<ClientEvents OnCommand="radGridSupplierDetails_Command" OnRowClick="RowSupplierDblClick"

 

 

 

 

 

 

OnRowDeleting="SupplierRowDeleting" OnRowDeleted="RowDeletedSupplier" OnRowMouseOver="OnRowMouseOver_radGridSupplierDetails"/>

 

 

 

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="false">

 

 

 

 

 

 

</Scrolling>

 

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

 

<FilterMenu EnableEmbeddedSkins="False">

 

 

 

 

 

 

</FilterMenu>

 

 

 

 

 

 

<SortingSettings SortedBackColor="BurlyWood" />

 

 

 

 

 

 

<HeaderContextMenu EnableEmbeddedSkins="False">

 

 

 

 

 

 

</HeaderContextMenu>

 

 

 

 

 

 

<MasterTableView ClientDataKeyNames="No" CssClass="RadGrid_Web20" EditMode="InPlace"

 

 

 

 

 

 

TableLayout="Fixed" Width="95%">

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Serial_Number" Display="false" HeaderStyle-HorizontalAlign="Center"

 

 

 

 

 

 

HeaderText="SrNo" ItemStyle-HorizontalAlign="Center" SortExpression="Serial_Number"

 

 

 

 

 

 

UniqueName="Serial_Number">

 

 

 

 

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="SupplierId" HeaderStyle-HorizontalAlign="Right"

 

 

 

 

 

 

HeaderStyle-Width="80px" HeaderText="SupplierId" ItemStyle-HorizontalAlign="Right"

 

 

 

 

 

 

Display="false" SortExpression="SupplierId">

 

 

 

 

 

 

<HeaderStyle HorizontalAlign="Center" Width="100px" />

 

 

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="SupplierName" HeaderStyle-HorizontalAlign="Right"

 

 

 

 

 

 

HeaderStyle-Width="80px" HeaderText="Supplier" ItemStyle-HorizontalAlign="Right"

 

 

 

 

 

 

SortExpression="SupplierName">

 

 

 

 

 

 

<HeaderStyle HorizontalAlign="Center" Width="80px" />

 

 

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ContactName" HeaderStyle-HorizontalAlign="Right"

 

 

 

 

 

 

HeaderStyle-Width="50px" HeaderText="Contact" ItemStyle-HorizontalAlign="Right"

 

 

 

 

 

 

SortExpression="ContactName">

 

 

 

 

 

 

<HeaderStyle HorizontalAlign="Center" Width="75px" />

 

 

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Email" HeaderStyle-HorizontalAlign="Right" HeaderStyle-Width="0px"

 

 

 

 

 

 

HeaderText="Email" ItemStyle-HorizontalAlign="Right" SortExpression="Email">

 

 

 

 

 

 

<HeaderStyle HorizontalAlign="Center" Width="75px" />

 

 

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Address" HeaderStyle-HorizontalAlign="Right"

 

 

 

 

 

 

HeaderStyle-Width="80px" HeaderText="Address" ItemStyle-HorizontalAlign="Right"

 

 

 

 

 

 

SortExpression="Address">

 

 

 

 

 

 

<HeaderStyle HorizontalAlign="Center" Width="80px" />

 

 

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="CommentToSupplier" HeaderStyle-HorizontalAlign="Left"

 

 

 

 

 

 

HeaderText="Comment" ItemStyle-HorizontalAlign="Left" SortExpression="CommentToSupplier">

 

 

 

 

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Notes" Display="True" HeaderStyle-HorizontalAlign="Left"

 

 

 

 

 

 

HeaderText="Note" ItemStyle-HorizontalAlign="Left" SortExpression="Notes">

 

 

 

 

 

 

<HeaderStyle HorizontalAlign="Center" Width="80px"/>

 

 

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridClientDeleteColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow"

 

 

 

 

 

 

ConfirmText="Are you sure you want to delete this row?" HeaderStyle-Width="25"

 

 

 

 

 

 

ImageUrl="../../Images/Delete.gif" ItemStyle-Width="25">

 

 

 

 

 

 

<HeaderStyle Width="25px" />

 

 

 

 

 

 

<ItemStyle Width="25px" />

 

 

 

 

 

 

</telerik:GridClientDeleteColumn>

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

<EditFormSettings>

 

 

 

 

 

 

<EditColumn CancelImageUrl="Cancel.gif" EditImageUrl="Edit.gif" InsertImageUrl="Update.gif"

 

 

 

 

 

 

UpdateImageUrl="Update.gif">

 

 

 

 

 

 

</EditColumn>

 

 

 

 

 

 

</EditFormSettings>

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

</telerik:RadGrid>


Functions :

 

 

 

 

// event fires after Row Deleted - Supplier Grid

 

 

 

 

 

 

function RowDeletedSupplier(sender, args) {

 

 

 

 

 

//this function is empty but its compulsory as this is a bug from telrik

 

 

 

 

 

 

//Known issue the Grid will miss a row after delete a row if this function is not defined.

 

 

 

 

 

}

 


 

 

//Delete row from grid. - Supplier Grid

 

 

 

 

 

function SupplierRowDeleting(sender, args) {

 

 

 

 

 

var editedRow = args.get_itemIndexHierarchical();

 

 

var item = args.get_gridDataItem();

 

 

var strSupplierId = "";

 

 

var objArrParts = JSON.parse(jsonStringSupplier);

 

 

var objArrPartsDeleted = ""; //To store the element which needs to be deleted.

 

 

 

 

 

 

if (item != null) {

 

strSupplierId = sender.get_masterTableView().getCellByColumnUniqueName(item,

"Serial_Number").innerHTML;

 

document.getElementById(

"<%= hdnLabelSupplierSerialNumber.ClientID%>").innerHTML = sender.get_masterTableView().getCellByColumnUniqueName(item, "Serial_Number").innerHTML;

 

}

 

for (var i = 0; i < objArrParts.length; i++) {

 

 

if ((objArrParts[i].Serial_Number) == strSupplierId) {

 

objArrPartsDeleted = objArrParts[i];

objArrParts.splice(i, 1);

}

}

jsonStringSupplier =

"";

 

jsonStringSupplier = JSON.stringify(objArrParts);

setSupplierDelete();

}


any help will be highly appreciated..

 

 

 

 

 


Thanks,
Ajay Khedekar 

 

Pavel
Telerik team
 answered on 08 Jan 2010
1 answer
159 views
Hi,
I am using Panelbar for left menu. and using web20 latest skin. I have bullets in the items of the panelbwr (screenshot attached). I have large space between the bullet image  and the ietm text. I need to reduce it and also i need to reduce the space between the left barder and the bullet. I have overwritten the css and finally my UI looks like attached screenshot. i tried the follg but not worked for me.

RadPanelBar_Web20.rpText
{
    padding-left:0px !important;
    padding-right:0px !important;
}
Thanks,
Jeevitha
Yana
Telerik team
 answered on 08 Jan 2010
1 answer
171 views
If I write OnNodeCheck="lstBisogno_NodeCheck" when I check start postback.
I don't try AutoPostBack property.

It's possible associate function on OnNodeCheck (OnNodeCheck="lstBisogno_NodeCheck") but not have a automatic PostBack ?

Thanx
Schlurk
Top achievements
Rank 2
 answered on 08 Jan 2010
1 answer
109 views
Hey I'm trying to make the Editor upload a selected file to two different places on the server.
So the file will exsist in two different places on the server, the two directories will be the same at all times.

For example, I already have the ImageManager.UploadPaths set in the codebehind but I need to set this to two directories instead of just one.
Can someone help with this please???
Thanks!
Rumen
Telerik team
 answered on 08 Jan 2010
1 answer
177 views
This all works fine on the first click, it fixes all the typos for all available texboxes.

When I click spellcheck a second time an error in the ScriptResource.axd where this.get_element() is null.  Any ideas what I can do to fix this problem. It seems to be my only hangup

Web.Config:

      <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" /> 
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" /> 
 

MasterPage:

<telerik:RadSpell ID="RadSpellControl" runat="server" ButtonType="None" SupportedLanguages="en-US,English" /> 
<asp:Button ID="Button1" runat="server" Text="SpellCheck" OnClientClick="return StartSpellCheck();" 

Javascript:

    <script type="text/javascript"
        function MultipleTextboxSource(sources) { 
            this._sources = sources; 
            this.get_text = function() { 
                var texts = []; 
                for (var i = 0; i < this._sources.length; i++) { 
                    texts[texts.length] = this._sources[i].get_text(); 
                } 
                return texts.join("<controlSeparator><br/></controlSeparator>"); 
            } 
            this.set_text = function(text) { 
                var texttexts = text.split("<controlSeparator><br/></controlSeparator>"); 
                for (var i = 0; i < this._sources.length; i++) { 
                    this._sources[i].set_text(texts[i]); 
                } 
            } 
        } 
        function StartSpellCheck() { 
         
            var radSpell = $find('ctl00_ctl00_RadSpellControl'); 
            var textboxes = $(':text'); 
            var HtmlElementSources = []; 
            for (var i = 0; i < textboxes.length; i++) { 
                HtmlElementSources[i] = new Telerik.Web.UI.Spell.HtmlElementTextSource($get(textboxes[i].id)); 
            } 
            radSpell.set_textSource(new MultipleTextboxSource(HtmlElementSources)); 
            radSpell.startSpellCheck(); 
            return false; 
        } 
        function SetLanguage(e) { 
            ee = e || window.event; 
            var target = e.target || e.srcElement; 
            var radSpell = GetRadSpell('ctl00_ctl00_RadSpell1'); 
            radSpell.DictionaryLanguage = target.value; 
        } 
    </script> 

Error (on line 93, this.get_element() is null)

87 this.set_element({value:""}) 
88 }else{if(b.nodeName=="IFRAME"&&b.contentWindow!=null {this.set_element(b.contentWindow.document.body) 
89 }}b=null 
90 },dispose:function(){this._element=null
91 Telerik.Web.UI.Spell.HtmlElementTextSource.callBaseMethod(this,"dispose") 
92 },get_text:function(){var d=""; this.get_element() is null 
93 if(this.get_element().value!=null){try{d=this.get_element().value 
94 }catch(c){alert("Error getting text from control.\n"+c.message) 
95 }}else{if(this.get_element().innerHTML!=null {try{d=this.get_element().innerHTML 
96 }catch(c){alert("Error getting HTML from the control.\n"+c.message) 
97 }}else{alert("No value or innerHTML attribute. Cannot access text.") 
98 }}return d  



Rumen
Telerik team
 answered on 08 Jan 2010
2 answers
579 views
I have a web page where I display the versions of dlls which are deployed in our different environments -- how do I get the version/build # in c# for the telerik web.ui dll.

Thanks,
Todd.
Todd A
Top achievements
Rank 1
 answered on 08 Jan 2010
4 answers
386 views

I seem to be having a problem when I have a RadAjaxPanel that contains a submit button. Whenever that submit button is click, Page_load gets fired twice. First time around IsPostBack is false, then it gets call the second time around where IsPostBack is true. When I took that button outside of the RadAjaxPanel, then IsPostBack is working properly.

In otherwords, i need to have a way of differentiating if it's a Ajax Request.
Please advice.

In my aspx page, i have the following sample:-

<telerik:RadAjaxPanel runat="server" ID="RadTestPanel" Width="100%">  
<asp:Button ID="btnTest" runat="server" Text="Add" Font-Names="Calibri" 
                                                            Width="60px" OnClick="btnTest_Click" /> 
</telerik:RadAjaxPanel> 

Now in my code behind i have the following...
protected override void Page_Load(object sender, EventArgs e)  
{  
  if (!this.IsPostBack) //Problem lies here such that it's always false when click within the RadAjaxPanel and get's called twice. Why is that?  
  {  
    DoSomeFirstTimeInitialization();  
  }  


Stanley
Top achievements
Rank 1
 answered on 08 Jan 2010
1 answer
142 views
2 ComboBoxes in a Form:

                        <telerik:RadComboBox ID="ClientCB" DataSourceID="ClientList" DataTextField="Client"

                            DataValueField="ClientKey" AppendDataBoundItems="true" runat="server" Skin="Outlook"

                            Width="250px" AutoPostBack="true"

                            onselectedindexchanged="ClientCB_SelectedIndexChanged">

                        </telerik:RadComboBox>


                        <telerik:RadComboBox ID="UsrCB" DataSourceID="TrainUserList" DataTextField="FullName"

                            DataValueField="ID" AppendDataBoundItems="true" runat="server" Skin="Outlook"

                            Width="250px" AutoPostBack="true" onselectedindexchanged="UsrCB_SelectedIndexChanged">

                        </telerik:RadComboBox>


I want a selection in the ClientCB to force the UsrCB to reload with new data. Here are the DataSources:

    <asp:SqlDataSource ID="ClientList" runat="server" ConnectionString=""

        SelectCommand="Generic_ClientList" SelectCommandType="StoredProcedure">

    </asp:SqlDataSource>

    <asp:SqlDataSource ID="TrainUserList" runat="server" ConnectionString=""

        SelectCommand="Train_TrainUserList" SelectCommandType="StoredProcedure">

        <SelectParameters>

            <asp:Parameter DefaultValue="0" Name="ClientKey" Type="Int32" />

        </SelectParameters>

    </asp:SqlDataSource>


This is my server side code:

    protected void ClientCB_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)

    {

        TrainUserList.SelectParameters["ClientKey"].DefaultValue = e.Value;

        

        RadComboBox ThisCB = o as RadComboBox;

        RadComboBox TUsrCB = ThisCB.Parent.FindControl("UsrCB") as RadComboBox;

        TUsrCB.DataBind();

    }


Everything looks to be right but the data in the UsrCB never changes. I KNOW the proc works because I have an initial set of data in it. But it never changes.

?????????

Joe B





Genady Sergeev
Telerik team
 answered on 08 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?