Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
154 views
hi ,
I have a Radgrid that work correctly with a 2 level details ,i have to add a "publipersonne" detail table to my  personne  table detail ()case n° 2 ) , the first case for first level is OK and the detail table is showed , the second case worked too and the datasource is affected ( i can see it in debugging ) but the web page show an error  :

There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.
my DataKeyNames is in the datasource and affected .
thank's for reply .



 

 

protected void GridPJ_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)

 

{

 

 

GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;

 

 

 

switch (e.DetailTableView.Name)

 

{

 

 

 

case "Personne":

 

{

 

 

 

string numcompte = dataItem.GetDataKeyValue("NumCompte").ToString();

 

 

 

//

 

e.DetailTableView.DataSource =

 

IHMProxy.SelectPersonneUSData(new CSSearchPersonne

 

{

NumCompte = numcompte

});

 

 

 

break;

 


}



 

 

case "publiPersonne" :

 

 

 

string numPersonne = dataItem.GetDataKeyValue("NUM_PERS").ToString();

 

 

 

//

 

 

 

int i = e.DetailTableView.DetailTables.Count;

 

 

e.DetailTableView.DataSource=

 

IHMProxy.selectPubliPersonne(numPersonne);

 

 

 

 

 

break;

 


}
Sofiene
Top achievements
Rank 1
 answered on 05 Apr 2012
1 answer
110 views
Hi,

I'm using the javascript to overide the displayMaxHTMLLengthErrorMessage

<script type="text/javascript">
 
    Telerik.Web.UI.RadEditor.prototype.displayMaxHTMLLengthErrorMessage = function () {
        alert("Hello!");
    }
</script>

Here is my Radeditor definition:

<telerik:RadEditor ID="myEditor" runat="server" StripFormattingOnPaste="AllExceptNewLines" Width="100%" MaxHtmlLength="2000" >  </telerik:RadEditor>



My problem is that I can't get the function to be override, I'm sttil getting the default telerik message: "The added HTML code exceeded the caracter.... ".  I don't get any error javascript message. Its just like I didn't declared nothing.


Why my javascript code is not overriding the default message?

Rumen
Telerik team
 answered on 05 Apr 2012
1 answer
185 views
Hello,

I have a radgrid where I need an old fashioned radio button in a column to allow the user to select the item on that row. I already have a column of checkboxes to allow user to select multiple rows for another purpose, so I suspect I cannot use "row select" properties of the grid. The checkboxes determine which items are used in a report, while the radio button's purpose is to select a single item  that is displayed in the report header.

I added a radbutton (Code below) to the grid, but when it runs, it allows me to check more than one radio button. How do I make it select only one?

Thanks!

 

 

<telerik:GridTemplateColumn UniqueName="DisplayInvoice" HeaderText="Select Display Invoice #"  

 

    HeaderStyle-Width="20%" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"

     ItemStyle-Width="20%" >

    <ItemTemplate>

        <telerik:RadButton ID="rbInvoiceDisplay" GroupName="grpInvoiceDisplay" AutoPostBack="false"

            ButtonType="ToggleButton" ToggleType="Radio" runat="server">

            <ToggleStates>

                <telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleRadioChecked" />

                <telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleRadio" />

            </ToggleStates>

        </telerik:RadButton>

    </ItemTemplate>

 /telerik:GridTemplateColumn>

 

Slav
Telerik team
 answered on 05 Apr 2012
1 answer
100 views
I am coming to the conclusion that doing a very simple thing, is not possible in Telerik RadGrid controls. Instead of saving time, im losing time and money.

This is what I want to do, and I need CLEAR WORKING examples please. No links to redirect somewhere. Just clear posted tested examples:

Lets have a simple data source which contains 2 string fields and 1 DateTime source.
I want to bind this to a RadGrid Control.

I want to display the datetime as per normal in the DateTime column.

I then want to use a DateTimePicker and only show the Date filter (no time).

I want to be able to filter on the Date given. However the control does NOT support Date filtering but only WITH time. This is not what I want hence the further customisation.

At this point, how can I either:

a) Invoke server side so I can tehn perform filtering on my data source and then rebind the grid showing the filtered values
b) use client side to obtain the selected date from the DateTimePicker control (DatePicker) and then filter it on the client side

Thanks.
Ahmed Ilyas
Top achievements
Rank 1
 answered on 05 Apr 2012
