Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
76 views
This is my first time trying out RadChart. I have a very simple chart (that followed the example in the documentation section):

<telerik:RadChart ID="RadChart1" runat="server" DefaultType="Line" />

The code behind does a simple database query:

SqlDataSource sqlDataSource = new SqlDataSource();
sqlDataSource.ID = "myDataSource";
sqlDataSource.ConnectionString = "<snip>";
sqlDataSource.SelectCommand = "select convert(varchar(10),SearchDate,101) as SearchDate, AverageSoldPrice from SearchResult where SearchId = 1 order by SearchDate";
this.Page.Controls.Add(sqlDataSource);
RadChart1.DataSourceID = "myDataSource";
RadChart1.Series[0].DataYColumn = "AverageSoldPrice";
RadChart1.PlotArea.XAxis.DataLabelsColumn = "SearchDate";
RadChart1.DataBind();

If I execute that line in the database, I get 30 rows back. However, when the chart is created, I only have the first 8 items shown, labeled 0 through 7. Why are the others missing, and how can I get the actually dates to be displayed?
Evgenia
Telerik team
 answered on 05 Apr 2012
4 answers
386 views
Hi!

I am able to modify the background image of the combobox using this css (images attached). However, we loose the hover and focus image (see results.png for the focus problem.)
 
How do I change the images for the various states? Thanks!

Michael
.radComboBox td.rcbInputCell
{
    background-image: url('/Images/ComboBoxSprite.png') !important;
}
.radComboBox table td.rcbArrowCell
{
    background: #ffffff url('/Images/ComboBoxDropDown.png') no-repeat -1px 50%;
}

Michael O'Flaherty
Top achievements
Rank 2
 answered on 05 Apr 2012
1 answer
177 views
Hi i am using the MaxHtmlLength and get the pop up telling me the content is over the limit, but the user can still submit the page. Is there a way i can check and stop them doing this?

Thanks,
Michael
Rumen
Telerik team
 answered on 05 Apr 2012
3 answers
236 views
Hi,

