Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
136 views

Hi , I have a requirement to load a radgrid on Tooltip. According to i found that Documentation RadTooltip does not have onDemand property. But i found that there is a server side propery called "show". Will that help in Loading my radgrid only when i click on RadTooltip. I want to bind my radgrid only on LinkButton click.

 

   <telerik:RadToolTip ID="RadToolTipFactory" runat="server" TargetControlID="lbRecentFactory"
        RelativeTo="Element" Position="BottomLeft" RenderInPageRoot="true" EnableShadow="true"  
        ManualClose="true" ShowEvent="OnClick" AutoCloseDelay="20000">

      <telerik:RadAjaxPanel ID="RadAjaxPanel_grdFactoryTooltip" runat="server" Height="100%"
                        Width="100%" LoadingPanelID="RadAjaxLoadingPanel1">

   <telerik:RadGrid ID="grdFactoryTooltip" runat="server" OnItemCommand="grdFactoryTooltip_ItemCommand"
                            AllowPaging="true" OnNeedDataSource="grdFactoryTooltip_NeedDataSource" PageSize="15" 

 

 <Columns>

 ..........

 ...................... </Columns>

 <telerik:Radgrid>

<telerik:RadAjaxPanel>

</telerik:RadTooltip>

 

 

  <asp:LinkButton ID="lbRecentFactory" runat="server" Text="Rec" Font-Underline="false"
                              OnClick="lbRecentFactory_Click"           OnClientClick="ShowToolTipRecentCases();" ForeColor="White"></asp:LinkButton>

 

InCodebheind:

 

  protected void bRecentFactory_Click(object sender, EventArgs e)

{

RadToolTipFactory.Controls.Add(RadAjaxPanel_grdFactoryTooltip);//I am adding RadAjaxpanel to Tooltip target controls here

 RadToolTipFactory.show();

}

ITs not working...Or Do i have only option to use TooltipManager which is not working in my case. Please help me.

Ajay
Top achievements
Rank 1
 asked on 23 Nov 2015
5 answers
368 views

Good day,

I was trying to use the FilterType="HeaderContext"

It works fine but whenever I have a GridDateTimeColumn I get an error just before the check list items requested event fires.

 

Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request

My column is like this:

 

<telerik:GridDateTimeColumn DataField="FechaSolicitud"
                                                    DataFormatString="{0:yyyy-MM-dd hh:mm:ss tt}"
                                                    DataType="System.DateTime"
                                                    EditDataFormatString="{0:yyyy-MM-dd}"
                                                    FilterControlAltText="Filter FechaSolicitud column"
                                                    HeaderStyle-Width="200px"
                                                    HeaderText="Fecha de solicitud"
                                                    SortExpression="FechaSolicitud"
                                                    ReadOnly="true"
                                                    UniqueName="FechaSolicitud">
                            <HeaderStyle Width="200px"/>
                        </telerik:GridDateTimeColumn>

If I comment out that column, everything works fine, but I need that column, I think I can change all the columns to a bound column and use an edit item template to get what I need, but there are lots of columns and grids in different pages where I would like to use this kind of filters, is it possible to make it work without having to change a lot in each grid??

 

thanks

Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request
Pavlina
Telerik team
 answered on 23 Nov 2015
1 answer
105 views

Hi,

I use Headercontextmenu in one of my radgrid .... when i open it from local and OnFilterCheckListItemsRequested is fire and give me the checklist for filter but when i upload it in server it give me error like Below .................

i do not have any null value in my data set .Please help me ..

 

POST http://............com/Default.aspx 500 (Internal Server Error)WebForm_DoCallback @ WebResource.axd?d=UnagsphVDTFLjPdyiCdiL47iWHHj1uktmg5j4HZFqpxkOonpm7BpW_6EvGm0KkQREgS5eQsyNueGMr39l…:119Sys.WebForms.PageRequestManager._doCallback @ ScriptResource.axd?d=Qzusic0Lx6OASB76hktXzBWOyvFxRBB40SzAEJY8bAf_4olL9iE63nMb03pm1TflsmTd7on4HoqHa-…:5(anonymous function) @ ScriptResource.axd?d=srccwcW4im49ES1F9SAFBwnA8sbfag7oIvMc3VZSzdYOSu6e59n9XQvsQ79h2W4QiZx3PhIW3GZgbh…:5Telerik.Web.UI.CallbackLoader.invokeCallbackMethod @ ScriptResource.axd?d=Ooxf68jxayzsdhI1Hqjf2rsXxYfmzsC1nibtXlD_wQ0lSPjHpb948a936obdYCvJcrJZojxZcGXRBw…:1193(anonymous function) @ ScriptResource.axd?d=7clXtNgGjRzOhHd8FFt03s-gFCzSM-BvGeOfASvnjMI7DbwQxyBQ_UVObafpBGyWAvOvhEvf99547g…:627


