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

How can I make  RadDatePicker's default date to today's date when it opens? My RadDatePicker is one of the column in the radgrid, when I do filter, I like to open the RadDatePicker with today's date highlighted.

Thanks,
Sigma
Shinu
Top achievements
Rank 2
 answered on 31 Jan 2013
1 answer
329 views
Hi,

I have a RadDatePicker in the EditItemTemplate of RadGRid. How to make the datepicker readonly in edit mode?

<EditItemTemplate>
   <telerik:RadDatePicker ID="RadDatePicker1" runat="server" ></telerik:RadDatePicker>
</EditItemTemplate>

Thanks,
Sigma
Shinu
Top achievements
Rank 2
 answered on 31 Jan 2013
1 answer
71 views
Data Access Layer
//Getter and setter method
public string Url
{
    get return _url; }
    set { _url = value; }
}
public string TargetAudience
{
    get return _targetAudience; }
    set { _targetAudience = value; }
}
public string Image
{
    get return _image; }
    set { _image = value; }
}
public string OnMouseOverText
{
    get return _onMouseOverText; }
    set { _onMouseOverText = value; }
}
public int AdvertisementID
{
    get return _advertisementID; }
    set { _advertisementID = value; }
}
public int Location
{
    get return _location; }
    set { _location = value; }
}
//Constructor
 public AdvertisementDAL(){}
 public AdvertisementDAL(int advertisementID, int location,string image,
    string targetAudience,string url, string onMouseOverText)
{
    _advertisementID = advertisementID;
    _location = location;
    _image = image;
    _targetAudience = targetAudience;
    _url = url;
    _onMouseOverText = onMouseOverText;
}
         
public int updateNoOfClick(DateTime now, int ID)
        {
            string sql = "Select NoOfClick From AdvertisementRecord " +
                "Where RecordDate = @recordDate AND FK_AdvertisementID = @aID";
            SqlConnection conn = new SqlConnection(_connStr);
            SqlCommand cmd = new SqlCommand(sql, conn);
            cmd.Parameters.AddWithValue("@recordDate", now);
            cmd.Parameters.AddWithValue("@aID", ID);
            conn.Open();
            int noOfClick = int.Parse(cmd.ExecuteScalar().ToString());
            noOfClick++;
            conn.Close();
            string sql1 = "Update AdvertisementRecord SET NoOfClick = @Click "
            "WHERE RecordDate = @Date AND FK_ADvertisementID = @aID";
 
            //SqlConnection conn = new SqlConnection(_connStr);
            SqlCommand cmd1 = new SqlCommand(sql1, conn);
            cmd1.Parameters.AddWithValue("@Click", noOfClick);
            cmd1.Parameters.AddWithValue("@aID", ID);
            cmd1.Parameters.AddWithValue("@Date", now);
            conn.Open();
            int row = 0;
            row = cmd1.ExecuteNonQuery();
            conn.Close();
            return row;
        }
        public AdvertisementDAL selectAdvertisementLocation1(DateTime now, string gender)
        {
            AdvertisementDAL dal = null;
            string sql = "Select * From Advertisement Where @currentDate between StartDate AND EndDate AND TargetAudience = @gender AND Location = 1";
            SqlConnection conn = new SqlConnection(_connStr);
            SqlCommand cmd = new SqlCommand(sql, conn);
            cmd.Parameters.AddWithValue("@currentDate", now);
            cmd.Parameters.AddWithValue("@gender", gender);
            conn.Open();
            SqlDataReader dr = cmd.ExecuteReader();
 
            while (dr.Read())
            {
                _advertisementID = int.Parse(dr["AdvertisementID"].ToString());
                _location = int.Parse(dr["Location"].ToString());
                _image = dr["Image"].ToString();
                _targetAudience = dr["TargetAudience"].ToString();
                _url = dr["Url"].ToString();
                _onMouseOverText = dr["OnMouseOverText"].ToString();
                dal = new AdvertisementDAL(_advertisementID, _location, _image, _targetAudience,
                    _url, _onMouseOverText);
            }
            conn.Close();
            dr.Close();
            dr.Dispose();
            return dal;
        }
 
