Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
254 views
What i am trying to do is the RadAsyncUpload control is disabled by default and on selection of an item from Combobox i want to enable RadAsyncUpload control. for this i am calling an javascript. it enables the RadAsyncUpload control but not the control is not actually working as RadAsyncUpload control

here is the javascript:

  function ddlDocTypeOnClientSelectedIndexChanged(sender, args) {
     
        var Uploader = $find("<%= rdFileUpload.ClientID %>");
      
        Uploader.set_enabled(true);
      
    }

Please let me know what I am missing here.


Payal
Top achievements
Rank 1
 answered on 23 Jun 2014
3 answers
737 views
I am brand new to the world of coding web pages and have a question. 

I have a table on a RadAjaxPanel. The first column is description labels and a couple of the labels have a button to pop detail.  The remaining columns are actually the data we are editing and are a RadListView.  When the user clicks on a detail button, we pop a modal window, do some data entry, recalculate and then update and save the information that is being displayed/edited in the RadListView.  This all works great unless the user has edited data in the RadListView and then pops the detail before saving the data.  If that happens, the detail gets saved, the data being displayed in the RadListView gets reloaded, tweaked and saved basically throwing away any changes the user made and did not save. 

To try and get around this, I added an OnClientClick call to a javascript function that would  fire the onclick of the forms "save" button and return true so that the detail modal form would fire up based on the onclick event.  Well, the onclientclick fires, but then the onclick never does.  If it matters, I set the onclientclick event statically and set the onclick dynamically during the page load so I can pass the correct guid as a parameter to the detail modal form. I did this based on info I found that said OnClientClick fires before the OnClick event and the OnClick event fires or not based on the return value of the OnClientClick event.

Any thoughts/comments?
Viktor Tachev
Telerik team
 answered on 23 Jun 2014
5 answers
201 views
Is anyone else experiencing a problem with paging in a Radgrid when the screen is viewed with Internet Explorer 11?  Clicking on the pager imagebuttons for First, Prev, Next, or Last initiates a partial postback but the content of the radgrid do not change.

The paging works fine in current versions of Chrome and Firefox.

This is a .NET 3.5 app using Q3 2012 Telerik Radcontrols.  Would an upgrade to Q3 2013 solve the issue?
Eyup
Telerik team
 answered on 23 Jun 2014
1 answer
90 views
File Upload window is installed in the flash file you want to upload the file upload is in progress, this is not. If you are going to install Silverlight will be added. I'd like to know why ie8 for windows 7 environment. Initially anhaeteul Flash or Silverlight if you install anything to the normal operation ...
Ianko
Telerik team
 answered on 23 Jun 2014
1 answer
184 views
Hi,

I have taken a RAD Grid having 3 combo box columns, I wan to implement batch update and need to update the database on code behind, please let me know which event of grid should I handel for inserting new item (single row) & batch update modified items to database (only modified rows). also please let me know how can i get the values from grid to insert in database for insert new row or for bulk update.

below is my code

.aspx page
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
        CellSpacing="-1" GridLines="Both" onneeddatasource="RadGrid1_NeedDataSource"
        onprerender="RadGrid1_PreRender">
        <MasterTableView EditMode = "Batch" CommandItemDisplay ="TopAndBottom">
            <Columns>
                <telerik:GridBoundColumn DataField="trans"
                    FilterControlAltText="Filter column column" HeaderText="TransactionID"
                    UniqueName="column">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="EmployeeName"
                    FilterControlAltText="Filter EmployeeName column"
                    UniqueName="EmployeeName" HeaderText="Employee Name">
                    <EditItemTemplate>
                        <telerik:RadComboBox ID="RCBEmployee" Runat="server"
                            EmptyMessage="Select Employee">
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <%# Eval("EmployeeName") %>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="Department"
                    FilterControlAltText="Filter Department column" UniqueName="Department"
                    HeaderText="Department">
                    <EditItemTemplate>
                        <telerik:RadComboBox ID="rcbdept" Runat="server">
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                         <%# Eval("Department") %>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="Skill"
                    FilterControlAltText="Filter Skill column" UniqueName="Skill"
                    HeaderText="Skill">
                    <EditItemTemplate>
                        <telerik:RadComboBox ID="RCBSkill" Runat="server">
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <%# Eval("Skill") %>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        <BatchEditingSettings EditType ="Row" />
        </MasterTableView>
    </telerik:RadGrid>