When I click the 'export to excel' icon, the grid flickers, and nothing happens. My code is like this:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="1000">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True" OnItemDataBound="RadGrid2_ItemDataBound"
        Width="100%" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True"
        OnInsertCommand="RadGrid2_InsertCommand" OnItemCommand="RadGrid2_ItemCommand"
        OnUpdateCommand="RadGrid2_UpdateCommand" GridLines="None" PageSize="100" AllowFilteringByColumn="True"
        DataSourceID="EntityConference" CellSpacing="0" OnDeleteCommand="RadGrid2_DeleteCommand">
        <ExportSettings FileName="ConferenceRegistrationApplications" 
            IgnorePaging="True">
            <Excel Format="ExcelML" />
        </ExportSettings>
        <MasterTableView EditMode="PopUp" CommandItemDisplay="Top" ItemStyle-VerticalAlign="Top"
            DataKeyNames="RegistrationId" CommandItemSettings-ShowExportToExcelButton="true" com >
            <ItemStyle VerticalAlign="Top" />
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton">
                    <HeaderStyle Width="3%" />
                </telerik:GridEditCommandColumn>               
               
                <telerik:GridBoundColumn HeaderText="Title" DataField="Title">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="FirstName" DataField="FirstName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Surname" DataField="Surname">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Organisation" DataField="Organisation">
                </telerik:GridBoundColumn>  
                  <telerik:GridTemplateColumn HeaderText="File">
                    <ItemTemplate>
                        <a href="" runat="server" id="AbstractLink">Open</a>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>            
                <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton"
                    ConfirmDialogType="RadWindow" ConfirmText="Are you sure to delete" ConfirmTitle="Notification">
                    <HeaderStyle Width="2%" />
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings InsertCaption="New Conference" CaptionFormatString="Edit - {0}" CaptionDataField="RegistrationId"
                EditFormType="Template">
                <EditColumn ButtonType="ImageButton" />
                <PopUpSettings Height="1200px" Width="700px" Modal="true" />
                <FormTemplate>
                    <table width="100%">                     
                        <tr>
                            <td>
                                <b>Title:</b>
                            </td>
                            <td>
                                <asp:DropDownList runat="server" DataSourceID="EntityTitles" DataValueField="TitleText"
                                    DataTextField="TitleText" ID="ddlTitles" AppendDataBoundItems="true">
                                    <asp:ListItem Text="-select-" Selected="True" Value="0"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>FirstName:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"   ID="TextBoxFirstName" Text='<%#Bind("FirstName") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Surname:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"   ID="tLastName" Text='<%#Bind("Surname") %>'></asp:TextBox>
                            </td>
                        </tr>
                          <tr>
                            <td>
                                <b>PreferedName:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox1" Text='<%#Bind("PreferedName") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Organisation:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="tOrganisation" Text='<%#Bind("OrganisationName") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Telephone:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="ttelephone" Text='<%#Bind("Telephone") %>'></asp:TextBox>
                            </td>
                        </tr>
                         <tr>
                            <td>
                                <b>Fax:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox2" Text='<%#Bind("Fax") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Mobile:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="tmobile" Text='<%#Bind("Mobile") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>EmailAddress:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="temail" Text='<%#Bind("EmailAddress") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>Profession:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox3" Text='<%#Bind("Profession") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>HPCSANumber:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox4" Text='<%#Bind("HPCSANumber") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>PostalAddress:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox5" Text='<%#Bind("PostalAddress") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>City:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox6" Text='<%#Bind("City") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Province:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox7" Text='<%#Bind("Province") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Country:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox8" Text='<%#Bind("Country") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>PostalCode:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox9" Text='<%#Bind("PostalCode") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>SpecialInstructions:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox10" Text='<%#Bind("SpecialInstructions") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Accompany_Title:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox11" Text='<%#Bind("Accompany_Title") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Accompany_FirstName:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox12" Text='<%#Bind("Accompany_FirstName") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Accompany_Surname:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox13" Text='<%#Bind("Accompany_Surname") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Accompany_SpecialInstructions:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox14" Text='<%#Bind("Accompany_SpecialInstructions") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>RegistrationType:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="TextBox15" Text='<%#Bind("RegistrationType") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>RegistrationFee:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox16" Text='<%#Bind("RegistrationFee") %>'></asp:TextBox>
                            </td>
                        </tr>           
                          <tr>
                            <td>
                                <b>PaymentMethod:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox17" Text='<%#Bind("PaymentMethod") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>TotalPaymentDue:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox18" Text='<%#Bind("TotalPaymentDue") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>Comments:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox19" Text='<%#Bind("Comments") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>AttendWelcomeFunction:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="TextBox20" Text='<%#Bind("AttendWelcomeFunction") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>AttendCelebrationDinner:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="TextBox21" Text='<%#Bind("AttendCelebrationDinner") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>Accompany_AttendWelcomeFunction:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox22" Text='<%#Bind("Accompany_AttendWelcomeFunction") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>Accompany_AttendCelebrationDinner:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox23" Text='<%#Bind("Accompany_AttendCelebrationDinner") %>'></asp:TextBox>
                            </td>
                        </tr>                
                          <tr>
                            <td>
                                <b>DaysRegistered:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox24" Text='<%#Bind("DaysRegistered") %>'></asp:TextBox>
                            </td>
                        </tr>              
                       
                    </table>
                    <table style="width: 100%">
                        <tr>
                            <td align="right">
                                <asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button>&nbsp;
                                <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                                </asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 05 Apr 2012
3 answers
121 views
How come I can't hit enter on the description field and be able to type in a new line? Is there a property that i need to set?
Plamen
Telerik team
 answered on 05 Apr 2012
2 answers
205 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
142 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
207 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
126 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
221 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?