Thank you

Pavlina
Telerik team
 answered on 23 Nov 2015
1 answer
102 views

Hello all:
I am trying to build a page that has a RadGrid, some dropdowns, and a RadChart. When the page loads, the data is read from the backend CRM system and used to populate the grid and the drop-downs (which are Start Date, End Date, and Chart Type), and then the idea is for the user to select a Start Date, an End Date, and the Chart Type, and then the chart is supposed to render from the CRM data. 

The issue is that when the selection is made from one of the drop downs, the autopostback occurs and either clears the dropdowns, or they retain the data but sloe whatever selection the user made. 
I have tried putting the Grid in one UpdatePanel and then the drop-downs and charts in another, but that didn't work. I also tried putting each drop-down in it's own UpdatePanel and the chart in another, and then the drop-down retained the selection, but the OnSelectedIndexChanged did not fire. I was initializing the CRM connection and reading the data from CRM in Page_Load, but then I realized that means this happens on every postback. When I put if (!IsPostback) around the data read, then when a selection was made from a drop-down and postback fired, all the data disappeared.

Can anyone make a suggestion and/or point me at documentation that can help me with this? The functionality I need is
Read the CRM data, populate the drop-downs, render the grid
Enable Grid paging
From the drop-downs, User selects Start Date, End Date, and Chart Type, and then either from ChartType_OnSelectedIndexChanged or a button, the chart renders from the CRM data read at the start.

Thanks in advance for any and all help.
John.

Maria Ilieva
Telerik team
 answered on 23 Nov 2015
2 answers
92 views

Hello:

I have an AjaxPanel with a dropdown list, chart, and textbox and am trying to get the value of the dropdown list from OnSelectedIndexChanged, but for some reason it is not working, I always get 0 in the textbox, and when I put a break point in the method it is never reached.

   <div class="demo-container size-wide">
        <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Height="600px" Width="800px">
 
          <asp:Label ID="Label1" runat="server" Text="Start Date: "></asp:Label><asp:DropDownList ID="drpStartDate" runat="server" AutoPostBack="true" ></asp:DropDownList>
          <asp:Label ID="Label2" runat="server" Text="End Date: "></asp:Label><asp:DropDownList ID="drpEndDate" runat="server" AutoPostBack="true" ></asp:DropDownList>
          <asp:Label ID="Label3" runat="server" Text="Select Chart: "></asp:Label><asp:DropDownList ID="drpChart" runat="server" AutoPostBack="true" OnSelectedIndexChanged="drpChart_SelectedIndexChanged" ></asp:DropDownList>

 
          <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Width="800px" Height="500px">
          <PlotArea>
               <XAxis AxisCrossingValue="0" Color="black" MajorTickType="Outside" MinorTickType="Outside" Reversed="false" DataLabelsField="Date">
                    <LabelsAppearance DataFormatString="{0}" RotationAngle="0" Skip="0" Step="1">
                    </LabelsAppearance>
                    <TitleAppearance Position="Center" RotationAngle="0" Text="Days">
                    </TitleAppearance>
                </XAxis>
          <Series>
            <telerik:LineSeries Name="Net Collections" DataFieldY="NetCollections">
                <LabelsAppearance DataFormatString="${0}" Position="Above" />
                <MarkersAppearance MarkersType="Circle" />
            </telerik:LineSeries>
               <telerik:LineSeries Name="Net Production" DataFieldY="NetProduction">
                <LabelsAppearance DataFormatString="${0}" Position="Above" />
                <MarkersAppearance MarkersType="Circle" />
            </telerik:LineSeries>
        </Series>
    </PlotArea>
    <Legend>
        <Appearance Visible="false" />
    </Legend>
    <ChartTitle Text="Net Production vs Net Collections">
    </ChartTitle>

          </telerik:RadHtmlChart>

                <asp:TextBox ID="txtDebug" runat="server" Height="177px" TextMode="MultiLine" Width="547px"></asp:TextBox>

    </telerik:RadAjaxPanel>

    </div>

string[] sCharts = new string[] { "Select Chart...",
                                      "Net Production vs Net Collections",
                                      "Collection Ratio",
                                      "Hygiene Ratio",
                                      "Production Adjustment Ratio",
                                      "New Patients",
                                      "Accounts Receivable vs Collections"};

        drpChart.DataSource = sCharts;
        drpChart.DataBind

    protected void drpChart_SelectedIndexChanged(object sender, EventArgs e)
    {
      txtDebug.Text += drpChart.SelectedIndex.ToString();
      txtDebug.Text += drpChart.SelectedItem.ToString();
      txtDebug.Text += drpChart.SelectedValue;
    }

 
 
