Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
188 views
Hi,

I am using thre inPlace edit mode for my grid. I have all but one column which are defined as readonly. I noticed that when I click on edit, if the readonly column has a NULL/Blank, the display is messed up. A black line appears on the row if the column has values whereas it disappears if the column is blank/NULL.

This looks really odd in my scenario. Is there a way this can be corrected?

Thanks,
Saurabh

Shinu
Top achievements
Rank 2
 answered on 20 Aug 2009
1 answer
235 views
Hi Guys,

I'm using markup from one of your examples, which uses the span element.

Anyway of formatting these such that i get greater spacing between each line.
I also ried using  a table  to sort the line spacing out , in the TemplateCol   (commented out in the attached markup), but anything in the table does not make it to PDF .

(My Detail Table is std BoundCols and using some c# code as per examples is fine thanks), just the Master is an issue

the code behind takes care of the necessary page size ,pageheight, and

   ExportSettings.IgnorePaging =

true;

 

   ExportSettings.OpenInNewWindow =

true;

 


TIA
Neal

<

 

MasterTableView

 

 

Width="100%"

 

 

DataKeyNames="RecId" CellSpacing="-1" pagesize="20">

 


 

<Columns>

 

 

<telerik:GridTemplateColumn>

 

 

<ItemTemplate>

 

 

<span style="font-weight:bold;font-family:Arial Black; text-align:center;width:100% ">

 

 

 

<asp:Image ID="EqArmsCoat" Width="200px" Height="150px"

 

 

ImageUrl="~/Images/Equistar logo spot 1 pic.jpg"

 

 

runat="server" AlternateText="Equistar 5 Star Insurance" />

 

 

</span>

 

<%

-- <table>

 

<tr>

<td width="100%" height="200px" valign="middle">

<asp:Image ID="EqArmsCoat" Width="200px" Height="150px"

ImageUrl="~/Images/Equistar logo spot 1 pic.jpg"

runat="server" AlternateText="Equistar 5 Star Insurance" />

</td>

</tr>

 

 

 

 <tr>

 

<td width="25%" height="40px" valign="middle">Schedule Date

</td>

<td width="75%" height="40px" valign="middle"><%# Eval("SchedDate")%>

</td>

</tr>

<tr>

<td width="25%" height="40px" valign="middle">Reference Number

</td>

<td width="75%" height="40px" valign="middle"><%# (Eval("Schedref_no"))%>

</td>

</tr>

 

</table>--

 

%>

 

 

<br />

 

 

<br />

 

 

<span style="font-weight:normal;height:45;width:100px">Schedule Date : </span>

 

<%

# Eval("SchedDate")%>

 

 

<br />

 

 

<br />

 

 

<span style="font-weight:normal;height:45;width:100px">Reference Number :</span>

 

<%

# (Eval("Schedref_no"))%>

 

 

<br />

 

 

<br />

 

 

<span style="font-weight:normal;height:45;width:100px">Annual Premium :</span>

 

<%

# (Eval("AnnualPremium"))%>

 

 

<br />

 

 

<br />

 

 

<span style="font-weight:normal;height:45;width:100px">Payment Option :</span>

 

<%

# (Eval("PayFreq"))%>

 

Daniel
Telerik team
 answered on 20 Aug 2009
1 answer
71 views
Hello,

I get the following error whenever I click a PanelBar item below the top level:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Sun, 16 Aug 2009 17:29:00 UTC

Message: Object doesn't support this property or method
Line: 37
Char: 4
Code: 0

Here is the Javascript:

   function OnClientItemClickingHandler(sender, eventArgs)
   {
  
   var cookieName = constCookieName(sender.get_id());
   var curCookie = GetCookie(cookieName);
   var cookieValue = new Array();

   if(curCookie != null) {cookieValue = curCookie.split(",");}

   var itemIndex;

   for (i = 0; i < sender.get_items().get_count(); ++i)
   {
    if(sender.get_items().getItem(i).get_text() == eventArgs.get_item().get_text()) {itemIndex = i;break;}
   }

   if(eventArgs.get_item().get_expanded() == true)
   {
    eventArgs.get_item().set_expanded(false);
       document.getElementById("globalLinks").style.width = document.getElementById("LeftNavigationAreaCell").offsetWidth-15 + "px";
    cookieValue[itemIndex]=false;
   }
   else
   {
    eventArgs.get_item().set_expanded(true);
       document.getElementById("globalLinks").style.width = document.getElementById("LeftNavigationAreaCell").offsetWidth-15 + "px";
    cookieValue[itemIndex]=true;
   }

   document.cookie = cookieName + "=" + escape(cookieValue) + "; path=/";

  if(eventArgs.get_item().get_navigateUrl().toLowerCase().indexOf("go_nowhere") > -1)
  {     
   eventArgs.set_cancel(true);
  }else{
   eventArgs.set_cancel(false);  // This line causes error ;
  }
   }

I am unable to test the "true" condition of the corresponding statement at this time.  Thus, I do not know whether or not it causes the same error.

What am I doing wrong?

Cheers,

Doug 

Paul
Telerik team
 answered on 20 Aug 2009
5 answers
75 views

I am using RadDatePicker control in my site and my problem is I want to remove href=”#” from “A” tag of Day cell.


i.e : see the following link and open pop up for date picker and mouse over on any day and see in the status bar there is one “#”


Click here to see demo...


Actually  RadDatePicker  generate HTML code for particuler day is...

<a href="#">18</a>

and i want like....

<a href="javascript:void(0);">18</a>



Note : I am using this version of Rad Control : 2009.1.402.35

Amit
Top achievements
Rank 1
 answered on 20 Aug 2009
1 answer
205 views

Hi there,

1.) I have radgrid and export to excel functionality in it.
2.) This radgrid is in a page and that page is called using a "window.showModalDialog" javascript from another page.
 
