Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
89 views
IHello,

I am trying to insert a preslected set of values into a table (Activity)  trough the check box list. however I am getting nothing inserted. I have got 3 tables which are.     Job,      |        Activity,                |  ActivityDetails
                                            ========================================
                                                              |        JobId                   |
                                                              |       ActivityDetailIdI     |

the preselected values are coming from the ActivityDetails table (5 values).

I am folling the example from the demo." Control Insert with ToolTip"


Jason
Top achievements
Rank 1
 asked on 14 Apr 2012
0 answers
86 views
Thanks I have done it
Varun
Top achievements
Rank 2
 asked on 14 Apr 2012
2 answers
392 views

Hi everyone

First of all, I'm aware of another existing thread that has the almost same title; I've read it, and it didn't solve my problem; therefore I decided to write a new thread.

My problem goes as follows:

I have an UpdatePanel placed in a page, which is defined as follows:

1.<asp:UpdatePanel ID="up" runat="server" Visible="false"
2. <ContentTemplate
3.  <asp:Label runat="server" Visible="false" ID="myLabel"></asp:Label
4. </ContentTemplate
5.</asp:UpdatePanel>

I need the Label and the Label's type to invoke some JavaScript with the ScriptManager.RegisterStartupScript method, which we will see later; both the UpdatePanel and Label are only needed for this purpose, and the RadComboBox is not placed in there!

The following is the JavaScript method I need to invoke using the ScriptManager.RegisterStartupScript:

1.function MyFunc(){
2. var combo = $find("MyRadComboBox.ClientID");
3. combo.get_text();
4.}

And the following is the RegisterStartupScript method I use in the code-behind file:

1.ScriptManager.RegisterStartupScript(myLabel, myLabel.GetType(), "MyKey", "MyFunc();", true);

Everytime the JavaScript method gets invoked by the RegisterStartupScript method from the code-behind, I get the following error on the client-side:

Uncaught TypeError: Cannot call method 'get_text' of null

The RadComboBox can't be found on the client-side using $find in this special situation. If I try to access it from Chrome's JS Console using the $find method, I'll get the object, and the invocation of a method on it works perfectly. 

What am I doing wrong here? How can I fix this? It's a pretty annoying little problem, and I hope somebody can point me to the right direction.

Thanks very much in advance guys!

Jakub
Top achievements
Rank 1
 answered on 14 Apr 2012
2 answers
246 views
I have a RadGrid with the property UseStaticHeaders = true for freezing the header row while scrolling.
but when i set this property to true Width of Headers does not match the corresponding Column Header Width while setting that property to false keeps headers and columns width match. How can i have frozen headers matching columns width?
Ali
Top achievements
Rank 1
 answered on 14 Apr 2012
8 answers
129 views
After being unable to resolve this issue with my own code, I tried running the demo site in IE7. To my surprise, it has the same issue.

Steps to Recreate
  1. Go to: http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx
  2. Filter by shipped date: enter a date or use the date picker, click on the associated filter icon
  3. View the results...

It appears as if the filter icon is behind the date picker icon.





Merritt
Top achievements
Rank 1
 answered on 14 Apr 2012
5 answers
182 views
Hi,

We have a hyperlink in the radgrid and unfortunately the filtering doesn't work.
The following ASPX code have been used:

<telerik:GridHyperLinkColumn HeaderText = "Discussion Name" DataTextField="Discussion_Name"
ItemStyle-HorizontalAlign="Left" UniqueName="Discussion_Name"
DataNavigateUrlFields="Discussion_Id" SortExpression="Discussion_Name" ItemStyle-Width="320"
DataNavigateUrlFormatString="Observation.aspx?Id={0}">
</telerik:GridHyperLinkColumn>

Any ideas why is this?

Thanks!
Nathan
Top achievements
Rank 1
 answered on 13 Apr 2012
2 answers
64 views
I have a grid that if it is empty I want to open up an insert form on page load and fill in some default values.

Most of the code works except for this.

rgvAgmtUsers.Items[0].FireCommandEvent("InitInsert", string.Empty);

Now this works if there is already a record in the grid, but if the grid is empty then it doesn't work.

after this is supposed to fire I am wanting to use the grd.MasterTableView.GetInsertItem() to grab controls and set default values.

Any ideas?

Thanks,

Dustin
Simone
Top achievements
Rank 1
 answered on 13 Apr 2012
0 answers
84 views