Maria Ilieva
Telerik team
 answered on 23 Nov 2015
3 answers
104 views

Hi,

 Horizontal scroll not working when Frozen Columns Count is greater than one in Mozilla. 

 I am facing this issue only when there is no data in the grid. 

 

 Example:  

-------------

 <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowSorting="true" PageSize="10" AllowMultiRowEdit="true"
                AllowAutomaticInserts="false" AllowAutomaticUpdates="false" Width="500px">
                <ClientSettings>
                    <Resizing AllowColumnResize="true" ShowRowIndicatorColumn="true" />
                    <Selecting AllowRowSelect="true" />
                    <Scrolling AllowScroll="true" FrozenColumnsCount="3" SaveScrollPosition="true" UseStaticHeaders="true" />
                </ClientSettings>
                <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Top" EditMode="InPlace">
                    <Columns>
                        <telerik:GridBoundColumn DataField="Incident #" HeaderText="Incident #" UniqueName="Incident#">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Priority" HeaderText="Priority" UniqueName="Priority">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Open Time" HeaderText="Open Time" UniqueName="OpenTime">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Client Full Name" HeaderText="Client Full Name" UniqueName="ClientFullName">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Category" HeaderText="Category" UniqueName="Category">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Urgency" HeaderText="Urgency" UniqueName="Urgency">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Product Type" HeaderText="Product Type" UniqueName="ProductType">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Product Type" HeaderText="Product Type" UniqueName="ProductType">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Issue Type" HeaderText="Issue Type" UniqueName="IssueType">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Brief Description" HeaderText="Brief Description" UniqueName="BriefDescription">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Issue Type Detail" HeaderText="Issue Type Detail" UniqueName="IssueTypeDetail">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="RC" HeaderText="RC" UniqueName="RC">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Status" HeaderText="Status" UniqueName="Status">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Alert Stage" HeaderText="Alert Stage" UniqueName="AlertStage">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Last Action Type" HeaderText="Last Action Type" UniqueName="LastActionType">
                            <HeaderStyle Width="110px" />
                        </telerik:GridBoundColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <PagerStyle Mode="NextPrevAndNumeric" />
            </telerik:RadGrid> 

 To add the data for all the available columns, i have tried to scroll to right but columns are not getting displayed.

 While debugging the issue in the Mozilla i found "TypeError: h is undefined" is occuring as shown in the below.

 var h=b._owner.get_masterTableView()._getFirstDataRow();

for(var m=b._owner.ClientSettings.Scrolling.FrozenColumnsCount;m<b._owner.get_masterTableView().get_columns().length;m++)
{
  var c=b._owner.get_masterTableView().get_columns()[m];
  var y=false;
if((window.netscape||$telerik.isSafari||$telerik.isIE8||($telerik.isOpera&&v>10.1))&&c.get_element().style.display=="none")
 {
   c.get_element().style.display="table-cell";
   y=true;
 }
var u;
if($telerik.isIE9Mode)
 {
   u=b._owner.get_masterTableView().ColGroup.Cols[m].style.width.replace("px","")*1;
 }
else
 {
  if(!($telerik.isIE6||$telerik.isIE7)&&b._owner.get_masterTableView().ColGroup.Cols[m].style.width.indexOf("px")>-1)
   {
     if(typeof(h)=="undefined"&&h.cells[m].offsetWidth>0)
  {
    u=h.cells[m].offsetWidth;
       }
else
 {
   u=parseInt(b._owner.get_masterTableView().ColGroup.Cols[m].style.width,10);
      }
   }
  else
   {
     u=(c.get_element().offsetWidth>0)?c.get_element().offsetWidth:(typeof(h)=="undefined"?0:h.cells[m].offsetWidth);
   }
 }
 s[s.length]={Index:m,Width:u,FrozenDisplay:true}; 
 if(typeof(c.FrozenDisplay)=="boolean")
  {
    s[s.length-1].FrozenDisplay=c.FrozenDisplay;
  }
 if((window.netscape||$telerik.isSafari||$telerik.isIE8||($telerik.isOpera&&v>10.1))&&y)
  {
   c.get_element().style.display="none";
   y=false;
  }
}​

Please let me know how to fix this.

 

Pavlina
Telerik team
 answered on 23 Nov 2015
1 answer
42 views
Hi,

In the following code, the default sorting is by "clientId". How do I make the  sorting default by "Name"?


