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

I'm using the RadCombox ItemsRequested to perform partial search....this feature works fine. However, during the update, the RadCombobox.text is already prepopulated. This causes the dropdown to be blank (view the error.jpg). Is there anyway to specify that once the user clicks on the RadCombox dropdown, the selected value disappears and the full dropdown list appears? 

 

 

//Populate the Area dropdown

 

 

 

protected void RadComboBoxArea_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)

 

{

 

 

RadComboBox comboBox = (RadComboBox)sender;

 

 

 

// Clear the default Item that has been re-created from ViewState at this point.

 

comboBox.Items.Clear();

 

 

 

BindingList<LookupArea> Area = WellVentDataLayer.GetAreas(e.Text);

 

 

 

foreach (LookupArea i in Area)

 

{

comboBox.Items.Add(

 

new RadComboBoxItem(i._AreaName.ToString(), i._ID.ToString()));

 

}

comboBox.DataBind();

}

Kalina
Telerik team
 answered on 13 Sep 2011
2 answers
101 views
We have upgraded the version of the RadEditor from 5.4.0.0 to 5.7.1.0.  Now we have two folders for configuration at the location Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint. It creates confusion with the client.
Arun
Top achievements
Rank 1
 answered on 13 Sep 2011
6 answers
994 views
Hi

I am getting error " microsoft jscript runtime error 'undefined' is null or not an object" when i call clent script code from code behind in page load event. ( I shoul open the radwindow on page load).  Please see my code below.

ASPX Code
<%@ Page Language="C#" MasterPageFile="~/CMMasterPage.master" AutoEventWireup="true"
    CodeFile="ActualvsRequired.aspx.cs" Inherits="Reports_ActualvsRequired" Title="Untitled Page" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Charting" TagPrefix="telerik" %>
<asp:Content ID="Content2" ContentPlaceHolderID="header" runat="Server">
    Resource Level
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link href="../Styles/CrewMetric_StyleSheet.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript">
        //Sys.Application.remove_load(RadWindowOpen);
        //Sys.Application.add_load(RadWindowOpen);
        var oWnd;
  
        function RadWindowOpen() {
  
                if (oWnd != null) {
                    oWnd.close();
                }
                oWnd = radopen("GridDisplay.aspx", null); ///Getting error
                oWnd.setSize(200, 225);
                oWnd.moveTo(1090, 160);
                return false;
            }
    </script>
      
     
    <div id="divContentPage" class="subbody" runat="server">
        <div style="float: left; margin-left: 8px; margin-top: 10px;">
            <telerik:RadChart runat="Server" ID="RadChartAvR" Width="900px" Height="560" OnItemDataBound="RadChartAvR_ItemDataBound"
                OnBeforeLayout="RadChartAvR_BeforeLayout">
                <PlotArea>
                    <EmptySeriesMessage Visible="True">
                        <Appearance Visible="True">
                        </Appearance>
                    </EmptySeriesMessage>
                    <YAxis>
                        <AxisLabel Visible="true" TextBlock-Text="% of Actual Deviation from Requirement">
                            <Appearance Visible="True">
                            </Appearance>
                            <TextBlock Text="% of Actual Deviation from Requirement">
                            </TextBlock>
                        </AxisLabel>
                    </YAxis>
                </PlotArea>
                <ChartTitle Visible="true">
                      
                </ChartTitle>
            </telerik:RadChart>
        </div>
        <div style="clear: both">
        </div>
    </div>
    <div>
        <asp:HiddenField ID="hiddenCrewType" runat="server" />
    </div>
    <telerik:RadWindowManager ID="RadWindowManager2" runat="server" ReloadOnShow="false" Skin="Sunset" BackColor="DodgerBlue" EnableEmbeddedSkins="false"
        ShowContentDuringLoad="False" VisibleStatusbar="False"  InitialBehavior="None" Behaviors="Move" 
        Font-Names="Tahoma" VisibleOnPageLoad="false" Style="z-index: 8000;" EnableShadow="true"
        DestroyOnClose="True">
    </telerik:RadWindowManager>
</asp:Content>


CS Code:

ScriptManager

 

 

.RegisterStartupScript(this.Page, Page.GetType(), "test", "RadWindowOpen();", true);

 


Marin Bratanov
Telerik team
 answered on 13 Sep 2011
1 answer
207 views
Hi,

My RadGrid is all created programmatically in the page_init.  The data source is a DataTable.

The OnNeedDataSource seems fine (well, there is data!), but when I put in into edit mode to add a new row - add data and click on the tick - it does nothing.  The events aren't called.

The event handers are added in the method called by the page_init :

