Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
139 views
Hi!

When I dbl-click on date and the modal pop up occurs, can I set a property that won't allow the user to type in the "Start time" and "End Time" values?   ie: I want them to click the combo box control to choose the date and time.  Right now, users tend to type in values (bad values) that cause issues.

Thanks!!

Scott
Veronica
Telerik team
 answered on 03 Nov 2010
1 answer
106 views
I am using RadRotator for an image gallery.  It works fine in Firefox but in IE I have run into a couple of bugs.  When the page first loads, the RadRotator does not show up and I need to refresh the page for it to be visible.  Also, the last item in the rotator is not being displayed on some pages.  Looking at the source code, the item is listed in the html just like the others, but it is not visible in the RadRotator.

<telerik:RadRotator ID="thumbRotator" runat="server" WrapFrames="false" RotatorType="ButtonsOver" UseSmoothScroll="True" Width="572px" Height="119" ItemWidth="145" FrameDuration="1"  ScrollDirection="Left,Right" OnItemClick="ShowImage" OnClientLoad="OnRotatorLoad" >
     <ItemTemplate>
           <img src='<%# DataBinder.Eval(Container.DataItem, "Image") %>' alt='gallery image' height='104' class="rotatorimage" />
     </ItemTemplate>
     <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />
</telerik:RadRotator>
Fiko
Telerik team
 answered on 03 Nov 2010
3 answers
102 views
Hello,

I noted in the latest release that you can combine numbers or "item links" with the RadRotator control.

I have looked through the example, however what I need to do is similar to natgeo.com with the images and numbers, but with the numbers on top. I currently have the rotator working fine and loading from my database, however when I attempt to add the numbers, the autoplay does not work and nothing changes unless you click a number.

I need both to work, the control plays by itself, you click a number it shows that item and then continues to play on it's own as normal.

Is there a way to do this?

Thanks
Fiko
Telerik team
 answered on 03 Nov 2010
1 answer
111 views
Hi
  I am using webservice to return items similar to demo. I need to have radio buttons in the items that postbacks. So i am dynamically creating radiobuttonlist and listitems in the getrotatoritems function in the webservice and since item can only return pure client html, i am using htmltextwriter to render the radiobuttonlist into string and attaching that to item.Html property. The issue i am having is htmltextwriter is loosing the autopostback property of the radiobuttonlist, so even though i am setting autopostback = true, its not posting back. Did i miss anything?? Or is there any workaround for this?

thanks
-Samir
Fiko
Telerik team
 answered on 03 Nov 2010
4 answers
171 views
We would like to see if it's possible to open radmenu by mouse over an image already existing on the page.

Here is an example. We have an image on the page, say it's "News.JPG". When user mouse-over this image, we'd like to open a radmenu to the right of the image that contains multiple items like "CNN", "MSNBC", "FoxNews", etc.

During my research, I found out that I have to make the New.JPG as the root radmenu item. Unfortunately, I am not able to do that. The image must stay as an image by itself, not being part of the radmenu at all.

So is this possible?

Thanks!

Penn
Veronica
Telerik team
 answered on 03 Nov 2010
3 answers
206 views
Hi,

I have a site.master page which contians a radmenu. I have another nested master page nested from site.master called submaster . I was trying to get the menu selected value in the pageload event of the submaster.

This code is in the submaster  page_load event

RadMenu cMenu = (RadMenu)Master.FindControl("Radmenu1");

 

string cItem = cMenu.SelectedValue;

Here I am getting cItem as null. I have populated the Text and Value properties of every menu item in the site.master page. Is the syntax I am using correct? Any help is appreciated.

I have a default page created from the submaster which displays the contents.
I tried to put the same code in the default.aspx page also, but I am not getting the selected value.

Thanks
JK

 

 

Veronica
Telerik team
 answered on 03 Nov 2010
1 answer
54 views
Hi,

I have a two RadTextBox controls on the page. When the focus moves out of both of them (onblur event) the RadWindow is getting called from javascript. On RadWindow user have a choice to select a value or click Cancel button and in both cases the window will be closed. If the user selected a value the RadTextBoxes will be populated with selected value and focus will be moved to next field.
Now, when the user hits Cancel button the focus should move to the first RadTextBox. Instead the RadWindow opens-up again and will do so as long as user hits Cancel button. It looks like when I'm setting the focus to the first RadTextBox somehow the onblur event gets fired again.
We started experiencing this problem after switching to version 2010.2.713.35 from 2008.3.1314.35.

