Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
1.6K+ views
Hi 

Is it possible for the RadDateTimePicker to display and select the hours and minutes separately?
Marin Bratanov
Telerik team
 answered on 11 Jun 2019
6 answers
989 views
I cannot see to figure out how to force a RadComboBox to requery for its list of items client-side.

One solution I tried was to surround the RadComboBox with a RadAjaxPanel (by the way when I do that the VS parser claims that RadComoBox is not a known element even though the solution compiles and runs fine.). In addition, I wired up the ItemsRequested event to populate the control. Then on the client side I call something like:
var combo = $find("<%=this.MySpiffyCombo.ClientID %>"); 
combo.requestItems(); 
 

Another solution I tried was to use RadAjaxManager (which would be my preferred choice) where the AjaxControlID on the AjaxSetting and its only AjaxUpdatedControl item's ControlID are both set to the RadComboBox. Then on the client I tried:
var ajaxManager= $find("<%=this.RadAjaxManager1.ClientID %>"); 
ajaxManager.ajaxRequest("foo"); 

Which did not fire on the server. Then I tried:
var ajaxManager = $find("<%=this.RadAjaxManager1.ClientID %>"); 
ajaxManager.ajaxRequestWithTarget("<%=this.MySpiffyCombo.UniqueID %""");  

I also tried wiring up the AjaxRequest event on the RadAjaxManager and again it did not fire.

What am I missing here? What is the Hoyle technique for ajax-ifying a RadComboBox and forcing a ajax refresh of its items?

jroughgarden
Top achievements
Rank 1
 answered on 10 Jun 2019
7 answers
1.0K+ views

I have a radhtmlchart using BarSeries with one data series.  The data is sourced from a linq query, not generated directly in codebehind like the demo for colorizing bars shows.  What I would like to do is colorize the bars depending on a second value in the results of the query.

The top of the chart code is straightforward.  I'm leaving out non-relevant code but let me know if there's something else you need to see.

            <telerik:RadHtmlChart ID="BarChart1" runat="server">
                <PlotArea>
                    <Series>
                        <telerik:BarSeries DataFieldY="DailyGrossQty" Name="Daily Gross Qty" Visible="true" Stacked="false" gap=".4" spacing="0.4">
                            <Appearance>
                                <FillStyle BackgroundColor="#145e8e"></FillStyle>
                            </Appearance>
                        </telerik:BarSeries>

 

The linq query is also straightforward:

            var x = from Z in db.spDailyData(ReportDate)
                    select Z;

           BarChart1.DataSource = x.OrderByDescending(o => o.DailyGrossQty).Take(25);

There is another field in the stored procedure called 'Division' and I would like to conditionally color the bars based on the value there, overriding the default.

What would be the simplest approach to that?

Thanks.

-Dan

 

 

Vessy
Telerik team
 answered on 10 Jun 2019
3 answers
308 views
Hey guys,

I am using LoadOnDemand throughout this app in all my RadComboBox instances... Here is an example...

 

<telerik:RadComboBox ID="rcProject" Runat="server" AllowCustomText="false"

 

 

 

AutoPostBack="True" EmptyMessage="Type a Project Name"

 

 

 

EnableLoadOnDemand="True" EnableVirtualScrolling="True" Filter="StartsWith"

 

 

 

Height="22px" MaxHeight="200px" OnItemsRequested="rcProject_ItemsRequested"

 

 

 

ShowMoreResultsBox="true"

 

 

 

ToolTip="You can type or scroll and select. What you type, must exist in the list"

 

 

 

Width="200px">

 

 

 

</telerik:RadComboBox>

 

 


My issue is that once a value is selected in this combobox, once the user clicks on the combobox to select another item... the previously selected item is the only thing showing up in the list... because of the item selected is a match...

I have tried to clear the text, value of the combobox in the rcProject_ItemsRequested event handler but not able to get it to clear... The text is still there. Could you help me with a client side workaround? I have seen some other posts but unable to implement anything, I keep getting Object is null...

Thanks much,

Sergiu Pascutiu
Dave
Top achievements
Rank 1
 answered on 07 Jun 2019
1 answer
138 views

In the Radscheduler I have the grid divided every 30 minutes. but if for example I have a 2-hour appointment, it fills the slot with a single appointment. How do I leave the 30-minute split even when entering long appointments?

 