ASPX.CS

 
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = PopulateGrid();
    }
 protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
       //Populating Employee
        RadComboBox combo = RadGrid1.FindControl(RadGrid1.MasterTableView.ClientID + "_EmployeeName").FindControl("RCBEmployee") as RadComboBox;
        combo.DataSource = PopulateEmoloyee();
        combo.DataTextField = "EmployeeName";
        combo.DataValueField = "EmployeeID";
        combo.DataBind();       
//populating Department
        RadComboBox combodept = RadGrid1.FindControl(RadGrid1.MasterTableView.ClientID + "_Department").FindControl("rcbdept") as RadComboBox;
        combodept.DataSource = PopulateDepartment();
        combodept.DataTextField = "Department";
        combodept.DataValueField = "deptid";
        combodept.DataBind();   
}
Angel Petrov
Telerik team
 answered on 23 Jun 2014
3 answers
279 views
Hi All,

I have to convert a varbinary data into selected (it may be word/excel/PDF)  document type and show the content in browser itself. May i know which control in Rad will be use for this requirement?
Kostadin
Telerik team
 answered on 23 Jun 2014
1 answer
480 views
Hi, I'm trying to bind a RadComboBox with an ObjectDataSource (odsFuenteEmisionAlcance) that returns a List of Objects like these:

List<FuenteEmisionAlcance>
 
public class FuenteEmisionAlcance
{
    private FuenteEmision m_FuenteEmision;
    private Alcance m_Alcance;
  
    public FuenteEmision FuenteEmision
    {
        get { return m_FuenteEmision; }
        set { m_FuenteEmision = value; }
    }
 
    public Alcance Alcance
    {
        get { return m_Alcance; }
        set { m_Alcance = value; }
    }
}

This is my ComboBox

<telerik:RadComboBox ID="rcbFuenteEmision" runat="server" AutoPostBack="True" DataSourceID="odsFuenteEmisionAlcance" DataTextField="FuenteEmision.Nombre" DataValueField="FuenteEmision.Id" ZIndex="100000" CausesValidation="False" OnSelectedIndexChanged="rcbFuenteEmision_SelectedIndexChanged" EmptyMessage="--Seleccione--" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" OnDataBinding="rcbFuenteEmision_DataBinding"></telerik:RadComboBox>

I'm trying to use the DataTextField and DataValueField values from the Property FuenteEmision, but somehow is not getting it, this is what I get:

[NotSupportedException: Object of type HUC.FuenteEmisionAlcance does not have a FuenteEmision.Nombre property.]


Like I show before the object FuenteEmisionAlcance does a have a FuenteEmision property, the combo is able to find it, i've tried using only DataTextField="FuenteEmision" and DataValueField="FuenteEmision" just to try and it does find it, but when it comes to find a property from the property it crashes, is this impossible? or there is another way I can acomplish this.


Shinu
Top achievements
Rank 2
 answered on 23 Jun 2014
1 answer
90 views
hello
I want to add GridTemplateColumn and Textbox as itemtemplate programatically.
I used the below code but it just generate the GridTemplate columns with blank rows without textbox as shown in attached image
Please help me to solve this problem.

Protected
Sub btnFurnaceAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnFurnaceAdd.Click
        num = gdFurnace.Items.Count + 1
        Dim dt As New DataTable()
       gdFurnace.DataSource = addBlankLines(dt, num)
       gdFurnace.Rebind()
                  For i = 0 To 8
               Dim col As New GridTemplateColumn
                col.HeaderText = "Column" + i.ToString
               col.UniqueName = i.ToString
               col.ItemTemplate = New MyTemplate(col.UniqueName)
               col.HeaderStyle.Font.Bold = True
               gdFurnace.MasterTableView.Columns.Add(col)
            Next
End Sub

​ Private Function addBlankLines(ByVal dt As DataTable, ByVal num As Integer) As DataTable
       
Dim count As Integer = 0
        If num <> 0 Then
            Dim drBlank As DataRow = Nothing
            For i As Integer = 0 To num - 1
                drBlank = dt.NewRow()
                dt.Rows.Add(drBlank)

       
     Next
        End If
        Return dt

    End Function