This is my business Logic Layer
public AdvertisementDAL selectAdLocation1(DateTime now, string gender)
        {
            AdvertisementDAL dal = new AdvertisementDAL();
            return dal.selectAdvertisementLocation1(now, gender);
        }
        public void InsertOrUpdateupdateNoOfClick(DateTime now, int aID)
        {
            AdvertisementDAL dal = new AdvertisementDAL();
            int existDate = dal.checkRecordDateIsExist(now, aID);
            if (existDate == 0)
            {
                dal.insertAdvertisementRecord(now, aID);
            }
            else if (existDate > 0)
            {
                dal.updateNoOfClick(now, aID);
            }
        }


Presentation Layer.
                        <telerik:RadRotator ID="RadRotator1" runat="server">
                            <ItemTemplate>
                                <asp:ImageButton ID="ImageButton1" runat="server" 
    Height="224px" Width="102px" />
                            </ItemTemplate>
                        </telerik:RadRotator>


I have a radrotator with a image button control. I wanted the rad rotator look similar like this 
http://demos.telerik.com/aspnet-ajax/rotator/examples/bannerrotation/defaultcs.aspx
They will load a lot of advertisement images.  
when a user click on the specific advertisement, 
they will update the specific advertisement the no of click.  
The problem is how do I do it in aspx.cs? at page_load

Marin Bratanov
Telerik team
 answered on 31 Jan 2013
4 answers
211 views
Hi,

i use RadTab with Metro skin. RadTab shows starting letter in lower case.
How can i change starting letter lower case to upper case?

For Example: - product detail
i want to show:- Product Detail

Thanks In Advance ....
Madhu Palakurthi
Top achievements
Rank 1
 answered on 31 Jan 2013
1 answer
134 views
Hello.
I have a problem. I'm trying to achive one thing ( as I wrote in a title ), but what I have is hard to get rid of.
Data source is gotten from a database as a list via linq. I set up groupin by expression tags
<GroupByExpressions>
    <telerik:GridGroupByExpression>
        <SelectFields>
            <telerik:GridGroupByField FieldAlias="Gmina" FieldName="NazwaOrganuProwadzacego"
                FormatString="{0:D}" />
        </SelectFields>
        <GroupByFields>
            <telerik:GridGroupByField FieldName="NazwaOrganuProwadzacego" SortOrder="Ascending" />
        </GroupByFields>
    </telerik:GridGroupByExpression>
    <telerik:GridGroupByExpression>
        <SelectFields>
            <telerik:GridGroupByField FieldAlias="Nazwa Placówki" FieldName="NazwaPlacowki" FormatString="{0:D}" />
        </SelectFields>
        <GroupByFields>
            <telerik:GridGroupByField FieldName="NazwaPlacowki" SortOrder="Ascending" />
        </GroupByFields>
    </telerik:GridGroupByExpression>
</GroupByExpressions>
And it is groupped but it's too much for me.
I made a picture of a simple table that represents of how it looks like ( "is.png" ), and how I want it to look like ( "want.png" ).

Thanks in advance for every kind of help.
Maciej.
Maciej
Top achievements
Rank 1
 answered on 31 Jan 2013
3 answers
303 views
I have a RadMultiPage dropped in on a SharePoint 2010 webpart page. The RadMultipage is associated with a RadTabstrip and has been setup for 'load on demand' behavior as described in the demo:
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/loadondemand/defaultcs.aspx

I use identical techniques and load user controls directly into each RadPageView. The problem is 3 of the user controls contain a RadGrid and when the tab item is clicked and the page view is loaded, I get the error as shown in the image linked below.

It fails in not only IE 10 but in IE 9, FF and Chrome too. Although the errors are not the same for FF and Chrome.

Other things to note:

A regular asp ScriptManager is used from the default master page in SP 2010.
Controls are ajaxified using a RadAjaxManager.
The RadAjaxManager, a RadFormDecorator and a RadSkinManager are added to the page programmatically.
A RadStyleSheet manager has been added to the page declaratively (for now).
All the web.config sections have been checked for correctness to support the RadAjaxManager and RadStyleSheetManager from Telerik documentation and prior posts on Telerik forums.

Please shed some light on how to fix this issue.

Thanks.

 
Kalina
Telerik team
 answered on 31 Jan 2013
1 answer
59 views
Hi,

