Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
95 views
Hi

I tried to add a custom image to the datepopup button of radcalendar. Initially it displayed well but when I try to click on it everything look messy and see a text like click to see calendar. How to resolve this?

Thanks
Karl
Shinu
Top achievements
Rank 2
 answered on 31 Jul 2013
1 answer
79 views
I have noticed with many of the telerik control they will add default mark up to the XML page.

For example, I added text box and when to the properties windows and created a client side event, All this markup got added. It seems on some occasions it will write out the controls defaults to the XML.This creates a lot of extra code to sort through. 

<EmptyMessageStyle Resize="None"></EmptyMessageStyle>
<ReadOnlyStyle Resize="None"></ReadOnlyStyle>
<FocusedStyle Resize="None"></FocusedStyle>
<DisabledStyle Resize="None"></DisabledStyle>
<InvalidStyle Resize="None"></InvalidStyle>
<HoveredStyle Resize="None"></HoveredStyle>
<EnabledStyle Resize="None"></EnabledStyle>

I also noticed this happens a lot with the grid. I add a grid with a few columns, nothing special, and the markup is a mile long. Most i can go through and delete as its the default settings.

Is this a bug? Its really annoying with pages with lots of controls.

Thanks,

Kim
Maria Ilieva
Telerik team
 answered on 31 Jul 2013
4 answers
58 views
hello everybody

I have two controls on my page , first one is Radtree and the second one is Radgrid, when I click on the tree the grid will be populated but the problem is that after populating grid the tree will be freez and it does not work any more.
thanks if you help me to find out where is the problem .

Eyup
Telerik team
 answered on 31 Jul 2013
4 answers
356 views
Hello, 

I'm now developing a product/promotion website and I want to post the promotion summary on facebook together with our main website url.
By using RadSocialButtons from RadSocialShare control - 
if SocialNetType="ShareOnTwitter", I can share a link together with some text that I defined in TitleToShare attribute.
But if SocialNetType="ShareOnFacebook", I can only share a link that I defined in UrlToShare attribute.

Is there a way to write something when sharing on facebook? (I want to autofill some text in "Write Something" textbox of facebook popup)
I also want to include promotion photo.

Or is there any other way to achieve this?

Thanks in advanced.
Robin
Robin
Top achievements
Rank 2
 answered on 31 Jul 2013
3 answers
196 views
I have been working with an organizational chart and have noticed some odd behavior when working with a Rebind on postback.

I have attached some screen shots to show what is happening.
First I bound the grid to me.  I have four subordinates with no other subordinates.
I expanded my node to show the subordinates, then I clicked the expand on two of them.
The result is in FirstBind.png, and it looks exactly as expected.

THEN, I call Rebind() on the tree and rebind with MY supervisor at the root of the tree. What is unexpected here, is that even though this was a complete rebind, MY part of the tree remains expanded in exactly the same way that it was before the rebind.  You can see that my node is expanded, and that the expand markers for the two subordinates that I attempted to expand earlier have disappeared.  This is in SecondBind.png.

This does not seem expected to me.  I could see this information being persisted if I was doing some other sort of a postback, but on a Rebind(), I think everything should be reset.
Kostadin
Telerik team
 answered on 31 Jul 2013
2 answers
106 views
I was wondering if there is a better approach than this one?
http://www.telerik.com/help/aspnet-ajax/treeview-data-binding-loading-related-tables.html

I have two tables (Countries and TvChannels) there and the following query:
SELECT
Ct.CountryName, Tv.ChannelID, Tv.ChannelName
FROM TvChannels AS Tv
INNER
JOIN
Countries AS Ct
ON
Tv.CountryID = Ct.CountryID
WHERE
Tv.IsActive = 1


Is there a better way to utilize this query instead so i can get the expected result e.g.
- United States
---- Channel No. 1
---- Channel No. 2
- United Kingdom
---- Channel No. 1
---- Channel No. 2
- Denmark
---- Channel No. 1
---- Channel No. 2
etc.
Kate
Telerik team
 answered on 31 Jul 2013
1 answer
132 views
Hi ,
I am using Radupload control to upload multiple files in my project.It Working Correctly on uploading single file .But It Is not working Multiple Files.It Upload only one file in multiple times with same name.Please give me the Solution.