5 answers
194 views
Hi,
please tell me someone how i set height bar on 10 percent total height?
I have now in http://postimage.org/image/w474sir2t/ 

thank you
Evgenia
Telerik team
 answered on 05 Apr 2012
3 answers
74 views

i have a serious problem.

I have a combobox in a webform. everything works fine locally. When the project is published i can't click on the combobox to display the various items. It more or less looks like a basic textbox....

This is my code:

<html>
<head>
    <title></title>
    <style id="Style1" type="text/css" runat="server">
        td
        {
            vertical-align: top;
        }
        input.RadUploadSubmit
        {
            margin-top: 20px;
        }
 
        #RadUpload1
        {
            width: 355px;
        }
    </style>
    <script type="text/javascript">
 
        function CloseWindow() {
            var oManager = GetRadWindowManager();
            var oWnd = oManager.GetWindowByName("RadWindow1");
            oWnd.Close();
 
        }
 
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
 


        function CloseDialog() {
            GetRadWindow().close();
            return true;
 
 
        
 
    </script>
</head>
<body>
    <form runat="server" id="Form1">
    <%--method="post" enctype="multipart/form-data"--%>
    <div id="formulaire">
        <center>
            Ticket : <b>
                <asp:Label ID="TicketFamille" runat="server"></asp:Label></b></center>
                <asp:Label runat="server" ID="lblERROR" Visible="false"></asp:Label>
        <table cellpadding="5px" cellspacing="2px">
            <tr>
                <td width="200px" align='right'>
                    <asp:Label ID="lblTitre" runat="server" Text="Titre"></asp:Label>
                     :
                </td>
                <td>
                    <telerik:RadTextBox ID="txtTitre" runat="server" Skin="Telerik" Width="250">
                    </telerik:RadTextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                        ForeColor="Red" ControlToValidate="txtTitre" ValidationGroup="validationincident"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align='right'>
                    <asp:Label ID="lblCategorie" runat="server" Text="Concerne : "></asp:Label>
                </td>
                <td>
                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" AppendDataBoundItems="true"
                        OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" AutoPostBack="true">
                        <asp:ListItem Selected="True" Value="1">Projet</asp:ListItem>
                        <asp:ListItem Value="2">Sous-categorie</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td align='right'>
                    <asp:Label ID="lblSousCategorie" runat="server" Text="Sous Categorie :"></asp:Label>
                </td>
                <td>
                    <telerik:RadComboBox ID="cbSousCategorie" runat="server" Skin="Telerik">
                    </telerik:RadComboBox>
                </td>
            </tr>
            <tr>
                <td align='right'>
                    <asp:Label ID="lblProjet" runat="server" Text="Projet : "></asp:Label>
                </td>
                <td>
                    <telerik:RadComboBox ID="cbProjet" runat="server" DataTextField="nomProjet" DataValueField="idProjet"
                        Skin="Telerik">
                    </telerik:RadComboBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                        ForeColor="Red" ControlToValidate="cbProjet" ValidationGroup="validationincident"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align='right'>
                    <asp:Label ID="lblDescription" runat="server" Text="Description : "></asp:Label>
 
                </td>
                <td>
                    <telerik:RadTextBox ID="txtDescription" runat="server" TextMode="MultiLine" Width="250"
                        Height="100" Skin="Telerik">
                    </telerik:RadTextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*"
                        ForeColor="Red" ControlToValidate="txtDescription" ValidationGroup="validationincident"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align='right'>
                    Joindre un fichier :
                </td>
                <td>
                    <br />
                    <telerik:RadUpload ID="RadUpload1" runat="server" MaxFileInputsCount="5" Skin="Telerik">
                        <Localization Add="Ajouter" Clear="Vider" Delete="Supprimer" Select="Parcourir" />
                    </telerik:RadUpload>
                    <br />
                    <asp:Repeater ID="reportResults" runat="server" Visible="False">
                        <HeaderTemplate>
                            Fichiers attachés:<br />
                        </HeaderTemplate>
                        <ItemTemplate>
                            '<%#DataBinder.Eval(Container.DataItem, "FileName")%>' ( '<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>'
                            )<br />
                        </ItemTemplate>
                    </asp:Repeater>
                    <%--<asp:Button ID="buttonSubmit" CssClass="RadUploadSubmit" OnClick="buttonSubmit_Click"
        runat="server" Text="Joindre le fichier" />--%>
                    <br />
                    <%--<asp:Label ID="labelNoResults" runat="server" Visible="True">Pas de fichier joint pour le moment</asp:Label>--%>
                    <br />
                </td>
            </tr>
            </table>
        <asp:HiddenField runat="server" ID="HiddenFieldIdContact" />
                    <center><asp:Button ID="Button1" runat="server" Text="Soumettre ce ticket" OnClick="Button1_Click"
                        OnClientClick="if(Page_ClientValidate()) CloseDialog()" UseSubmitBehavior="false"
                        ValidationGroup="validationincident" /></center>
    </div>
    <center>
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
    </center>
    </form>
</body>
</html>
Thanks again for your help !!! 
NB: i have the same problem with the RadUpload control.

Dimitar Terziev
Telerik team
 answered on 05 Apr 2012
1 answer
104 views
We added text box in grid header, so user can change the grid header name but when we press the mouse to seleting the grid header text box text and then move mouse to out side the text box.   it thow java script error - "Microsoft JScript runtime error: 'offsetWidth' is null or not an object"
We have underneath seeting for RadGrid : -
 <telerik:RadGrid ID="grdAllTelerik"
                            ShowFooter="true" Skin="Office2010Silver"
                            runat="server" AutoGenerateColumns="false" Width="100%" OnItemCreated="grdAll_RowCreated"
                            OnItemDataBound="grdAll_ItemDataBound" OnNeedDataSource="grdAllTelerik_NeedDataSource">
    <ClientSettings>
        <Resizing AllowResizeToFit="true" ResizeGridOnColumnResize="true" AllowColumnResize="true">
        </Resizing>                                
    </ClientSettings>                           
</telerik:RadGrid> 

if(this._owner._owner._isResize){return;
}var h=Telerik.Web.UI.Grid.GetCurrentElement(g);
var f=Telerik.Web.UI.Grid.GetFirstParentByTagName(h,"th");    ---->  f is null
var a=Telerik.Web.UI.Grid.FindPosX(h);
var c=!!this._owner._owner.ClientSettings.AllowDragToGroup&&this._data.Groupable;
var d=!!this._owner._owner.ClientSettings.AllowColumnsReorder&&this.get_reorderable();
if(c||d){this.get_element().title=this._owner._owner.ClientSettings.ClientMessages.DragToGroupOrReorder;
this.get_element().style.cursor="move";
}if(this._owner._owner.ClientSettings.Resizing.AllowColumnResize&&this.get_resizable()&&Telerik.Web.UI.Grid.GetEventPosX(g)>=(a+f.offsetWidth-5)&&!Telerik.Web.UI.Grid._moveHeaderDiv){this._canDragDrop=false;
}if(this._owner._owner.ClientSettings&&this._owner._owner.ClientSettings.Resizing.AllowColumnResize&&this.get_resizable()&&this.get_element().tagName.toLowerCase()=="th"){var h=Telerik.Web.UI.Grid.GetCurrentElement(g);
if(this._owner._owner.GridDataDiv&&!this._owner._owner.GridHeaderDiv&&!window.netscape){var b=0;
Pavlina
Telerik team
 answered on 05 Apr 2012
5 answers
336 views
I saw in my account today that user's permissions in Telerik licenses can be setup such that the support tickets can be shared. 
I didn't find anywhere how to share the tickets though. 

Is there a knowledge base article regarding this?

Pratik
Georgi Tunev
Telerik team
 answered on 05 Apr 2012
0 answers
85 views
Hi i have 2 websites..in one hosting i have wwroot folder where telerik controls are working properly
whereas in my other hosting server they have given as httpdocs & there telerik controls are not working

could anyone please tell me how to install telerik controls in httpdocs server
Asma
Top achievements
Rank 1
 asked on 05 Apr 2012
1 answer
66 views
Hi there.
I've used Rad grid in my project and I have a problem with Hierarchical grid.
I have 3 hierarchies in my grid like this:

level-1
--------Level-2
-----------------Level-3

so as I read this link: http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx
all of data will be bind once.
I want to bind my SP by click
for instance I have my Level-1 which is bind in form_Load.
after clicking on + I want to fire my second SP to expand Level-2.
and after click on + in Level-2,I want to fire 3rd SP to expand Level-3.
I don't want to bind all of SPs once (I mean in form_load).
any idea?
Tsvetina
Telerik team
 answered on 05 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?