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

I Have an imge column in rad grid. I want to apply custom filter to filter the records on the basis of image name as default filter function available are not of my use.

I want to keep the new menu items on filter menu for that column only and rest of column in grid will be using the default filter function by using allowing filter=true.

Please suggest how to achieve this.Help on this would be highly appreciated.


Thanks,
Manjeet
Manjeet
Top achievements
Rank 1
 answered on 03 Nov 2011
2 answers
160 views
Greetings,

I'd like to set a GridButtonColumn invisible in the case the user does not have the rights to delete a row ( for instance )

The GridButtonColumn is declared like this:

<telerik:GridButtonColumn CommandName="Delete" Text="Supprimer" UniqueName="column2">
</telerik:GridButtonColumn>


The condition is this one :
string req = " SELECT rights from utilisateur WHERE login = '" + login + "'";
int test = DA.DAConnexion.executeQueryScalar(req);
Session["rights"] = test;
if Session["rights"] gets the value 0, the GridButtonColumn must not be visible


Thanks in advance for your help
Adigard
Top achievements
Rank 1
 answered on 03 Nov 2011
1 answer
133 views
I am creating the following bar chart programmatically. It seems when the number of records gets high enough, the chart label overlaps with the chart image. (See attached picture). Is there any way to resolve this?

Peshito
Telerik team
 answered on 03 Nov 2011
1 answer
150 views
I put the RadWindow.SetUrl("about:blank") on close button to close my RadWindow.
 It is working fine for Monzilla firefox but not with IE.
Don't know why, Please Help.

My Code is as :
function Close1() {
           var oWindow = GetRadWindow();
           oWindow.SetUrl("about:blank");
           //Passing the argument to the close method
           oWindow.close("undefined");
       }
Marin Bratanov
Telerik team
 answered on 03 Nov 2011
5 answers
1.2K+ views
When I try to retrieve the ClientID of radButton control, I got the Id of the control rather than the .NET format

ctl00_....._btnSave and the getElementById returns a null value. When I do the same thing in a non RadWindow, everything works fine. Please help me solve this issue.


The rad popup window:

 

 

   function ShowInsertForm(url, width, height, idName, idValue) {
    var extUrl = [url, "?" + idName + "=", idValue];
    var oWnd = window.radopen(extUrl.join(""));
    oWnd.setSize(width, height);
    oWnd.set_modal(true);
    oWnd.set_visibleStatusbar(false);
    oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);

    return false;
   }


This popup window has a Save and a Cancel buttons. When the user makes changes to the form and clicks the Cancel button, I need to display a javascript message to allow the user to confirm whether s/he wants to save the changes. if the answer is "YES", I want to execute the click event of the Save button. Here how I proceed:

In the code behind:

Protected Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
      If _presenter.IsDataChanged(Me.GetUserData()) Then

        InjectScript.Text = "<script type='text/javascript'>askquestion('" & btnSave.ClientID & "')</script>"
      Else
        InjectScript.Text = "<script type='text/javascript'>CancelEdit()</script>"
      End If
End Sub

In the Aspx code:
function askquestion() {
      if (confirm("Data has changed. Do you want to save the changes?")) {
          document.getElementById('<%=btnSave.ClientID %>').click();
      }
      else {
          CancelEdit();
      }

      return false;
  }


Thank you in advance.

Masterdom5
  
Marin Bratanov
Telerik team
 answered on 03 Nov 2011
4 answers
182 views
Hi,

My requirement is :

I am generating a div on button click and i want a dynamically generated rad combo box in that div. I am able to create a div and rad combo box but not able to put it in the div. Please check my code and provide some solution. Please i need solution as soon as possible.

.ASPX Page
My button :
 <asp:Button runat="server" ID="btnAddDiv" ToolTip="+ Add Clause(s)" Text="+"
            CssClass="btnAdd" onclick="btnAddDiv_Click"/>
Div :
<div id="testing" runat="server"></div>

.ASPX.CS Page

int Counter =0;
  protected void btnAddDiv_Click(object sender, EventArgs e)
        {

            RadComboBox Box = new RadComboBox();
            Box.ID = "RCB" + Counter;
            Box.DataSource = ObjGetData.GetClause();
            Box.DataValueField = "ClauseHeadingID";
            Box.DataTextField = "ClauseHeadingType";
            Box.DataBind();
            testing.InnerHtml = testing.InnerHtml + "<div id='text" + Counter + "'> " + I WANT TO SHOW MY COMBO BOX HERE +"</div>";
            
            Counter += 1;

        }
 
I am doing this because i want to generate this div with combo box according to user dynamically and user can generate it infinite time.