<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="true" CssClass="RadGrid RadGrid_Silk" OnItemCommand="itemClickRadGrid" Visible="true" OnItemDataBound="RadGrid1_ItemDataBound"                 AllowSorting="True" AllowPaging="True" PageSize="100" AutoGenerateColumns="false" AllowFilteringByColumn="false" OnNeedDataSource="RadGrid1_NeedDataSource1">                 <MasterTableView GroupLoadMode="Client" TableLayout="Fixed" EnableGroupsExpandAll="false" DataKeyNames="FilingIdentifier" ShowHeader="false">                     <GroupByExpressions>                         <telerik:GridGroupByExpression>                             <SelectFields>                                 <telerik:GridGroupByField HeaderValueSeparator=" " HeaderText=" " FieldName="Name" SortOrder="Ascending"></telerik:GridGroupByField>                             </SelectFields>                             <GroupByFields>                                 <telerik:GridGroupByField FieldName="clientId"></telerik:GridGroupByField>                             </GroupByFields>                         </telerik:GridGroupByExpression>                     </GroupByExpressions>                     <Columns>                                                 <telerik:GridBoundColumn DataField="TaxYear" HeaderText="Year" UniqueName="TaxYear"></telerik:GridBoundColumn>                         <telerik:GridBoundColumn DataField="PreviousFiling" Visible="false" UniqueName="PreviousFiling"></telerik:GridBoundColumn>                         <telerik:GridBoundColumn DataField="ForwardFiling" Visible="false" UniqueName="ForwardFiling"></telerik:GridBoundColumn>                         <telerik:GridButtonColumn Text="Launch" UniqueName="lauchrow" CommandName="launchRow" ButtonType="PushButton" HeaderStyle-Width="70px"></telerik:GridButtonColumn>                         <telerik:GridButtonColumn Text="Add tax year" UniqueName="addTaxYear" CommandName="cf" ButtonType="PushButton" HeaderStyle-Width="110px"></telerik:GridButtonColumn>                     </Columns>                 </MasterTableView>                 <GroupingSettings />                 <ClientSettings AllowDragToGroup="false">                     <Selecting AllowRowSelect="true" />                 </ClientSettings>             </telerik:RadGrid>


Thanks
Pavlina
Telerik team
 answered on 23 Nov 2015
1 answer
168 views

Hi,

 

We are planning to use Telerik RadEditor for our application, but there are couple of issues that we are facing with this editor:

1. When I am pasting any content to the editor, the vertical scrollbar is not moving to the new position, but remains in the old position. Due to this, I am unable to see the end of pasted content.Is there any way that I can move the vertical scrollbar to the end of pasted section.

2. When I am doing a paste in Internet explorer it is creating 2 "Paste" events due to which when doing UNDO I have to do it twice. Is there any fix for this as well.

 

Both these issues are reproducible in the below link.

http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx

 

Thanks in advance for your help. 

Regards,

Sumit.

 

Vessy
Telerik team
 answered on 23 Nov 2015
1 answer
167 views

Hi, I have a radmenu and I want to remove the default gray background-image (PFA sample image), I tried few ways but that is also removing the arrows from the submenu, I want the arrows to be present, I only want the gray background image to be removed, below is the custom css.

Also please let me know how to change the arrow color for the Radmenu_Default skin

.RadMenu_Default, .RadMenu_Default .rmRootGroup, .RadMenu_Default a.rmLink {
font-size: 16px !important;
color: #ebe3e3 !important;
border: 0px !important;
background-color: #8F0800 !important;
background-image: none !important;
}

.RadMenu_Default .rmLink:hover, .RadMenu_Default .rmFocused,
.rmLink .RadMenu_Default .rmSelected, .RadMenu .rmGroup .rmItem a.rmLink,
.RadMenu_Default a.rmExpanded, .RadMenu_Default a.rmExpanded:hover, .RadMenu_Default .rmGroup {
background-color: #C12610 !important;
background-image: none !important;
background-position: 0px 0px !important;
border: 0px !important;
}

Ivan Zhekov
Telerik team
 answered on 23 Nov 2015
1 answer
98 views

Hi Team,

DatePicker values are getting copied from one row to other when selected to edit in RadGrid BatchEdit model.

First, I clicked in DatePicker column in first row and clicked in DatePicker column in second row. The value of DatePicker in first row is getting copied to DatePicker in second row.

I am having following code in BatchEditOpened event, here I am just trying to set minimum date for StartDate datepicker.

function BatchEditOpened(sender, args) {

switch (args.get_columnUniqueName()) {

   case "StartDate":
      var dtStartDate = $find($telerik.$("[id$='dtStartDate']").attr("id"));                       
        if (dtStartDate.get_selectedDate()) {
           var minDate = new Date(dtStartDate.get_selectedDate());
           minDate.setDate(minDate.getDate());
           dtStartDate.set_minDate(minDate);
         }

       break;

}

Please let me know why it is copying value instead of just setting minimum date. If I remove code in BatchEditOpened, it is not copying values.

Konstantin Dikov
Telerik team
 answered on 23 Nov 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?