​Private Class MyTemplate
       
Implements ITemplate
        Protected lControl As LiteralControl
        Protected validatorTextBox As RequiredFieldValidator
        Protected searchGoogle As HyperLink
        Protected textBox As TextBox
        Protected boolValue As CheckBox
        Private colname As String

        Public Sub New(ByVal cName As String)
           
colname = cName
        End Sub
        Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
           
lControl = New LiteralControl()
            lControl.ID = "lControl"
            AddHandler lControl.DataBinding, AddressOf lControl_DataBinding
            textBox = New TextBox()
            textBox.ID = "templateColumnTextBox"
            validatorTextBox = New RequiredFieldValidator()
            validatorTextBox.ControlToValidate = "templateColumnTextBox"
            validatorTextBox.ErrorMessage = "*"
            searchGoogle = New HyperLink()

           
searchGoogle.ID = "searchGoogle"
            AddHandler searchGoogle.DataBinding, _
                       AddressOf searchGoogle_DataBinding
            boolValue = New CheckBox()
            boolValue.ID = "boolValue"
            AddHandler boolValue.DataBinding, _
                       AddressOf boolValue_DataBinding
            boolValue.Enabled = False
            Dim table As New Table()

           
Dim row1 As New TableRow()
            Dim row2 As New TableRow()
            Dim cell11 As New TableCell()
            Dim cell12 As New TableCell()
            Dim cell21 As New TableCell()
            Dim cell22 As New TableCell()
            row1.Cells.Add(cell11)
            row1.Cells.Add(cell12)
            row2.Cells.Add(cell21)

           
row2.Cells.Add(cell22)
            table.Rows.Add(row1)
            table.Rows.Add(row2)
            cell11.Text = colname + ": "
            cell12.Controls.Add(lControl)
            cell21.Text = "Search Google for: "
            cell22.Controls.Add(searchGoogle)
            container.Controls.Add(textBox)
            container.Controls.Add(validatorTextBox)
            container.Controls.Add(table)

           
container.Controls.Add(New LiteralControl("<br />"))
            container.Controls.Add(boolValue)

        End Sub
        Sub boolValue_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
           
Dim cBox As CheckBox = DirectCast(sender, CheckBox)
            Dim container As GridDataItem = DirectCast(cBox.NamingContainer, GridDataItem)
            cBox.Checked = DirectCast((DirectCast(container.DataItem, DataRowView))("Bool"), Boolean)

        End Sub
        Sub searchGoogle_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
           
Dim link As HyperLink = DirectCast(sender, HyperLink)
            Dim container As GridDataItem = DirectCast(link.NamingContainer, GridDataItem)
            link.Text = (DirectCast(container.DataItem, DataRowView))(colname).ToString()
            link.NavigateUrl = "http://www.google.com/search?hl=en&q=" + _
                   (DirectCast(container.DataItem, DataRowView))("ContactName").ToString() + "&btnG=Google+Search"

        End Sub
        Public Sub lControl_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
           
Dim l As LiteralControl = DirectCast(sender, LiteralControl)
            Dim container As GridDataItem = DirectCast(l.NamingContainer, GridDataItem)
            l.Text = (DirectCast(container.DataItem, DataRowView))(colname).ToString() + "<br />"

        End Sub
    End Class
Eyup
Telerik team
 answered on 23 Jun 2014
10 answers
765 views
Hi,

I am trying to access the selected row in my grid, but SelectedItems or SelectedIndexes is always empty. Anyone had this issue before?

And the event SelectedIndexChanged is never fired....
Christian
Top achievements
Rank 1
 answered on 23 Jun 2014
1 answer
141 views
Hi,
I am using this post http://www.telerik.com/forums/radgrid-rows-sorting-move-up-and-move-down-button#e2TZo8jWa0CwWCpvuifTow

to acheive the sorting functionality.

I would like to know how to hide the Up button when it reaches the first position as it cannot be moved up further.

Similarly to hide the down button when it reaches the last position as it cannot be moved down further

Please advise.
Radoslav
Telerik team
 answered on 23 Jun 2014
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?