Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
477 views
I have a radlistbox that is located in a html table. To center the radlistbox on the page I have the <td style="text-align:center"> but by doing this the bound list item's text are also centered in the radlistbox. How can I keep the radlistbox aligned center in the html table and also have the radlistboxitem's text left aligned?

<table>
    <tr>
        <td style="text-align:center">
            <telerik:RadListBox ...

Thanks,


Steve Holdorf

 
Magdalena
Telerik team
 answered on 01 Apr 2015
1 answer
136 views
I really want to try and use Rad HTML Chart for this, instead of just returning text.  it is a page to display Survey Responses.  Each response is a Likert Scale 1-4. I  need to display the averages of 7 questions in a single chart (because they are grouped similar questions)  Here's the problem.  Each question does have a "N/A" option which stores a NULL value in SQL so they are not calculated in the AVG or COUNT functions.

Question 1: 14 Responses, with a 3.75 AVG
Question 2: 12 Responses, with a 3.67 AVG
Question 3: 14 Responses, with a 2.00 AVG
Question 4: 13 Responses, with a 3.75 AVG
Question 5: 10 Responses, with a 2.00 AVG
etc.

I would like a single bar chart with each question a Column, showing the AVG, and the X-Axis label showing the # of responses per question that way we can justify the difference in number of responses.

Does that all make sense?

And here's my  problem; I don't know who to return the rows from SQL.  Do I return multiple rows and let ASP.NET do the AVERAGE and COUNT functions?  or do I make SQL do the calculations and only return 1 row with Col 1 = Question #1 COUNT, Col2 = Question #1 AVG, Col3 = Question #2 COUNT, Col4, Question #2 AVG, etc.

Or do I return 2 datasets, one with AVG and one with COUNT?

PLEASE HELP


Danail Vasilev
Telerik team
 answered on 01 Apr 2015
1 answer
39 views
Any ideas on adding a new row to a RadGrid with the bound RadComboBox un-selected and displaying the EmptyMesage.
<ItemTemplate>
<telerik:RadComboBox ID="cboCoverSectionImageType" Width="230px" runat="server" SelectedValue='<%# Eval("IMAGE_TYPE_ID") %>'
DataSourceID="ObjectDSPropertyImageTypes" DataTextField="Image_Type_Name" DataValueField="Image_Type_ID"  
EmptyMessage="Click here & select page">
</telerik:RadComboBox>
</ItemTemplate>


ImageMasterInfo objNewImageInfo = new ImageMasterInfo();
objNewImageInfo.IMAGE_ID = 0;
objNewImageInfo.IMAGE_PROPERTY_ID = this.PropertyID;
objNewImageInfo.IMAGE_TYPE_ID = -1;
objNewImageInfo.IMAGE_PATH = string.Empty;
objNewImageInfo.IMAGE_THUMB_PATH = string.Empty;
lstSectionCoverImages.Add(objNewImageInfo);
 
RadGridCoverSectionImages.DataSource = lstSectionCoverImages;
RadGridCoverSectionImages.DataBind();

Eyup
Telerik team
 answered on 01 Apr 2015
1 answer
85 views
Here is my code
 <telerik:RadAutoCompleteBox ID="racdBookingSource" Runat="server"   AllowCustomEntry="true">
                 </telerik:RadAutoCompleteBox>

 public static List<object> GetBookingSource()
        {
            CandFEntities context = new CandFEntities();
            return context.Bookings.GroupBy(p => p.Booking_Source).OrderBy(m => m.Key).Select(r => r.Key).ToList<object>();


        }


protected void Page_Load(object sender, EventArgs e)
        {
            racdBookingSource.DataSource = BookingDataManager.GetBookingSource();
            racdBookingSource.DataBind();
}


But when i try to enter data to text box its raise error with sum asci data


Ivan Danchev
Telerik team
 answered on 01 Apr 2015
1 answer
84 views
Hello