Note: ignore my cap words. I just want to highlight my requirement.

Thanks
Manish
Ivana
Telerik team
 answered on 03 Nov 2011
3 answers
148 views

I found a problem with the date components for some reason the system will never accept that I enter a date of any first Sunday after the 15th of the month of October every year.

When I enter one of these dates and move the focus out of the component, the system automatically switches to the previous day.

You can notice the issue even in the pages of the demonstration site:
RadDatePicker
http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/custompopup/defaultcs.aspx

RadDateInput
http://demos.telerik.com/aspnet-ajax/input/examples/raddateinput/firstlook/defaultcs.aspx

Calendar / Range Selection
http://demos.telerik.com/aspnet-ajax/calendar/examples/functionality/rangeselection/defaultcs.aspx

Dates:
10/19/2014
10/20/2013
10/21/2012
10/16/2011
10/17/2010
10/18/2009
10/19/2008
10/21/2007
10/22/2006
10/16/2005
10/17/2004
10/19/2003
10/20/2002
10/21/2001
10/22/2000
10/17/1999
10/18/1998
10/19/1997
10/20/1996
10/22/1995
10/16/1994
10/17/1993
10/18/1992
10/20/1991
10/21/1990
10/22/1989
10/16/1988
10/18/1987
10/19/1986
10/20/1985
10/21/1984
10/16/1983
10/17/1982
10/18/1981
10/19/1980

Vasil
Telerik team
 answered on 03 Nov 2011
6 answers
404 views

Hi,

I want to use dropdowns in a radgrid.

When i enter into edit mode, i want to show the selected value in the dropdown .

How can i do this?
So far this is my code.

Thanks




<telerik:GridTemplateColumn HeaderText="City">
                        <ItemTemplate>
                            <asp:Label ID="lblcity" runat="server" Text='<%# Bind("CityID") %>'></asp:Label>
                          
                              
                        </ItemTemplate>
                        <EditItemTemplate>
                          
                            <asp:DropDownList ID="ddlCity" runat="server">
                            </asp:DropDownList>
                          
                          
                        </EditItemTemplate>
                          
                          
                        </telerik:GridTemplateColumn>




Code Behind:

protected void gdv_Drivers_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
       {
            
           if ((e.Item is GridEditableItem && ((GridEditableItem)e.Item).IsInEditMode))
           {
               string where = null;
             //  string cityid = ((DropDownList)e.Item.FindControl("ddlcity")).SelectedValue;
             //  string stateid = ((DropDownList)e.Item.FindControl("ddlstate")).SelectedValue;
             //  string zipid = ((DropDownList)e.Item.FindControl("ddlzip")).SelectedValue;
               DropDownList ddlcity, ddlstate, ddlzip;
               ddlcity = ((DropDownList)e.Item.FindControl("ddlCity"));
               ddlstate = ((DropDownList)e.Item.FindControl("ddlState"));
               ddlzip = ((DropDownList)e.Item.FindControl("ddlZip"));
               myGlobal.LoadDropDown(ddlcity, "tbl_CityLkup", "CityID", "CityNm", "GCRPC", "CityID", "CityNm", where);
               myGlobal.LoadDropDown(ddlstate, "tbl_StateLkup", "StateID", "StateNm", "GCRPC", "StateID", "StateNm", where);
               myGlobal.LoadDropDown(ddlzip, "tbl_ZipLkup", "ZipID", "ZipCd", "GCRPC", "ZipID", "ZipCd", where);
                         
             
           }
            
       }
Shinu
Top achievements
Rank 2
 answered on 03 Nov 2011
1 answer
207 views
Hello Telerik Team,

I have a Radgrid on my aspx page which is using Nested View Template for drill down of data based on a datakeyname in the first level.
I want to disable the drilldown ability only for the first row and keep it as is for rest of the rows in Radgrid.
This is because the first row on drill down does not contain any data, in any case in our implementation.
Hence, drill down for first row needs to be disabled.
Please let me know if it is possible to do that.
Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Nov 2011
3 answers
198 views
Hello,

Last year I had this problemDate 10/17/2010 is not a valid date? bug? I could not solve, and did not give more priority to it.

Now, after almost a year, need to resolve this to avoid problems with customers.

When I select the date from the calendar by 16/10/2011 telerik, telerik put the date 15/10/2011 in RadDatePicker.
I tried to fix this in the event ClientEvents-OnDateSelected, changing the time the date 16/10/2011, but in the same way, the telerik days back the date to 15/10/2011.
I also tried changing the date directly in DateInput (get_dateInput().set_value("16/10/2011")), but the telerik also changes the date to 15/10/2011.
Vasil
Telerik team
 answered on 03 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?