Any help would be greatly appreciated.
Thanks.
Georgi Tunev
Telerik team
 answered on 03 Nov 2010
3 answers
288 views

 

Hi,

 

I am having a radgrid with a Date field in dd/MM/yyyy format as per your site’s codes. I am having problem with filtering with Date-field in the grid, where I am getting an error on “filterItem.OwnerTableView.Rebind(); , saying “Telerik.Web.UI.ParseException: Expression expected”.  My code is as follows

 

Any idea , where I am wrong?

 

 

 

===================================

 

 

<telerik:RadGrid ID="grdActionList" Skin="WebBlue"

                                runat="server" GridLines="None"

                                AutoGenerateColumns="False"

                                AllowSorting="True"

                                AllowFilteringByColumn = "true"

                                AllowPaging="True" PageSize="10"

                                OnNeedDataSource="grdActionList_NeedDataSource"

                                OnItemCommand="grdActionList_ItemCommand">

                               

                                <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>                               

                                <MasterTableView DataKeyNames="Action_Id" CommandItemDisplay="Top" EditMode="PopUp">

                                <CommandItemSettings ShowAddNewRecordButton="false"/>

                                <EditFormSettings PopUpSettings-Modal="true" />

                                <Columns>

 

                                    <telerik:GridBoundColumn DataField="Action_Id" DataType="System.Int32"

                                        HeaderText="Action_Id" ReadOnly="True" SortExpression="Action_Id"

                                        UniqueName="Action_Id" Visible="false" >

                                    </telerik:GridBoundColumn>

                                   

                                    <telerik:GridBoundColumn DataField="Status" DataType="System.Int32" Visible="false"

                                        UniqueName="Status" ReadOnly="true">

                                    </telerik:GridBoundColumn>

                                    

                                    <telerik:GridBoundColumn DataField="Content_Id" DataType="System.Int32"

                                        HeaderText="Content_Id" SortExpression="Content_Id"

                                        UniqueName="Content_Id" ReadOnly="true" Visible="false">

                                    </telerik:GridBoundColumn>

                                   

                                   

                                     <telerik:GridBoundColumn DataField="Create_Date" DataFormatString="{0:dd/MM/yyyy}"

                                        HeaderText="Created On" SortExpression="Create_Date" ItemStyle-Width="150"

                                        UniqueName="Create_Date" ReadOnly="true">

                                    </telerik:GridBoundColumn>

                                   

                                    <telerik:GridBoundColumn DataField="JOMC_ID"

                                        HeaderText="Unique Id" SortExpression="JOMC_ID" ItemStyle-Width="150"

                                        UniqueName="JOMC_ID" ReadOnly="true">

                                    </telerik:GridBoundColumn>

                                   

                                    <telerik:GridBoundColumn DataField="Module_Content_Text"

                                        HeaderText="Action name" SortExpression="Module_Content_Text"

                                        UniqueName="Module_Content_Text" ItemStyle-Width="450">

                                    </telerik:GridBoundColumn>

                                   

                                  

                                </Columns>

                                </MasterTableView>

                                <ClientSettings EnableRowHoverStyle="true"></ClientSettings>

                                </telerik:RadGrid>

 