I have a simple RadGrid inside of a div with a few bound columns, and I've hooked up the ClientExportManager to export the contents of the div (which is basically just the RadGrid).  Everything inside of the grid seems to export properly except for one column.  That column is a GridRatingColumn, and I expected on the export to see the stars displayed in the PDF, but that column is empty on the exported PDF.

Is there anything that would prevent the Export Manager from being able to handle this?

Thanks!
Peter Filipov
Telerik team
 answered on 01 Apr 2015
1 answer
156 views
Work on vs2012 web form project.Want to fill RadComboBox  treeview control  by json data. To fill the control I use bellow
C# syntax. 

DataSet ds =dwdb.ExecuteDataSet("sp_getItemGroupsList");
ItemGroups iG =new ItemGroups();        
//find the
treeview  RadTreeView tree =(RadTreeView)this.RadComboBox1.Items[0].FindControl("RadTreeView1");
tree.DataSource = ds;        
tree.DataBind();


Need syntax how to fill RadComboBox by json data on client site.
Peter Filipov
Telerik team
 answered on 01 Apr 2015
8 answers
894 views
Hi,

Is there any method that retrieves the SelectedNode object from the RadDropDrownTree object? 

Regards
Ivan Danchev
Telerik team
 answered on 01 Apr 2015
1 answer
140 views

I'd like to use autocomplete boxes set to text and limit to single entry. I have achieved this but I'm now trying to detect if the text entered is new. i.e. it is not an item that already exists in the database that populates the list.

In my case the select statement is against a table with less than 100 records. New values are permitted. The user types and the dropdown is filtered. The user can then select from a value or carry-on typing.

Can the control indicate
1.  If the value has been selected or typed.
2.  If typed then is this a new entry or an value that exists but was not selected.... sometimes our user will paste a value in directly which actually already exists in the list.

I need to be able to differentiate so that new values are added to a table when the form is saved.

Thanks

Dimitar Terziev
Telerik team
 answered on 01 Apr 2015
3 answers
169 views
Hi there,

I am trying to get the total items onto the footer at the bottom, however, I cannot make it when I do grouping based on a jobID.
I've attached my grid's look. It has got the each item's total, however, I want to have the last total at the bottom.
thank you

