Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
417 views
I have a user control with some RadTextboxes, RadNumericTextboxes, RadComboBoxes. I have this usercontrol on an aspx page which has the RadAjaxManager. I have a requirement to maintain if the controls in the usercontrol have changes, so, I have set the AutoPostBack property to true and on postback, I set ViewState["NameIsDirty"]=true; But my problem is, when the user updates the Name and clicks on tab, the cursor goes to the next control and immediately disappears! Seems like it is getting focussed on the first control on the page. If I dont have the AutoPostBack property set to true, the focus is on the next control and everything is fine. How do I make the focus stay on the control on which it is supposed to be. I searched the forums and tried a few solutions, but they did not work.
I have tried this and it doesnt work:
protected void rdtCCno_TextChanged(object sender, EventArgs e)
    {
        ViewState["NumberIsDirty"] = true;
        string script =string.Format(@"window.setTimeOut(function(){{$find('{0}').Focus();}},10);",rdtCvv2.ClientID);
        ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "mykey", script,true);
        
    }
    protected void rdcExpMonth_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        ViewState["ExpMonthIsDirty"] = true;
        var rdAjaxManager = RadAjaxManager.GetCurrent(this.Page);
        if (rdAjaxManager != null)
        {
            rdAjaxManager.FocusControl(rdtAddr1);
        }
    }
Viktor Tachev
Telerik team
 answered on 27 Nov 2013
1 answer
130 views

Hi, 

I've got below error on tring RadFileExplorer with this demo. the error details as below.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The base class includes the field 'RadScriptManager1', but its type (Telerik.Web.UI.RadScriptManager) is not compatible with the type of control (Telerik.Web.UI.RadScriptManager).


My Project details:
Target Framework: .net Framework 3.5
version of Telerik.Web.UI.dll : 2013.1111.35
Version of System.Web.Extensions : 3.5.0.0

Please kindly advise what should i do? 

Regards

Kate
Telerik team
 answered on 27 Nov 2013
1 answer
185 views
I am trying to create an ASP.NET page to allow basic CRUD operations using Entity Framework. Using Telerik's RadListView, I have the following HTML:
<telerik:RadListView ID="RadListView1" runat="server" OnNeedDataSource="RadListView1_NeedDataSource">
<ItemTemplate>
    <table>
        <tr>
            <td>First Name: 
                <%#Eval("FirstName")%>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" Width="70px"></asp:Button>
            </td>
        </tr>
    </table>
</ItemTemplate>
<EditItemTemplate>
    <table>
        <tr>
            <td>First Name:
                <asp:TextBox ID="txtFirstName" runat="server" Text='<%#Bind("FirstName")%>'></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnUpdate" runat="server" Text="Update" CommandName="Update" Width="70px"></asp:Button>
            </td>
        </tr>
    </table>
</EditItemTemplate>

And here is the code behind:

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
         RadListView1.DataSource = GetData();
    }
}
 
protected void RadListView1_NeedDataSource(object sender, Telerik.Web.UI.RadListViewNeedDataSourceEventArgs e)
{
    RadListView1.DataSource = GetData();
}
 
private List<Person> GetData()
{
    using (BuildingAccessEntities ctx = new BuildingAccessEntities())
    {
        var query = from a in ctx.People
                    orderby a.FirstName
                    select a;
 
        return query.ToList();
    }
}

So far, this code properly displays the populated RadListView. When I click the Edit button, the RadListView switches to Edit mode and allows me to Edit the selected record; however, when I click the Update button to save the record, the changes are not saved.

I have not yet tried to see if inserts and deletes behave this same way.

I'm sure 2-way binding should be something very simple with the RadListView, but I am new to this and have not been able to find many examples to make this work other than by using data source controls (SqlDataSource, EntityDataSource, etc.).

Any assistance will be greatly appreciated!


Konstantin Dikov
Telerik team
 answered on 27 Nov 2013
2 answers
84 views
Hi
How to make a column to be hidden in normal view but show in edit form ? I want a column value hidden in view but it should be editable.
Viktor Tachev
Telerik team
 answered on 27 Nov 2013