Every thing works fine in IE. In FireFox also this works fine only if directly exporting from the single page.

 This does't work in firefox only when using javascript and opening a modaldialog , having a RadGrid and while exporting the same.

 

 

While i click on Export from Modaldialog screen i'm getting a dialog box to save the excel where i'm unable to save or open with using FireFox. I 'h added that screen shot link below.


Snap shot of the issue

Daniel
Telerik team
 answered on 20 Aug 2009
1 answer
85 views
Hello,

I am in trouble with RadUpload. I want to use multiple file uploads..

The problem is in picture: http://www.cebe.org/img/out/radupload_1.jpg
when i add one RadUpload see: http://www.cebe.org/img/out/radupload_2.jpg

How can i set up the RadUpload like in demo..
CEBE
Top achievements
Rank 1
 answered on 20 Aug 2009
5 answers
351 views
Hello,

Is there a way to use .net skinID with GridButtonColumn when buttontype=ImageButton

When I set buttontype=ImageButton without specifying ImageUrl or with a temporary ImageUrl and I try to find the ImageButton in Item_Created handler, I find nothing and the button is rendered as a linkButton.

How to specify the SkingID I use everywhere in my app for the Update action ?


Thanks
CS
Dimo
Telerik team
 answered on 20 Aug 2009
3 answers
140 views

Hi,

We found another problem in the scheduler control.
For you information: We are using webservices with the advanced form.

We are showing images in the appointments on the schedular, like on the following image:
http://bart.nimio.info/images/fora/scheduler3.JPG

But when i tried to move an appointment by clicking on the image, nothing happens until i release the mouse button.
Then the appointment is stuck to the mouse pointer, after that i can't put the appointment back to the original place without updating the appointment or i can't put the appointment back to the scheduler at all. After that i am getting a lot of javascript errors when trying to move another appointment.

We are using the following code to enable images on the appointment:

