Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
222 views

When I upgrade a Telerik project that has the handlers defined inside a location tag it add duplicate entries.  The ones inside the location remain the same and the handlers are added at the end of the web.config file along with a duplicate authentication tag.

 

Is a better solution to just place everything outside the location override or is there a way to disable updating the web.config file on upgrade? I have a lot of projects inside one solution file, so mass upgrading is preferred over individual upgrades.

 

Here is what I mean by location.

<location allowOverride="True|False" path="path" />

I had to give the WebResource.axd file it's own location per other documentation and placed the main content inside a location of ".".  Some folders are setup for anonymous access, like css and javascript files, while other folders require windows authentication.  I have projects nested under other projects, so I don't want a higher web.config file to have any influence on a lower one.  It's an interesting setup, but it all works great other than trying to upgrade Telerik.  It's easy enough to remove the duplicate entries, but it would be nice to not have to do that for each upgrade. 

I can provide better examples later when I'm in front of a computer.

 

Vesko
Telerik team
 answered on 09 Oct 2017
0 answers
85 views

Hello,

I made a real-time chart which gets e.g. every 5 seconds data from the server and updates itself. My problem is that my XAxis has dates but I only want to show the date where a value is available. But if I select Type="Date" the XAxis shows one entry every second. But I only want an entry every 5 seconds. This i got managed by setting Type="Auto". But if I set this I'm no longer able to format my date values of the XAxis either with DataFormatString or with ClientTemplate.

I really hope you can help me with my problem.

Kind regards,

Felix

 

Felix
Top achievements
Rank 1
 asked on 09 Oct 2017
0 answers
115 views

Hey together.

I work with advanced databinding using the NeedDataSource event and want to add some aggregations to the footer.

After setting the DataSource I do some changes/formatting to the data in the OnDataBound event.

In this case I iterate through the MasterTableView.AutoGeneratedColumns and want to add Aggregations to all decimal Columns:

if (dataColumn.DataType == typeof(decimal))
{
    ((GridNumericColumn)dataColumn).Aggregate = GridAggregateFunction.Sum;
    ((GridNumericColumn)dataColumn).FooterText = string.Empty;
    ((GridNumericColumn)dataColumn).FooterAggregateFormatString = "{0}";
}

 

My problem is, that this only works after a Postback or Rebind but not on the first load. I press refresh or do some sorting on the table and the sum shows up in the footer.

But Rebinding in this event is not possible, so what can I do to see my aggregations on first load? Is there a better event than OnDataBound?

Florian
Top achievements
Rank 1
 asked on 09 Oct 2017
0 answers
99 views

I am experiencing an odd behavior when I apply a paragraph style <P> to a text in a <Div> that contains a class. It's reproducible on all browsers.

To illustrate this, i will use the example below:

<div class="remarks">
Unless the sender is illiterate, please ask the sender to write the RCM text him/herself in Dari or Pashtu. If possible, please provide a translation into English or French.<br />
Information to provide<br />
In the countryside we need to know the name of the province, the district, the area and the village / sub-village of the Sought Person.<br />
Any other useful information should be mentioned, such as close by a mosque, school or well-known building. <br />
<br />
A precise map of the location (hand drawing) can be attached to the RCM.<br />
<br />
Please note: To facilitate distribution and to prevent misunderstanding due to transcription, spelling or pronunciation, please ask the sender to write both the sender's and addressee's details in Dari or Pashtu, using the attached form<br />
ICRC and/or ARCS. Cases from abroad should be directed to ICRC Kabul.<br />
<br />
After the initial assessment and processing by the ICRC, Tracing Cases in Afghanistan are normally followed up through active fieldwork conducted by the ARCS. Most of the districts and provinces are inaccessible to ICRC staff for security reasons.<br />
<br />
Any information regarding a case will be communicated by ICRC-Kabul to the concerned National Society/ICRC Delegation who is in charge of submitting information to the Enquirer. In the case of sad news regarding the Sought Person, ICRC-Kabul will send an explanatory note that will allow a re-contact with the Enquirer and a transmission of news in the most appropriate way.
</div>

 

Here, the <div class="remarks"> is the container of all the Text. 

If we apply a paragraph style <p> to the text with the bold style in Design mode, the <Div> will not be the container anymore, and we will have the HTML below: 

