Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
189 views
I am using RadControls_for_ASP.NET_AJAX_2009_1_311.
<telerik:RadComboBox ID="radProject" AutoPostBack="True" 
runat="server" DropDownWidth="240px"          onselectedindexchanged="radProject_SelectedIndexChanged"                         MarkFirstMatch="True" ondatabinding="radProject_DataBinding" Skin="Web20" 
OnClientBlur="OnClientBlurHandler">
</telerik:RadComboBox>

In this i wanted to set dropdown width for the combobox so i have set DropDownWidth = "240px". This width is required only for some logins i.e the text is long only in some cases.
My question is can i set something like minimumdropdownwith and maximumdropdownwidth so that the combobox dropdownwidth will increase or decrease based on the text that will be loaded in the Combobox.
i found a link http://www.telerik.com/help/winforms/combo_propertiessizing.html but this is for winforms. Can i achieve the same in ajax controls.
Shinu
Top achievements
Rank 2
 answered on 03 Sep 2010
2 answers
221 views
Hello,

I have the GridDateTimeColumn in my grid. When I try to sort the values it sort correctly for 2 consecutive times and when I try the third consecutive time it fails to sort.

Any help will be appreciated.
<telerik:GridDateTimeColumn DataField="lastmodified" HeaderText="lastmodified" SortExpression="lastmodified" PickerType="DatePicker" UniqueName="lastmodified" ReadOnly="true" DataType="System.DateTime" DataFormatString="{0:d}"/>
 From the database I have the values in the smalldatetime format

Thanks,
Parth
Parth
Top achievements
Rank 1
 answered on 03 Sep 2010
7 answers
258 views
Hi Telerik,

At what point are you going to completely rewrite your documentation rather than providing documentation that appears to be more aimed at selling your products rather than providing detailed ordered explainations of your component functionality rather than selective uncommented code snippets? Clear concise step by step examples covering full implementation of each component would be nice as well.

Given the cost of your components I have to say it's some of the poorest documentation I've seen.

I find myself spending more time trying to work through your confused and often inadequate documentation than I do actually developing with the controls.

Cheers,

CW
Georgi Tunev
Telerik team
 answered on 03 Sep 2010
4 answers
1.2K+ views
We are setting toolbar buttons to disabled depending on user actions, and the buttons do indeed appear disabled, but if clicked, the client-side function still executes.  Here is sample code for disabling a button - is there something more we need to do?

var toolbar = $find(treeToolbarId);  
toolbar.findItemByValue("DeleteItemButton").disable();  
 

Thanks,
Sheryl
Jimmy Vithalani
Top achievements
Rank 1
 answered on 03 Sep 2010
1 answer
82 views
I have an interesting request from the business that we are not completely sure how to do and wonder if there is a Telerik control that may aid us in meeting the requirement.

We have a search result page that has a Telerik grid, which we currently provide the user the ability to export to Excel. That same result page also has some header information regarding the search criteria that was used and other data, all loading into asp:Label controls. The business is requesting to have this header information applied to the top of the Excel export when the grid data gets exported. Currently we can't think of a way to include the data that exists outside of the grid to export to the same Excel spreadsheet, let along as the header in the spreadsheet.

Is there a Telerik control/container that may allow for this functionality, or have you a coding suggestion that might allow this to happen?

Much thanks, Fred.
Sebastian
Telerik team
 answered on 03 Sep 2010
3 answers
515 views
Hi

I use radgrid with itemtemplate like this


<ItemTemplate>
            <asp:ImageButton ID="Pict" runat="server" ImageUrl='<%# "~/mypic/" + Eval("picture") %>'
                    OnClientClick='<%# "Pic_click(" + Eval("ID") + ")" %>' />

             <div style="text-align: left">
                <br />
               <span style="font-family:Verdana; font-size: large; color: #000080;">
                    <%# Eval("Name") %>
                    </span>
                    <br />
                    <br />
               <span style="font-size:large; font-family:Verdana; color: #800000;">
                    <%# Eval("price", "{0:N} TL") %>
                    </span>
                    <br />
                   
             </div>  

             <div align="right">
                 <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Add" ImageUrl="~/Common/B.png" />
             </div>

           
            </ItemTemplate>



i will put a button on page and when user clicked it i will change mygrid to standart column type grid without itemtemplates.
columns with (name, price, ....),  after reclicking will change to first type with itemtemplates.

how can i do this ?..


best regards
Princy
Top achievements
Rank 2
 answered on 03 Sep 2010