protected void Page_Load(object sender, EventArgs e)

    {

        if (!IsPostBack)

        {

            displayActionGrid();

        }

 

    }

 

 

 

 

    protected void grdActionList_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)

    {

        #region --------------Filtering-------------------------------

        if ((e.CommandName == RadGrid.FilterCommandName ) && (((Pair)e.CommandArgument).Second.ToString() == "Create_Date") &&

            (((Pair)e.CommandArgument).First.ToString() != "NoFilter"))

                      

        {

          e.Canceled = true;

          GridFilteringItem filterItem = (GridFilteringItem)e.Item;

          //string currentPattern = (TextBox)filterItem(((Pair)e.CommandArgument).Second).Controls(0).Text;

          //string currentPattern = "{0:dd/MM/yyyy}";

          string currentPattern = "dd/MM/yyyy";

          string filterPattern = "";

          string filterPatternAssist= "";

          //char sep = "a";

          if (currentPattern.IndexOf(" ") != -1)

          {

            currentPattern = currentPattern.Replace(" ", "/");

          }

          string[] vals = currentPattern.Split('/');

          string filterOption = Convert.ToString(((Pair)e.CommandArgument).First);

 

          if (filterOption != "IsNull" && filterOption != "NotIsNull")

          {

            if (vals.Length > 3)

            {

                filterPatternAssist = vals[4] + "/" + vals[3] + "/" + vals[5];

            }

            filterPattern = vals[1] + "/" + vals[0] + "/" + vals[2];

          }

 

          GridBoundColumn dateColumn = (GridBoundColumn)e.Item.OwnerTableView.GetColumnSafe( "Create_Date");

 

          switch(filterOption)

          {

                        case "EqualTo":

                           filterPattern = "[Create_Date] = '" + filterPattern + "'";

                           dateColumn.CurrentFilterFunction = GridKnownFunction.EqualTo;

                           break;

                        case "NotEqualTo":

                           filterPattern = "Not [Create_Date] = '" + filterPattern + "'";

                           dateColumn.CurrentFilterFunction = GridKnownFunction.NotEqualTo;

                           break;

                        case "GreaterThan":

                           filterPattern = "[Create_Date] > '" + filterPattern + "'";

                           dateColumn.CurrentFilterFunction = GridKnownFunction.GreaterThan;

                           break;

                        case "LessThan":

                           filterPattern = "[Create_Date] < '" + filterPattern + "'";

                           dateColumn.CurrentFilterFunction = GridKnownFunction.LessThan;

                           break;

                        case "GreaterThanOrEqualTo":

                           filterPattern = "[Create_Date] >= '" + filterPattern + "'";

                           dateColumn.CurrentFilterFunction = GridKnownFunction.GreaterThanOrEqualTo;

                           break;

                        case "LessThanOrEqualTo":

                           filterPattern = "[Create_Date] <= '" + filterPattern + "'";

                           dateColumn.CurrentFilterFunction = GridKnownFunction.LessThanOrEqualTo;

                           break;

                        case "Between":

                           filterPattern = "'" + filterPattern + "' <= [Create_Date] AND [Create_Date] <= '" + filterPatternAssist + "'";

                           dateColumn.CurrentFilterFunction = GridKnownFunction.Between;

                           break;

                        case "NotBetween":

                           filterPattern = "[Create_Date] <= '" + filterPattern + "' OR [Create_Date] >= '" + filterPatternAssist + "'";

                           dateColumn.CurrentFilterFunction = GridKnownFunction.NotBetween;

                           break;

                        case "IsNull":

                           break;

                        case "NotIsNull":

                           break;

           }

          foreach (GridColumn column in grdActionList.MasterTableView.Columns)

          {

            if (column.UniqueName != "Create_Date")

            {

              column.CurrentFilterFunction = GridKnownFunction.NoFilter;

              column.CurrentFilterValue = string.Empty;

            }

          }

          Session["filterPattern"] = filterPattern;

 

          dateColumn.CurrentFilterValue = currentPattern;

          filterItem.OwnerTableView.Rebind();

            

        }

        //Add more conditional checks for commands here if necessary

        else if (e.CommandName != RadGrid.SortCommandName && e.CommandName != RadGrid.PageCommandName)

        {

          Session["filterPattern"] = null;

          GridBoundColumn dateColumn = (GridBoundColumn)e.Item.OwnerTableView.GetColumnSafe( "Create_Date");

          dateColumn.CurrentFilterFunction = GridKnownFunction.NoFilter;

          dateColumn.CurrentFilterValue = string.Empty;

        }

 

        #endregion

 

 

    }

 

 

    #region Radgrid integration

    private void displayActionGrid()

    {

        JOMCMiddleWare.BL.Actions oAction = new JOMCMiddleWare.BL.Actions();

        DataTable dt = new DataTable();

        oAction._Company_Id = System.Convert.ToInt32(Session[JOMCSession.__Session_Company_Id]);

        oAction._Language_Id = System.Convert.ToInt32(Session[JOMCSession.__Session_Lanuage_Id]);

        dt = oAction.GetDataAllAction();

        grdActionList.DataSource = dt;

        grdActionList.DataBind();

    }

 

    private DataTable GridSource

    {

        get

        {

            JOMCMiddleWare.BL.Actions oAction = new JOMCMiddleWare.BL.Actions();

            DataTable dt = new DataTable();

            oAction._Company_Id = System.Convert.ToInt32(Session[JOMCSession.__Session_Company_Id]);

            oAction._Language_Id = System.Convert.ToInt32(Session[JOMCSession.__Session_Lanuage_Id]);

            dt = oAction.GetDataAllAction();

            return dt;

        }

    }

 

    protected void grdActionList_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

    {

        grdActionList.DataSource = this.GridSource;

        //----------MS------26-10-------------

        if (Session["filterPattern"] != null)

        {

            grdActionList.MasterTableView.FilterExpression = (string)Session["filterPattern"];

        }

        //----------ME------------------

    }

 

 

    #endregion