<div class="remarks">
Unless the sender is illiterate, please ask the sender to write the RCM text him/herself in Dari or Pashtu. If possible, please provide a translation into English or French.<br />
Information to provide<br />
In the countryside we need to know the name of the province, the district, the area and the village / sub-village of the Sought Person.<br />
Any other useful information should be mentioned, such as close by a mosque, school or well-known building. <br />
<br />
A precise map of the location (hand drawing) can be attached to the RCM.<br />
<br />
</div>
<p class="remarks">Please note: To facilitate distribution and to prevent misunderstanding due to transcription, spelling or pronunciation, please ask the sender to write both the sender's and addressee's details in Dari or Pashtu, using the attached form<br />
ICRC and/or ARCS. Cases from abroad should be directed to ICRC Kabul.<br />
<br />
</p>
<div class="remarks">After the initial assessment and processing by the ICRC, Tracing Cases in Afghanistan are normally followed up through active fieldwork conducted by the ARCS. Most of the districts and provinces are inaccessible to ICRC staff for security reasons.<br />
<br />
Any information regarding a case will be communicated by ICRC-Kabul to the concerned National Society/ICRC Delegation who is in charge of submitting information to the Enquirer. In the case of sad news regarding the Sought Person, ICRC-Kabul will send an explanatory note that will allow a re-contact with the Enquirer and a transmission of news in the most appropriate way.
</div>

 

So if the div container has a style with a border radius,padding, margin and background color, this styles will be applied separately on the paragraph, so the result will be messy.

i did the test on the online telerik demo, and the case is reproducible.

Regards,

 

 

Najlae
Top achievements
Rank 1
 asked on 09 Oct 2017
2 answers
267 views

I have one wizard using a custom template css.  Then in the last step of that wizard I have another wizard control set to use a different template.  The issue I'm having is the styles for the main wizard are overwriting the sub wizard because by default they both use the same css class names.

 

Is there a way I could get the sub wizard to use different css class names or atleast use the version of the css classes that are under the template class I want for the sub wizard?

 

 

Magdalena
Telerik team
 answered on 09 Oct 2017
3 answers
97 views

  protected override void OnInit(EventArgs e)
        {           
            rcbCustomer.HeaderTemplate = new HeaderTemplate();
            rcbCustomer.ItemTemplate = new HeaderItemTemplate();            
            base.OnInit(e);
        }

  public  class CustomerRCBTemplate
    {

    }
    public class HeaderTemplate : ITemplate
    {

        public void InstantiateIn(Control container)
        {

            HtmlTable table = new HtmlTable();

            HtmlTableRow row = new HtmlTableRow();

            HtmlTableCell cell = new HtmlTableCell();

            cell.InnerText = "客户编号";
            cell.Width = Unit.Pixel(100).ToString();
            row.Controls.Add(cell);

            HtmlTableCell cell1 = new HtmlTableCell();

            cell1.InnerText = "客户名称";
            cell1.Width = Unit.Pixel(160).ToString();
            row.Controls.Add(cell1);

            HtmlTableCell cell2 = new HtmlTableCell();

            cell2.InnerText = "主联系人";
            cell2.Width = Unit.Pixel(100).ToString();
            row.Controls.Add(cell2);

            HtmlTableCell cell3 = new HtmlTableCell();

            cell3.InnerText = "类型";
            cell3.Width = Unit.Pixel(100).ToString();
            row.Controls.Add(cell3);

            HtmlTableCell cell4 = new HtmlTableCell();

            cell4.InnerText = "商务人员";
            cell3.Width = Unit.Pixel(90).ToString();
            row.Controls.Add(cell4);

            table.Controls.Add(row);

            container.Controls.Add(table);


        }

    }
ghd258 ghd258
Top achievements
Rank 1
 answered on 09 Oct 2017
0 answers
168 views

Hi!

Since the radimageeditor insert dialog only allow images from a given url, I tried to apply the below logic:

 

   <script>
         $(document).ready(function () {
             $("#signpanel").draggable({
                 containment: 'parent',
                 append: $find("editor1"),
                 addClasses: false,
                 start: function (event, ui) {
                     //$("#signpanel").clone();
                    // alert("start");
                 },
                 stop: function (event, ui) {
                     var top = ($('#signpanel').offset().top);
                     var left = ($('#signpanel').offset().left);
                      var getimg = $("#signimage").attr("src");
                     $find("editor1").insertImage(left, top, getimg, [])
                 }
             });
             
         });