3 answers
108 views
Hi,
for me this is a bug (I'm using version 2010Q2).
I'm calling client side method set_text of a menu item and I've noticed it works only if the menu item has actually a not null text.

So in this scenario
<rad:RadMenuItem Text="Text1" />
the set_text("NewText") works.

On the opposite, in this scenario
<rad:RadMenuItem Text="" />
the set_text("NewText") doesn't work.

Best regards, Andrea Pirola
Yana
Telerik team
 answered on 03 Sep 2010
2 answers
189 views
Hello,

I use the serverside OnItemDataBound event to apply custom format condition logic.

In some columns I prefix the .Text-property of the TableCell with additional Information.

This works fine, but fails with HyperLinkColumns, as the .Text-Property only contains "&nbsp;". When I know change the Text property by prefixing it with something, the actual Hyperlink is not rendered, but myprefix + "&nbsp;"

How can I change this behaviour?

best regards and thanks in advance

Ulrik
Ulrich
Top achievements
Rank 1
 answered on 03 Sep 2010
1 answer
200 views

I have a problem, where if DataStartFiend and Dataendfield is null in db will throw an exception. Please advise thank you

aspx
<telerik:RadScheduler ID="RadScheduler1" runat="server"
    HoursPanelTimeFormat="htt" ValidationGroup="RadScheduler1" Width="100%" Height="600px"
    MinutesPerRow="5" Skin="Office2007" DayStartTime="08:00:00" DayEndTime="15:00:00" ColumnWidth="200px"
    DataKeyField="ID" DataStartField="Start" DataEndField="End" DataSubjectField="Subject"
    DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
    AllowDelete="false" AllowEdit="false" AllowInsert="false" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday"
    DayHeaderDateFormat="d MMMM yyyy" WeekHeaderDateFormat="d MMMM yyyy" TimelineView-HeaderDateFormat="d MMMM yyyy"
    TimelineView-ColumnHeaderDateFormat="d MMMM yyyy" MonthHeaderDateFormat="MMMM yyyy" SelectedView="WeekView">
   
</telerik:RadScheduler>

aspx.cs

public List<TimetablePeriod> TimetableCollection
{
  set
  {
            RadScheduler1.DataSource = value;
  }
}

TimetablePeriod.cs

 public TimetablePeriod(long studentId,  string startDate, string endDate,
            string weekDay, string startTime, string endTime, string teacherTitle, string roomCode)
        {
            this.studentId = studentId;
            this.startDate = startDate;
            this.endDate = endDate;
            this.weekDay = weekDay;
            this.startTime = startTime;
            this.endTime = endTime;
            this.roomCode = roomCode;
            this.recurParentID = null;
        }

public DateTime Start
        {
            get { return GetDate(startDate, startTime); }
        }

        public DateTime End
        {
            get { return GetDate(startDate, endTime); }
        }

  private DateTime GetDate(string date, string time)
        {
            int year, month, day, hour, minute, second;

            string[] dateParts = date.Split(new char[] { '-' });
            year = Convert.ToInt32(dateParts[0]);
            month = Convert.ToInt32(dateParts[1]);
            day = Convert.ToInt32(dateParts[2]);

            string[] timeParts = time.Split(new char[] { ':' });
            hour = Convert.ToInt32(timeParts[0]);
            minute = Convert.ToInt32(timeParts[1]);
            second = Convert.ToInt32(timeParts[2]);

            DateTime dt = new DateTime(year, month, day, hour, minute, second);
            dt = dt.AddDays(this.GetDayOffset());
            return dt;
        }

Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Sep 2010
1 answer
89 views
We are encountering a strange browser issue.  We have a page that checks for the existence of a querystring on page load.  If it does not exist, the page_load event calls the following:

                RadAjaxManager1.ResponseScripts.Add("OpenDialog();");

This is the javascript called:
        function OpenDialog() {
            var url = "dialogs/NewDialog.aspx";
            var windowName = "NewDialog";
            var window = GetRadWindowManager().getWindowByName(windowName);

            modalWindow = GetRadWindowManager().open(url, window);
            modalWindow.set_width(400);
            modalWindow.set_height(200);
            modalWindow.set_modal(true);
            modalWindow.center();
            modalWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);
            modalWindow.setActive(true);
        }

This works fine in IE8 and Chrome.  It does not open the modal window in IE 7 or FF 3.6.8.

BUT - as soon as I add a debug statement in the javascript like this:
        function OpenDialog() {
            alert("We are here");
            var url = "dialogs/NewDialog.aspx";
            var windowName = "NewDialog";
            var window = GetRadWindowManager().getWindowByName(windowName);

            modalWindow = GetRadWindowManager().open(url, window);
            modalWindow.set_width(400);
            modalWindow.set_height(200);
            modalWindow.set_modal(true);
            modalWindow.center();
            modalWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);
            modalWindow.setActive(true);
        }
It starts working fine in all browsers.

Can anyone help me out as to where I am going wrong?  Thanks.
Georgi Tunev
Telerik team
 answered on 03 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?