4 answers
212 views
I need to copy data from one control  --"PlannedStartDate"  in RadGrid using GridTemplateColumns to "bStartDate", but the code below that I am using is not working. Any suggestions?
<telerik:GridTemplateColumn HeaderText="New Start Date" UniqueName="bStartDate"  >                                                         
  <ItemTemplate>
  <asp:Label runat="server" ID="bStartDate" Text=" ">
  </asp:Label> 
   </ItemTemplate>
                                                              
 </telerik:GridTemplateColumn>
 
 
 
 
<telerik:GridTemplateColumn HeaderText="Planned Start Date" UniqueName="PlannedStartDate" >                                                          
  <ItemTemplate>
  <asp:Label runat="server" ID="plannedstartdate" Text='<%# String.Format("{0:d}" , Eval("PlannedStartDate")) %>'>
 </asp:Label> 
  </ItemTemplate>
 <EditItemTemplate>
  <br />
 <telerik:RadDatePicker ID="picker3" runat="server" DbSelectedDate='<%# Bind("PlannedStartDate") %>'>
  </telerik:RadDatePicker>
 <asp:CustomValidator ID="CustomValidator3" ControlToValidate="picker3" ErrorMessage="This field was incorrect"
    runat="server" OnServerValidate="CustomValidator1_ServerValidate">
  </asp:CustomValidator>
 </EditItemTemplate>
       </telerik:GridTemplateColumn>
 
 
 
 
 
 
 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
 
 
         
 
              
            if (e.Item is GridCommandItem && blnApproved)
            {
                GridCommandItem dataitem = (GridCommandItem)e.Item;
                  
                Label PStart = dataitem.FindControl("plannedstartdate") as Label;
                                 
                 
                Label BStart = dataitem.FindControl("bStartDate") as Label;
                 
                BStart.Text = PStart.ToString();
                 
            }
 
 
        }
 
    }
Ebenezer
Top achievements
Rank 1
 answered on 27 Nov 2013
1 answer
95 views
Hi,
How to hide a column in insert mode but show in edit mode. Using ReadOnly property i cant get in edit mode. Any idea.?
Shinu
Top achievements
Rank 2
 answered on 27 Nov 2013
1 answer
61 views
Hi
I hav a textbox and a search button. I enter a text to search for a value in the Grid. I want some sort of identification that the search is successful like highlight the selected search text in the grid.please help on this.
Princy
Top achievements
Rank 2
 answered on 27 Nov 2013
1 answer
131 views
Hi there,

I'm having a problem with my hierarchical radgrid. When I expand the details table and try to reorder the table with ReorderColumnsOnClient = "True", the masterTable gets reordered as well. For example, if I have move the column in position 1 and switch it with column 2 on the details table, column 1 and column 2 are switch on the master table as well. This also happens for a 3 level hierarchy except it does not affect the first details table if the second detail table has been reordered, only the master table (i.e. switching column 1 and column 2 on the 2nd detail table (innermost) ONLY switches column 1 and 2 on the master table, NOT the first (outer) detail table).

Any ideas?

Thank you,

Tom
Kostadin
Telerik team
 answered on 27 Nov 2013
1 answer
231 views
Switching from Classic to Auto or Lightweight render mode  (e.g. "Telerik.Web.UI.RenderMode" value="Classic"  --> "Telerik.Web.UI.RenderMode" value="Auto")  seems to cause a break in most places where RadCombo box is used.  
What about Lightweight/Auto rendering could be causing this?

Please refer to screenshots.  

Any and all theories and/or suggestions will be greatly appreciated.
Nencho
Telerik team
 answered on 27 Nov 2013
1 answer
86 views
I have implemented the "Google-Like" filtering in my RadGrid.  I have read about including checkboxes in the radcombobox drop down list for filtering purposes.  Is it possible to also have the "multi-select" filtering functionality as well, and how would this be implemented?

Thanks,
Mark
Viktor Tachev
Telerik team
 answered on 27 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?