</script> 

 
 
 
<div class="col-md-8">
                     <div id="pa">
  <telerik:RadImageEditor ID="editor1" RenderMode="Lightweight" EnableResize="false" OnImageSaving="editor1_ImageSaving"
   style="height:auto;"  Width="730px" CanvasMode="Yes" ImageManager-RenderMode="Lightweight" AllowedSavingLocation="ClientAndServer"
      runat="server"  StatusBarMode="Hidden" Skin="Silk">
     </telerik:RadImageEditor>
                                      
                            
     <div  id="signpanel" style="width:130px; border:2px solid green;">
    <asp:Image runat="server" ID="signimage" ImageUrl="~/signatures/issa.jpeg" style="width:100%; height:60px"/>
    <br />
    <asp:Label runat="server" ID="signname" Font-Bold="true"></asp:Label>
</div>

 

From the above, I have put my RadImageEditor inside a div named "pa" and I have another div named "signpanel". Now when I drag the "signpanel" div inside the radimageeditor and stop, the "onDradStop" event of draggable fired and I get the location of the div and the "insertImage" event of radimageeditor fired. But the problem is the image will be inserted but not at the exact spot where the draggable div is. Another problem is when you scroll the image in the radimageeditor up, and drag the div again, the image is inserted at the same place where the div was before I scroll the image.

 

Please help me out with this, I have tried several tricks yet not working.

 

Also attached is a screenshot of the result I get

Felix
Top achievements
Rank 1
 asked on 08 Oct 2017
1 answer
98 views

Any idea what may be causing the progress area to go above 100% and actually never stop?  See screenshot.  The file is uploaded successfully, but the user is never told that.

 

Vessy
Telerik team
 answered on 07 Oct 2017
0 answers
109 views

I'm trying for 

(student id=45624 and(college Id=4125 or college id  =78455 or college id=54521 ))

i tried with

 var id= new RadFilterEqualToFilterExpression<string>("student ");
                    id.Value = "45624";
                    RadFilterps.RootGroup.AddExpression(id);

  RadFilterps.RootGroup.GroupOperation = RadFilterGroupOperation.Or;

 var Cid1= new RadFilterEqualToFilterExpression<string>("college ");
                    Cid1Value = "4125 ";
                    RadFilterps.RootGroup.AddExpression(Cid1);

 var Cid2= new RadFilterEqualToFilterExpression<string>("college ");
                    Cid2.Value = "78455 ";
                    RadFilterps.RootGroup.AddExpression(Cid2);

 var Cid3= new RadFilterEqualToFilterExpression<string>("college ");
                    Cid3.Value = "54521 ";
                    RadFilterps.RootGroup.AddExpression(Cid3);

Malla reddy
Top achievements
Rank 1
 asked on 06 Oct 2017
4 answers
964 views
Hi , 

I am using grid to display my resultset. The problem is that my nextpage button only works once , it only move from 1 to 2 and then if i press next button it is not going to  page3. But if i individually press 3 it show right results. 
Also , after pressing last page button , if i press previous page button it goes to page 1, this is happening even i am on any page after page 2.

I think my previous and next page behaving like first and last page thats why it only work for page 1 and 2.

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" CellSpacing="0"
                GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource1" 
                 BorderStyle="None" OnItemDataBound="RadGrid1_ItemDataBound"    >
                 <PagerStyle Mode="NextPrevAndNumeric"   />
                <MasterTableView AutoGenerateColumns="true">
                  
                </MasterTableView>
            </telerik:RadGrid>

codebehind:

  protected void RadGrid1_NeedDataSource1(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
                                       RadGrid1.DataSource = list;
         }
         
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is  GridPagerItem)
            {
                Label lblPageSize = (Label)e.Item.FindControl("ChangePageSizeLabel");
                lblPageSize.Text = Sitecore.Globalization.Translate.Text("Results per page");

                    RadGrid1.PagerStyle.PagerTextFormat = "{4} {5} items in {1} pages";
             }
        }
Any help or advise.

thanks in Advance.




DogBizPro
Top achievements
Rank 1
 answered on 06 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?