private void CreateForecastGrid()
{
.
.
.
.
.
             //Add the Notes column
                GridTemplateColumn notes = new GridTemplateColumn();
                RadGrid1.MasterTableView.Columns.Add(notes);
  
                notes.ItemTemplate = new NotesDataGridTemplate(ListItemType.Item, "lblNotes");
                notes.EditItemTemplate = new NotesDataGridTemplate(ListItemType.EditItem, "tbNotes");
                notes.HeaderText = "Notes";
                notes.UniqueName = "Notes";
                notes.SortExpression = "Notes";
  
                //Add the Discipline column
.
.
.
            //Add event handlers
            RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(RadGrid1_OnNeedDataSource);
            RadGrid1.ItemUpdated += new GridUpdatedEventHandler(RadGrid1_ItemUpdated);
            RadGrid1.ItemInserted += new GridInsertedEventHandler(RadGrid1_ItemInserted);
            RadGrid1.ItemDataBound += new GridItemEventHandler(RadGrid1_OnItemDataBound);
            RadGrid1.DataBound += new EventHandler(RadGrid1_DataBound);
  
            //Add the grid to the view
            RadGridPlaceholder.Controls.Add(RadGrid1);
        }

What am I doing wrong?

Thanks
Weeble
Top achievements
Rank 1
 answered on 13 Sep 2011
2 answers
104 views
Hi everybody!
I have a problem about checkbox and radgrid. I want to tick in checkbox when I choose row select in radgrid. I used:
function setValues(d_diem_do) {         
           $find("<%= txtMA_DDO.ClientID %>").set_value(d_diem_do.MA_DDO);
           $find("<%= dtpNGAY_HLUC.ClientID %>").set_selectedDate(d_diem_do.NGAY_HLUC);
           $find("<%= chkCSPK.ClientID %>").checked = false;                 //Error here 
       }
My code: $find("<%= chkCSPK.ClientID %>").checked = false;  is not run.
Have you any idea? Thanks you very much!
Pham
Top achievements
Rank 1
 answered on 13 Sep 2011
6 answers
344 views
Hi
I have 2 tab control in my page. On load of the page,  i am opening a radwindow. Please see my code below.
var oWnd;
function pageLoad() {
    if (oWnd != null) {
        oWnd.close();
    }
    oWnd = radopen("GridDisplay.aspx", null);
    oWnd.setSize(200, 225);
    oWnd.moveTo(1090, 160);
    return false;
}
My requirement is, i have to set the window size and position based on the tab selection. For that i have done below code. I have created one hidden control.I assigned value for that. I was trying to take that value in client side, it was throwing error saying that cannot used content control <%# %>. I replaced with # to =. At that time it is not throwing error but it is not returning the value.
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            <script type="text/javascript">
               var obj = document.getElementById("<%#hiddenCrewType.ClientID%>")
               alert(obj);
                alert(1);            
            </script>
    </telerik:RadScriptBlock>
So now i decided to move my code to server side. Can you please suggest how to set the window size and position for the rad window in server side?
Marin Bratanov
Telerik team
 answered on 13 Sep 2011
4 answers
338 views
Hi,

I have a RadComboBoxData object with all the data items. How can use it to populate RadComboBox?
Kalina
Telerik team
 answered on 13 Sep 2011
3 answers
191 views
Hi
I tried to hide and unhide columns with different option but nothing looks working with RadGrid.

1. I have a dropdown- checkbox with Column names,whose values I am storing in hashtable on button click.

protected void btnChooseColumns_Clicked(object sender, EventArgs e)
   {
       ht = new Hashtable();
       foreach (RadComboBoxItem item in rcColumnChooser.Items)
       {
           CheckBox checkBox = (CheckBox)item.FindControl("CheckBox");
           ht.Add(item.Text, checkBox.Checked);
       }
          BindGrid();
   }

Now after the BindGrid() method executed it is going to ColumnCreated event and executing as expected.

protected void rgCatalogs_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e)
    {
        if (ht != null)
        {
            if (ht.Contains(e.Column.HeaderText.ToUpper()))
            {
                GridBoundColumn boundColumn = e.Column as GridBoundColumn;
                e.Column.Visible = (bool)ht[e.Column.HeaderText];
            }
        }
         
    }

But column hide and unhide is not happening.

Thanks in Advance
RamC
Kalina
Telerik team
 answered on 13 Sep 2011
1 answer
66 views
I am searching for a way to scroll the expanded/selected row to the top of the grid.  Please Advice. 

Thanks in advance.
Vasil
Telerik team
 answered on 13 Sep 2011
1 answer
154 views
Hi,

ran into this issue:

I have a RadGrid, with GridTemplate columns. Some of these columns have DatePicker controls in EditItemTemplate.
After I have enabled filtering and put in FilterItemTemplate RadComboBox controls, icons on Datepickers disappared and instead there was either link with text "opens the callendar control" or blank. When you are clicking on such a crippled link, a calendar pops up but its skin is lost and it looks transparant.

if I use a plain asp:DropDownList, then icons are ok, - somehow presence of RadComboBox there messes up calendar and DateTimePicker control
However if I use asp:DropDownList, then SelectedIndexChanged event is not firing , even though I have  AutoPostBack="true"

Any clues?

running licensed version of controls from  ASP.NET AJAX Q3 2010, VS 2010.
Radoslav
Telerik team
 answered on 13 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?