When testing the ASP.NET AJAX component, I ran into a serieus issue. When using the component and testing it on a local machine, everything works great, but when testing it on a Windows 2008 IIS7 machine, the "resonse.redirect" methode no longer works.
After a long search, I found out that the problem starts from the moment you apply the function "Convert to Telerik website" and de dll files are attached to the solution and de "web.config" file is modified. Even when you don't use any of the Telerik functions, the function no longer works.

After a long search I stumbled upon some information telling people that a bug in Windows 2008 disables the function when Ajax is used. This bug is almost 4 years old and I can't seem to find any bug fix for win 2008.

I've tried almost any recommended workaround, without any luck.

Things I've tried:
- Replaced the "response.redirect" methode by  "RadAjaxManager1.Redirect" and  "RadAjaxPanel1.Redirect", without any luck.
- Added "<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>" to the web.config, no luck.
- Added "ValidateRequest="false"" and "enableEventValidation="false" to the page directives, without any improvement.

It's really frustrating to see that this 4 year old issue isn't solved by Microsoft yet.

Does anyone have the same experience on Windows 2008? Does anyone have a solid fix for this problem?

Thanx for any feedback...

John
Antonio Stoilkov
Telerik team
 answered on 31 Jan 2013
1 answer
84 views

I've got the following grid with grouping setup. I'd like it so that they can't remove the category group but can add and remove the other 3 .

Is that possible?   thanks



<telerik:RadGrid ID="RadGrid1"  runat="server" PageSize="50"
    AllowSorting="True" AllowMultiRowSelection="True" AllowPaging="false" ShowGroupPanel="True" OnPageIndexChanged="RadGrid1_OnPageIndexChanged"
    AutoGenerateColumns="False" GridLines="none" OnNeedDataSource="RadGrid1_OnNeedDataSource">
    <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
    <MasterTableView Width="100%" >
        <GroupByExpressions >
             
            <telerik:GridGroupByExpression >
            <SelectFields>
                <telerik:GridGroupByField FieldAlias="Category" FieldName="Category"  />                  
            </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="Category"  SortOrder="Ascending"    />
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridBoundColumn SortExpression="PatientName" HeaderText="PatientName" HeaderButtonType="TextButton" DataField="PatientName"  Groupable="false"  />
            <telerik:GridBoundColumn SortExpression="Category" HeaderText="Category" HeaderButtonType="TextButton"  DataField="Category"  />
            <telerik:GridBoundColumn SortExpression="LastTaskTime"  HeaderText="LastTaskTime" HeaderButtonType="TextButton" DataField="LastTaskTime"  />
            <telerik:GridBoundColumn SortExpression="CaseStatus" HeaderText="CaseStatus" HeaderButtonType="TextButton" DataField="CaseStatus" />
        </Columns>
    </MasterTableView>
    <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True" >
        <Selecting AllowRowSelect="True" ></Selecting>
        <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True"
            ResizeGridOnColumnResize="False"></Resizing>
    </ClientSettings>
    <GroupingSettings ShowUnGroupButton="false">
     
    </GroupingSettings>
</telerik:RadGrid>
Radoslav
Telerik team
 answered on 31 Jan 2013
1 answer
99 views
Hello,
I am using rad grid with Hierarchical property..Can we set controls dynamically in detail tables.If its not possible how to create property grid in web application using telerik..

Shinu
Top achievements
Rank 2
 answered on 31 Jan 2013
3 answers
169 views
I cannot seem to figure out why but NavigateURL does not work on any iOS device.

I have the latest internal builds loaded.  Here is the markup:

<telerik:RadMenu ID="RadMenu1" runat="server" Width="960" EnableRoundedCorners="True" Skin="Metro"
           EnableShadows="True" ExpandAnimation-Type="OutQuad" CollapseAnimation-Type="InOutElastic" >
           <Items>
               <telerik:RadMenuItem Text="Products">
                   <Items>
                       <telerik:RadMenuItem Text="V3<span class='ss'> TM</span>" Target="_blank"
                           ImageUrl="/images/v3.png" NavigateUrl="http://<;LINK>" />
                       <telerik:RadMenuItem Text="EnVvy<span class='ss'> TM</span>"
                           ImageUrl="/images/envvy.png" NavigateUrl="http://<;LINK>" />
                    </Items>
               </telerik:RadMenuItem>
               ...
           </Items>
       </telerik:RadMenu>


Any ideas?

Thanks,

Grant
Princy
Top achievements
Rank 2
 answered on 31 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?