html code:
<telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid4" AllowFilteringByColumn="True" AllowSorting="True" runat="server" OnItemCommand="RadGrid4_ItemCommand" OnItemCreated="RadGrid4_ItemCreated" EnableLinqExpressions="false" HtmlEncode="true" OnNeedDataSource="RadGrid4_NeedDataSource" GroupingSettings-RetainGroupFootersVisibility="true"
                        ShowGroupPanel="True" CellSpacing="-1" GridLines="Both" Skin="Office2010Silver" EnableViewState="true" Width="100%">
                        <PagerStyle Mode="NextPrevAndNumeric" />
                        <GroupingSettings CaseSensitive="false" />
                        <ClientSettings AllowKeyboardNavigation="true">
                        </ClientSettings>
                        <ExportSettings OpenInNewWindow="true" FileName="i-Dispatch Job Part Used Report" ExportOnlyData="true">
                            <Pdf PageHeight="210mm" PageWidth="297mm" DefaultFontFamily="Arial Unicode MS" PageTopMargin="45mm"
                                BorderStyle="Medium" BorderColor="#666666" PaperSize="A4" >
                            </Pdf>
                        </ExportSettings>
                        <MasterTableView Width="100%" DataKeyNames="JobID" HierarchyLoadMode="ServerOnDemand" ShowGroupFooter="true" AllowMultiColumnSorting="true">
                            <Columns>
                                <telerik:GridMaskedColumn DataField="JobID" HeaderText="JobID#"
                                    FilterControlWidth="50px" AutoPostBackOnFilter="false" CurrentFilterFunction="EqualTo"
                                    FilterDelay="2000" ShowFilterIcon="false" Mask="#####" GroupByExpression="JobID Group By JobID">
                                    <ColumnValidationSettings>
                                        <ModelErrorMessage Text=""></ModelErrorMessage>
                                    </ColumnValidationSettings>
                                </telerik:GridMaskedColumn>
                                <telerik:GridBoundColumn DataField="JobTitle" FilterControlAltText="Filter JobTitle column" HeaderText="Job Title" SortExpression="JobTitle" UniqueName="JobTitle">
                                    <ColumnValidationSettings>
                                        <ModelErrorMessage Text="" />
                                    </ColumnValidationSettings>
                                </telerik:GridBoundColumn>
                                <telerik:GridDateTimeColumn DataField="JobBookedDate" PickerType="DatePicker" EnableTimeIndependentFiltering="true"
                                    DataFormatString="{0:dd/MM/yyyy HH:mm }" DataType="System.DateTime" FilterControlAltText="Filter JobBookedDate column" HeaderText="Job Booked Date" SortExpression="JobBookedDate" UniqueName="JobBookedDate">
                                    <ColumnValidationSettings>
                                        <ModelErrorMessage Text="" />
                                    </ColumnValidationSettings>
                                </telerik:GridDateTimeColumn>
                                <telerik:GridTemplateColumn DataField="AssignedStaffID" HeaderText="Mobile Staff" UniqueName="AssignedStaffID"
                                    HeaderStyle-Width="200px" SortExpression="AssignedStaffID">
                                    <FilterTemplate>
                                        <telerik:RadComboBox ID="comboStaff" DataTextField="StaffName"
                                            DataValueField="StaffID" Height="100px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("AssignedStaffID").CurrentFilterValue %>'
                                            runat="server" OnClientSelectedIndexChanged="StaffIndexChanged">
                                            <Items>
                                                <telerik:RadComboBoxItem Text="All" />
                                            </Items>
                                        </telerik:RadComboBox>
                                        <telerik:RadScriptBlock ID="RadScriptBlock10" runat="server">
                                            <script type="text/javascript">
                                                function StaffIndexChanged(sender, args) {
                                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                    tableView.filter("AssignedStaffID", args.get_item().get_value(), "EqualTo");
                                                }
                                            </script>
                                        </telerik:RadScriptBlock>
                                    </FilterTemplate>
                                    <ItemTemplate>
                                        <%# Eval("Staff") %>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn DataField="CreatedBy" HeaderText="Added By" UniqueName="CreatedBy"
                                    HeaderStyle-Width="200px" SortExpression="CreatedBy">
                                    <FilterTemplate>
                                        <telerik:RadComboBox ID="comboAdded" DataTextField="StaffName"
                                            DataValueField="StaffID" Height="100px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("CreatedBy").CurrentFilterValue %>'
                                            runat="server" OnClientSelectedIndexChanged="AddedByIndexChanged">
                                            <Items>
                                                <telerik:RadComboBoxItem Text="All" />
                                            </Items>
                                        </telerik:RadComboBox>
                                        <telerik:RadScriptBlock ID="RadScriptBlock11" runat="server">
                                            <script type="text/javascript">
                                                function AddedByIndexChanged(sender, args) {
                                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                    tableView.filter("CreatedBy", args.get_item().get_value(), "EqualTo");
                                                }
                                            </script>
                                        </telerik:RadScriptBlock>
                                    </FilterTemplate>
                                    <ItemTemplate>
                                        <%# Eval("AddedBy") %>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="PartCode" FilterControlAltText="Filter PartCode column" HeaderText="Part Code" SortExpression="PartCode" UniqueName="PartCode">
                                    <ColumnValidationSettings>
                                        <ModelErrorMessage Text="" />
                                    </ColumnValidationSettings>
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="PartName" FilterControlAltText="Filter PartName column" HeaderText="Part Name" SortExpression="PartName" UniqueName="PartName">
                                    <ColumnValidationSettings>
                                        <ModelErrorMessage Text="" />
                                    </ColumnValidationSettings>
                                </telerik:GridBoundColumn>
 
                                <telerik:GridNumericColumn DataFormatString="{0:$###,##0.00}" DataField="PartPurchasePrice" DataType="System.Double" NumericType="Currency"
                                    HeaderText="PurchasePrice" SortExpression="PartPurchasePrice" UniqueName="PartPurchasePrice" Aggregate="Sum" FooterAggregateFormatString="{0:C}">
                                    <FooterStyle Font-Bold="true"></FooterStyle>
                                </telerik:GridNumericColumn>
                                <telerik:GridNumericColumn DataFormatString="{0:$###,##0.00}" DataField="PartSalePrice" DataType="System.Double" NumericType="Currency"
                                    HeaderText="SalePrice" SortExpression="PartSalePrice" UniqueName="PartSalePrice" FooterText="Total:" Aggregate="Sum" FooterAggregateFormatString="{0:C}">
                                    <FooterStyle Font-Bold="true"></FooterStyle>
                                </telerik:GridNumericColumn>
                                <telerik:GridNumericColumn DataFormatString="{0:$###,##0.00}" DataField="JobPartUnitPrice" DataType="System.Double" NumericType="Currency"
                                    HeaderText="Unit Price" SortExpression="JobPartUnitPrice" UniqueName="JobPartUnitPrice" Aggregate="Sum" FooterAggregateFormatString="{0:C}">
                                    <FooterStyle Font-Bold="true"></FooterStyle>
                                </telerik:GridNumericColumn>
                                <telerik:GridNumericColumn DataField="JobPartQuantity" DataType="System.Double"
                                    HeaderText="Quantity" SortExpression="JobPartQuantity" UniqueName="JobPartQuantity" Aggregate="Sum" FooterAggregateFormatString="{0:n}">
                                    <FooterStyle Font-Bold="true"></FooterStyle>
                                </telerik:GridNumericColumn>
                                <telerik:GridNumericColumn DataFormatString="{0:$###,##0.00}" DataField="JobPartGST" DataType="System.Double" NumericType="Currency"
                                    HeaderText="JobPartGST" SortExpression="JobPartGST" UniqueName="JobPartGST" Aggregate="Sum" FooterAggregateFormatString="{0:C}">
                                    <FooterStyle Font-Bold="true"></FooterStyle>
                                </telerik:GridNumericColumn>
                                <telerik:GridNumericColumn DataFormatString="{0:$###,##0.00}" DataField="JobPartTotal" DataType="System.Double" NumericType="Currency"
                                    HeaderText="JobPartTotal" SortExpression="JobPartTotal" UniqueName="JobPartTotal" Aggregate="Sum" FooterAggregateFormatString="{0:C}">
                                    <FooterStyle Font-Bold="true"></FooterStyle>
                                </telerik:GridNumericColumn>
                            </Columns>
                            <GroupByExpressions>
                                <telerik:GridGroupByExpression>
                                    <GroupByFields>
                                        <telerik:GridGroupByField FieldName="JobID"></telerik:GridGroupByField>
                                    </GroupByFields>
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldName="JobID" HeaderText="JobID#"></telerik:GridGroupByField>
                                    </SelectFields>
                                </telerik:GridGroupByExpression>
                            </GroupByExpressions>
                        </MasterTableView>
                        <ClientSettings AllowDragToGroup="true">
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                        </ClientSettings>
                    </telerik:RadGrid>
Eyup
Telerik team
 answered on 01 Apr 2015
1 answer
99 views
I may be going about my solution the wrong way since I'm still quite a newb with Telerik Scheduler control. I am using the ajax + web service binding of appointments to the scheduler. I have two questions:
1. How do I get the new visible date range included in the new call to retrieve appointments? I am assuming that I can somehow get the new date range and set this in my ISchedulerInfo criteria object before the component issues a call to the GetAppointments(PortalSchedulerInfo schedulerInfo) web method;
2. Is it possible to manually maintain the list of appointments in the client for caching across navigations?
Plamen
Telerik team
 answered on 01 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?