Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
51 views
Hello,

I have finally managed to get the radgrid to work with all its features (insert, edit, delete, details view). However, the details table is showing me the same table that the original grid is showing. (Screenshot)

I have 2 table:

news:
- N_id
- title
- article
- time
- U_id

users
- U_id
- member

I have already populated the data manually. What I want to do when I click on the expand button to see the details table, is to see the user who wrote that article. And I have to SqlDatasources, I just have to edit one to show the user WHERE news.userid = users.id, but how?

EDIT: I figured out the query and I'm not getting any error when I load the page. But when I click on the expand button, I get something weird (Screenshot). 

I just want to show the Name (member) of the person who wrote that article. Just 1 row.

SELECT users.member, news.U_id
FROM users
INNER JOIN news
ON users.U_id=news.U_id
Shinu
Top achievements
Rank 2
 answered on 03 Nov 2011
1 answer
55 views
Hi
I have successfully been using a custom skin for a PanelBar, and it is working fine as required.
I now want to make another version of the same skin, but I haven't been able to figure out the syntax
for setting the colours of the sub menu item when it is both selected and hovered.

Q32010 version running on asp.net 4.0

This is what I have at the moment

div.RadPanelBar_Scargill2 .rpGroup a.rpLink:hover,
div.RadPanelBar_Scargill2 .rpGroup a.rpFocussed,
div.RadPanelBar_Scargill2 .rpGroup a.rpFocused:hover,
div.RadPanelBar_Scargill2 .rpGroup a.rpSelected,
div.RadPanelBar_Scargill2 .rpGroup a.rpSelected:hover
  
{
background-color: white;
    color: #666;
}

This does what it should for the sub items, until one is selected. Then it seems to revert to the colours of the top level items.

Please help!

Thanks

Clive
Kate
Telerik team
 answered on 03 Nov 2011
3 answers
354 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
122 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
80 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
115 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.1K+ 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
103 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
124 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
357 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?