Is it possible?? . I trying but I dont get this. Can you help me please.
It is a feature very important for my project.   :(

thank you.
Renato
Top achievements
Rank 1
 asked on 13 Apr 2012
1 answer
87 views
I am trying to set up a RadGrid with multiple dropdownlist filters but I get an ArgumentOutOfRangeException on the MyCustomFilteringColumn 

Here is code from the MyCustomFilteringColumn  
 :
       Protected Overloads Overrides Sub SetupFilterControls(ByVal cell As TableCell)
            MyBase.SetupFilterControls(cell)
            cell.Controls.RemoveAt(0)
            Dim list As New DropDownList()
            list.ID = "list" + Me.DataField
            list.AutoPostBack = True
            AddHandler list.SelectedIndexChanged, AddressOf list_SelectedIndexChanged
            cell.Controls.AddAt(0, list)
            cell.Controls.RemoveAt(1)
            list.DataTextField = Me.DataField
            list.DataValueField = Me.DataField
            list.DataSource = _listDataSource
            list.DataBind()
        End Sub

My RadGrid columns are setup like the below (here is one of the many that I have): 

         <custom:MyCustomFilteringColumn DataField="AssessmentID" FilterControlAltText="Filter AssessmentID column"
             FilterControlWidth="80px" HeaderStyle-Width="80px" ItemStyle-Width="80px" ItemStyle-ForeColor="Black"
                                                HeaderStyle-Wrap="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                                                ShowFilterIcon="false" HeaderText="Assessment ID" SortExpression="AssessmentID"
                                                UniqueName="AssessmentID" />


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        For Each column As GridBoundColumn In RadGrid1.MasterTableView.Columns
            If TypeOf column Is MyStuff.MyCustomFilteringColumn Then
                CType(column, MyStuff.MyCustomFilteringColumn).ListDataSource = GetFilterTable(column.DataField)
            End If
        Next
end sub

    Private Function GetFilterTable(ByVal Field As String) As DataTable
        Dim strConnection As String = ConfigurationManager.ConnectionStrings("PKLConnectionString").ConnectionString
        Dim objConnection As New SqlConnection(strConnection)
        Dim SQLCmd As New SqlCommand() 'The SQL Command
        objConnection.ConnectionString = strConnection     'Set the Connection String
        objConnection.Open() 'Open the connection
        SQLCmd.Connection = objConnection 'Sets the Connection to use with the SQL Command
        Dim dt As New DataTable
        Dim adapter As SqlDataAdapter
        adapter = New SqlDataAdapter("SELECT distinct [" + Field + "] FROM tblAssessment", objConnection)
        objConnection.Open()
        Try
            adapter.Fill(dt)
        Finally
            objConnection.Close()
        End Try
        Return dt
    End Function

Error:
System.ArgumentOutOfRangeException was unhandled by user code
  Message=Specified argument was out of the range of valid values.
Parameter name: index
  ParamName=index
  Source=System.Web
  StackTrace:
       at System.Web.UI.ControlCollection.get_Item(Int32 index)
       at System.Web.UI.ControlCollection.RemoveAt(Int32 index)
       at MyStuff.MyCustomFilteringColumn.SetupFilterControls(TableCell cell) in D:\PKLQMW AT 04 05 2012\PKL_QMW\App_Code\MyCustomFilteringColumn.vb:line 33
       at Telerik.Web.UI.GridColumn.InitializeCell(TableCell cell, Int32 columnIndex, GridItem inItem)
       at Telerik.Web.UI.GridBoundColumn.InitializeCell(TableCell cell, Int32 columnIndex, GridItem inItem)
       at Telerik.Web.UI.GridItem.Initialize(GridColumn[] columns)
       at Telerik.Web.UI.GridItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows)
       at Telerik.Web.UI.GridTableView.CreateFilteringItem(Boolean useDataSource, GridColumn[] copiedColumnSet, GridTHead thead)
       at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource)
       at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource)
       at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
       at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
       at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
       at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
       at Telerik.Web.UI.GridTableView.PerformSelect()
       at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
       at Telerik.Web.UI.GridTableView.DataBind()
       at Telerik.Web.UI.RadGrid.DataBind()
       at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
       at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
       at System.Web.UI.Control.EnsureChildControls()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException: 

Pavlina
Telerik team
 answered on 13 Apr 2012
1 answer
348 views
Hi, 
I apologize for my bad English I'll try to explain as best as possibleThis is my first ticket:you can call a vb sub from javascript written on the same page.

<script type="text/javascript"> LANGUAGE="JavaScript"

      / / Open window 
     OpenFabbricatiRadWindow function () {
         var wnd = $ find ("<= Fabbricati.ClientID%>");
         wnd.setUrl ("Form_Job / radwindow_Fabbricati.aspx");
         wnd.set_modal (true);
         wnd.show ();
     }
     / / Get selected value
     Fabbricatoselect function (senderEventArgs{
         eventArgs.get_argument var args = ();
         if (arg) {
            Varfabbricato.value = arg.Fabbricato;
            Vargestione.value = arg.Gestione;
       
   Call here ************************** **************** sub Leggi'

  }
     }

    
<script>

in the page vb.aspx

Protected Sub Leggi ()
         Dim query = From c In Archivio.Tabelle_Spesa
         In joins and Archivio.Stato On c.Tab_Stato Equals e.Id_Stato
         Select ID_Tabella c.ID_Tabella =Description = c.Tab_DescrizioneAcronym =c.Tab_Siglathousandths = c.Tab_MillesimiState = e.Stato_Descrizione
         Query = RadGrid1.DataSource
         RadGrid1.DataBind ()

     end Sub



Thank

Fabio Cirillo
Top achievements
Rank 1
 answered on 13 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?