In My aspx page:
 <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" 
                        TargetFolder="~/uploadattachment/" AllowedFileExtensions=".pdf,.doc,.docx,.txt,.gif,.jpg,jpeg,.png"
                        MaxFileSize="524288" Skin="Simple" MultipleFileSelection="Automatic" UploadedFilesRendering="BelowFileInput"
                        ChunkSize="0" Style="margin-right: 110px; margin-top: 10px" OnFileUploaded="RadAsyncUpload1_FileUploaded">
                    </telerik:RadAsyncUpload>

In My .cs page:

protected void RadAsyncUpload1_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs e)
        {       


            string fileid;
            UploadedFile file = RadAsyncUpload1.UploadedFiles[0];
            string filename = file.FileName;
            string pathname = Path.GetFileName(filename);
            string targetfolder = Server.MapPath(RadAsyncUpload1.TargetFolder);
            string folderpath = targetfolder + filename;           
            string temp = "";
            string fname = "";
            int cnt = 1;
            if (File.Exists(folderpath))
            {
               for (int i = 1; i <= cnt; i++)
               {
                    string woext = Path.GetFileNameWithoutExtension(filename);
                    string ext = Path.GetExtension(filename);
                    string addnum = woext + "(" + cnt + ")";
                    temp = addnum + ext;
                    if (File.Exists(targetfolder + temp))
                        cnt++;
               }

                fname = temp;
                e.File.SaveAs(Server.MapPath("~/uploadattachment/" + fname));
                fileid = fname;
                builder.Append(fileid).Append(",");
               
            }
            else
            {

                e.File.SaveAs(Server.MapPath("~/uploadattachment/" + filename));
                fileid = filename;
                builder.Append(fileid).Append(",");
              //  Id = builder.ToString();
            }
            Id = builder.ToString();
        } 
Princy
Top achievements
Rank 2
 answered on 31 Jul 2013
1 answer
95 views
How can i change a FieldType in Runtime on C#?

After a Add a field like PivotGridRowField. There is some method to change this type to PivotGridColumnField?

Maria Ilieva
Telerik team
 answered on 31 Jul 2013
2 answers
356 views
I am in love with the new RadGrid EditMode = Batch feature!

There is just two snags I have ran into.  I am switching our grid from EditMode = InPlace to Batch. I have removed the GradEditCommandColumn that I had in place.  Which helped a lot with my columns lining up since I also added in the Scrolling Feature.  :)   
<Telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
       <HeaderStyle Width="40px" />
       <ItemStyle CssClass="MyImageButton" />
</Telerik:GridEditCommandColumn>

If the date is older than a month, we need to lock down the grid so the users can not make any changes to it.  In the past I just hid the Edit and delete button for this.  Now, with Batch I am unsure how to turn off the edit mode?
GridTime.MasterTableView.GetColumn("EditCommandColumn").Visible = false;

Also, The grid is for our Time Management, so the headers say Sunday, Monday, etc with the corresponding dates underneath.  (ie this week the headers read: Sunday 07/21/2013, Monday 07/22/2013, etc). 

The code I have to do this blows up now.  (It errors on the first time in the example below).
GridHeaderItem headerItem = GridTime.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem;
headerItem["Sunday"].Text = reader.GetValue(0).ToString();
headerItem["Monday"].Text = reader.GetValue(1).ToString();
headerItem["Tuesday"].Text = reader.GetValue(2).ToString();
headerItem["Wednesday"].Text = reader.GetValue(3).ToString();
headerItem["Thursday"].Text = reader.GetValue(4).ToString();
headerItem["Friday"].Text = reader.GetValue(5).ToString();
headerItem["Saturday"].Text = reader.GetValue(6).ToString();

Error message: 

Index was outside the bounds of the array.

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.IndexOutOfRangeException: Index was outside the bounds of the array.

Any help will be much appreciated!
Antonio Stoilkov
Telerik team
 answered on 31 Jul 2013
3 answers
122 views

Hi,

 I am using RadDatePicker I have own image for the Icon.
 Am able to show it but it has border. could not remove it.
 Where should I apply style for it?


Best Regards,
Damodar
Princy
Top achievements
Rank 2
 answered on 31 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?