Peter Milchev
Telerik team
 answered on 07 Jun 2019
2 answers
716 views

How can I set the border style of the row on HoverRow?

I can set the back color no problem.

But, any change to the border does not seem to have any effect.

 

In<ClientSettings> of grid I set EnableRowHoverStyle="true" 

 

Then is style section I have css:

<style type="text/css">
         div.RadGrid .rgHoveredRow
         {
           background-color:#ff0000 !important;  /* this works */
           border-width:thick !important;    /* no effect */
           border-right-color:black !important;/* no effect */
         }    
    </style>

Attila Antal
Telerik team
 answered on 07 Jun 2019
2 answers
616 views

     I have a user control with a RadGrid in my applicaiton.

 

The RadGrid fills properly by binding a datatable to the grid.  It shows properly on the screen with data.

 

Once I try to Sort or group, I am getting this error:

 

Any suggestions would be appreciated.  I am on Version 2019.2.514.40 of Telerik asp.net controls.

 

Unable to cast object of type 'ASP.masterpages_main_master' to type 'Telerik.Web.UI.GridTableView'.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidCastException: Unable to cast object of type 'ASP.masterpages_main_master' to type 'Telerik.Web.UI.GridTableView'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: 

[InvalidCastException: Unable to cast object of type 'ASP.masterpages_main_master' to type 'Telerik.Web.UI.GridTableView'.] Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +3585 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9884270 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639

 

Thanks,

 

Rog

Vessy
Telerik team
 answered on 07 Jun 2019
13 answers
821 views
Hi
  I am building a web application which contains list of grids in different area's. All have export options working fine but there is one grid which Export blank CSV even there is record. I have tried every possible option  but no output. Any help would be appreciated. this is the HTML code.

 

<telerik:RadGrid ID="radGridSelectUser" runat="server" Skin="Office2007"

 

 

AutoGenerateColumns="false" AllowPaging="true" AllowSorting="true"

 

 

AllowMultiRowSelection="true" Width="99%" >

 

 

<GroupingSettings CaseSensitive="false" />

 

 

<ExportSettings OpenInNewWindow="true">

 

 

<Pdf FontType="Link" PaperSize="A4" />

 

 

<Excel Format="Html" />

 

 

<Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" />

 

 

</ExportSettings>

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="true" />

 

 

</ClientSettings>

 

 

 

<MasterTableView >

 

 

<PagerTemplate>

 

 

<!-- This is my custom footer-->

 

 

 

 

 

<uc1:gridFooter ID="gridFooter" runat="server" />

 

 

</PagerTemplate>

 

 

<Columns>

 

 

<telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" DataField="Username" SortExpression="Username" FilterControlWidth="95%" >

 

 

<ItemTemplate>

 

 

<asp:LinkButton runat="server" ID="lnkUserName" OnClick="lnkUserName_Click" ToolTip='<%# DataBinder.Eval(Container.DataItem,"Username")%>' CommandName="SELECT" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"UserId")%>' Text='<%# DataBinder.Eval(Container.DataItem,"Username")%>'></asp:LinkButton>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 



Code Behind on Button Click

// There are mostly records between 2- 10

radGridSelectUser.ExportSettings.ExportOnlyData =

true;

 

radGridSelectUser.ExportSettings.IgnorePaging =

true;

 

radGridSelectUser.ExportSettings.OpenInNewWindow =

true;

 

radGridSelectUser.MasterTableView.ExportToCSV();


Best Regards

 

Rizwan Bashir

 

Jeff
Top achievements
Rank 1
 answered on 05 Jun 2019
13 answers
230 views

Hi,

I am getting a WebResource.axd 404 with the query string "P1cfbt_tMqMFRD7W.....asPNRfcrST-9miVNk1". When decrypted it says "pTelerik.Web.UI.Skins|Telerik.Web.UI.Skins.Windows7.Grid.sprite.png". All my other skins and sprites are loading properly. I have been through the telerik documentation discussing skins and WebResource.axd issues to no avail. 

Any help would be appreciated.

Thanks,

Mike

Allen
Top achievements
Rank 2
Iron
Veteran
 answered on 05 Jun 2019
2 answers
164 views

I am changing some fields in my grid through javascript. Unfortunately OnBatchEditCommand can't sense that anything changed at all.

Is there a way to trick grid to include changed fields in "new values"

Thank you

David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 04 Jun 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?