/// <summary> 
      /// Occurs when a timeslot is created.  
      /// Sets the AppointmentType image, as well as the AppointmentState catagory color.  
      /// </summary> 
      /// <param name="sender">telerik:RadScheduler</param> 
      /// <param name="e">telerik:TimeSlot</param> 
      /// <returns>null</returns> 
      function TimeSlotCreated(sender, e) {  
        var app = e.get_appointment();  
        var element = e.get_appointment().get_element();  
        var attributeCollection = app.get_attributes();  
        var StateIconName = attributeCollection.getAttribute("StateIconName");  
        var SubStateIconName = attributeCollection.getAttribute("SubStateIconName");  
        var RsCategory = RgbStringToRadStyleString(attributeCollection.getAttribute("Color"));  
        var customerName = attributeCollection.getAttribute("CustomerName");  
        var startTime = app.get_start().format("MMM dd, yyyy HH:mm:ss");  
        attributeCollection.setAttribute("OriginalStartTime", startTime);  
 
        // Set the tooltip of the appointment  
        if (customerName == null) { customerName = "Geen klant"; }  
        app.set_toolTip("Afspraak: " + app.get_toolTip() + "\n" + "Klant:       " + customerName);  
 
        // Set the stateimage  
        var image = document.createElement("img");  
        image.setAttribute("src", '<%= System.Configuration.ConfigurationManager.AppSettings["IconDirectory"].Replace("~","") %>' + StateIconName);  
        image.setAttribute("alt", 'IconImage');  
 
        // If the appointment has a substate then show the substateimage  
        if (SubStateIconName != null) {  
          var image2 = document.createElement("img");  
          image2.setAttribute("src", '<%= System.Configuration.ConfigurationManager.AppSettings["IconDirectory"].Replace("~","") %>' + SubStateIconName);  
          image2.setAttribute("alt", 'IconImage');  
        }  
 
        element.setAttribute("class", element.className + " rsCategory" + RsCategory);  
 
        // All appointments with ID 0 are script generated, they are not actually appointments within the database, thus must not be allowed to  
        // be edited/moved or resized in any way shape or form.  
        if (app.get_id() == 0) {  
          app.set_allowDelete(false);  
          app.set_allowEdit(false);  
        }  
 
        var divs = element.getElementsByTagName('div');  
        var result;  
        var innerHTML;  
        for (i = 0; i < divs.length; i++) {  
          // IE and its eternal spacing issues *sigh*  
          if ($telerik.$(divs[i]).is("div.rsAptContent")) {  
            result = divs[i];  
            innerHTML = result.innerHTML;  
            result.innerHTML = '';  
            result.appendChild(image);  
 
            // If the appointment has a substate then show the substateimage  
            if (SubStateIconName != null) { result.appendChild(image2); }  
 
            result.innerHTML = result.innerHTML + innerHTML;  
            result.innerHTML = result.innerHTML + "<br />";  
 
            if (customerName != "Geen klant") {  
              result.innerHTML = result.innerHTML + customerName;  
            }  
            return;  
          }  
        }  
 
      } 

Is this a bug and is there a fix or workaround for this problem?
Datamex
Top achievements
Rank 2
 answered on 20 Aug 2009
1 answer
86 views
I am VERY new to Telerik and charting in particular, and need some help understanding how this control works.

My first question is a very basic one, but I can't seem to figure it out. I have a stored proc that returns to columns of data. One column has each person's name (i.e. Ted Smith) and the second column has a monetary amount (i.e. $12000). I am using the Adventureworks DB for data at the moment.

My code behind looks like this:
        protected void BindData(RadChart radChart)
        {
            using (var sqlDataSource = new SqlDataSource
                                           {
                                               ID = "myDataSource",
                                               ConnectionString =
                                                   ConfigurationManager.ConnectionStrings[
                                                   "AdventureWorksConnectionString"].ConnectionString,
                                               SelectCommand = "GetSales"
                                           })
            {
                Page.Controls.Add(sqlDataSource);
                radChart.DataSourceID = "myDataSource";
                radChart.PlotArea.XAxis.DataLabelsColumn = "FullName";
                radChart.DataBind();
                radChart.Series[0].DataYColumn = "TotalDue";
                radChart.Series[0].DataXColumn = "FullName";
            }
        }




When I run the application, the chart shows the Y axis (TotalDue) as I would expect it to, in a numeric format. But the X axis just shows the numbers 0-8, not the names of the people. This doesn't help me much. How do I get the names of the people to show up?
Vladimir Milev
Telerik team
 answered on 20 Aug 2009
2 answers
157 views
Goal:
To display the slider control vertically and align the items so that they are visually displayed in the middle (css: vertical-alignment: center) of the item.

Implementation:
When changing the orientation of the slider control to vertical it is not possible to properly line-up the labels of each item in the slider. To work around this limitation I have created a little bit of javascript which changes the top position of the <span> tags that are used to display the caption for each item as follows:

function

applyVerticalSliderFix(sliderId) 
{
   var labels = $get(sliderId).getElementsByTagName('span'); 
   for(i=0; i<labels.length; i++) 
   {
      var label = labels[i]; 
      var topOffset = Math.floor((label.parentNode.clientHeight - label.clientHeight) / 2); 
      label.style.top = topOffset + 'p
x'
   }
}

 

 

For the above to work I created a new skin where the  ".rslItem SPAN" definition uses a "position:absolute" for the top style attribute to have any effect.

Problem:
The above solution seems to work in IE and FF but every now and then throws off the location of the draghandle by a couple of pixels (10 - 15 pixels). In which case the draghandle is no longer properly lined up.

Any suggestions are much appreciated.
Regards, Elmar

 

 

 

 

 

 

 

Elmar De Groot
Top achievements
Rank 1
 answered on 20 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?