Thanks!!

 

Radoslav
Telerik team
 answered on 03 Nov 2010
1 answer
104 views
I am creating an application where i need to display images as slideshow. I am using radwindow for displaying images as slide show.
The problem is that the rad window opens only inside my application.  i need to view the slideshow in full screen, ie i need to use the entire screen to show my image and i am unable to do it.
Is there any solution where i can open my slideshow page as a seperate popup page where i can move the window any where in the screen...
now i am able to move the radwindow only inside my web application..
Georgi Tunev
Telerik team
 answered on 03 Nov 2010
1 answer
183 views
Hi there
i am using radsitemap in listview and then bind radsitemap to Listview well it works fine but it doesnt show parent node and therefore nodelines.please refer code below
<ItemTemplate>
                         <li class="staff-item">
                             <div class="photo-container">
                                  <a href='<%# DataBinder.Eval(Container.DataItem,"PageUrl") %>' >
                                     <img src='<%# DataBinder.Eval(Container.DataItem,"Photo") %>' alt="" height="110" width="90"/>
                                  </a>
                             </div>
                             <div class="data-container">
                                  <ul>
                                     <li>
                                        <a href='<%# DataBinder.Eval(Container.DataItem,"PageUrl") %>'>
                                            <%# DataBinder.Eval(Container.DataItem, "Name")%>
                                        </a>
                                     </li>
                                     <li><%# DataBinder.Eval(Container.DataItem, "PrimaryTitle")%></li>
                                     <li>
                                      <!-- <%# DataBinder.Eval(Container.DataItem, "Area")%> -->
                                        <Telerik:RadSiteMap ID="radSiteMap" DataSource='<%#DataBinder.Eval(Container.DataItem, "Areas") %>'  DataFieldID="ID" DataFieldParentID="ParentID"
                                                          DataTextField="AreaText" ShowNodeLines="true" runat="server" >
                                                                                             
                                      </Telerik:RadSiteMap>
                                    </li>
                                  </ul>
                             </div>
 
                         </li>  
                    </ItemTemplate>
public class FacultyStaff {
 
       public string ID { get; set; }
       public string Name { get; set; }
       public string Photo { get; set; }
       public string PrimaryTitle { get; set; }
       public string PageUrl { get; set; }
       public List<FacultyArea> Areas { get; set; }
       public string Area { get; set; }
   }
   public class FacultyArea {
 
       public string ID { get; set; }
       public string AreaText { get; set; }
       public string ParentID { get; set; }
   }
if (item["AreaDirectory"] != null)  {
                  /*Code to get only first area of Speciality
                  string[] Areas = item["AreaDirectory"].ToString().Split(new char[] { ';' });
                  string[] Area = Areas[0].Split(new char[] { '|' });
                  faculty.Area = Area[0]; */
 
                  /*Code To Display all areas in Telerik SiteMap Control */
                  List<FacultyArea> facultyareas = new List<FacultyArea>();
                  TaxonomyFieldValueCollection areas = (TaxonomyFieldValueCollection)item["AreaDirectory"];
                  foreach (TaxonomyFieldValue area in areas) {
                      FacultyArea facultyarea = new FacultyArea();
                      facultyarea.AreaText = area.Label;
                      facultyarea.ID = area.TermGuid;
                      facultyarea.ParentID = "46355449-ACD0-412C-A80F-9C91872B2EA0";
                      facultyareas.Add(facultyarea);
                       
                  }
                  FacultyArea parentAreas = new FacultyArea() { ID = "46355449-ACD0-412C-A80F-9C91872B2EA0", ParentID = "D59B0E15-8207-439F-8034-841887AF53D8", AreaText = "Special Areas" };
                  facultyareas.Add(parentAreas);
                  faculty.Areas = facultyareas;
                   
                }

Please advise me
Thanks
Ronak
Yana
Telerik team
 answered on 03 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?