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

Here i got error..
I had create Treeview using Component Art but once i right click to add or delete the node the error will come out like this.
----"Error: 'null' is null or not an object"---

Thanks

Bibi
Daniel
Telerik team
 answered on 25 Mar 2010
1 answer
137 views
Hi,
I'm using a RadTreeView:

<telerik:RadTreeView ID="RadTreeView1" runat="server" DataFieldID="CompetitionID" 
            DataTextField="Description"  
            DataValueField="CompetitionID"  
            CheckChildNodes="True"
</telerik:RadTreeView> 

I filled in all the root nodes
When I try to expand a node in order to populate that node "on demand", I want to have to node in order to find out its id and its position in the tree:

Protected Sub RadTreeView1_NodeExpand1(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeExpand 
        PopulateNodeOnDemand(e, TreeNodeExpandMode.ServerSideCallBack) 
End Sub 
 


I see that the RadTreeNodeEventArgs "e" is empty. No nodes in.


Can someone tell me what's the problem?
Thanks in advance
Veronica
Telerik team
 answered on 25 Mar 2010
1 answer
120 views
My situation is that I have a RadListView with RadDataPager, to display a bunch of calendars. I set the datasource of the RadListView in the code-behind and everything loads correctly. The problem is that the paging functionality does not work. I've created test page that replicates my issue.

My ASPX page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadListView ID="lvItems" runat="server" AllowPaging="true"
            <LayoutTemplate> 
                <telerik:RadDataPager ID="dpTopPager" runat="server" PagedControlID="lvItems" PageSize="7" 
                    Skin="Office2007"
                    <Fields> 
                        <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="10" /> 
                    </Fields> 
                </telerik:RadDataPager> 
                <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder> 
            </LayoutTemplate> 
            <ItemTemplate> 
                <div> 
                    <%#DataBinder.Eval(Container, "DataItem.Value") %> 
                </div> 
            </ItemTemplate> 
        </telerik:RadListView> 
    </div> 
    </form> 
</body> 
</html> 
 

The code-behind:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
 
public partial class Test : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        { 
            Dictionary<intint> items = new Dictionary<intint>(); 
 
            for (int i = 0; i < 23; i++) 
            { 
                items.Add(i, i); 
            } 
 
            lvItems.DataSource = items.ToList(); 
            lvItems.DataBind(); 
        } 
    } 
 

It's a simple demo, it just renders numbers. Now I notice that because I only bind my results on the first load that the paging doesn't work. I noticed that the normal asp.net DataPager control acts the same way, so is it just not possible to enable paging if I don't rebind the RadListView every time the page is changed or am I doing something wrong.?

Thanks.
Rosen
Telerik team
 answered on 25 Mar 2010
1 answer
134 views
Hi folks,

i was using RowState and DataControlRowState in my datagridview.

I have migrated it into Radgrid. Can any one tell wht can be the alternative code for the below code with respect to RadGrid
Dim grdrow as GridViewRow 
 
For Each grdrow In gvProductBOM.Rows 
                If ((grdrow.RowState And DataControlRowState.Edit) <= 0) And Not (isBOMFirstRow) 
:-
Awaiting for your response.


Thanks
Satya

Yavor
Telerik team
 answered on 25 Mar 2010
1 answer
127 views

I have a RadTimePicker as one of the template columns in RadGrid. When i call the OnSelectedDateChanged event of the RadTimePicker it is not fired. I have set AutoPostBack also to true. But its not fired.

I have added the event handler to the control's declaration. Still it doesn't work. The control is inside the grid. So is there any other way to handle this?

My code:

        <EditItemTemplate >
            <telerik:RadTimePicker ID="txtStartTime" runat="server" OnSelectedDateChanged ="CheckDuration" AutoPostBack ="true" >
            </telerik:RadTimePicker>
        </EditItemTemplate>

    Protected Sub CheckDuration(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs)

    End Sub

 

Yavor
Telerik team
 answered on 25 Mar 2010
1 answer
168 views
I get this error message "Error Creating Template groups. Reason: System.InvalidCastException " when I drag RadGrid(Q3 2009 SP2) to default.aspx which is using a master page. Couly someone hwlp me please.Thanks in advance. Error Attached.


Shinu
Top achievements
Rank 2
 answered on 25 Mar 2010
1 answer
144 views
Hello Guys.

I would like to know, how can I use the CheckBoxField Column like ind gridview? Are there other alternative?

Tx in advance.

Regards.
Shinu
Top achievements
Rank 2
 answered on 25 Mar 2010
3 answers
152 views
Hi Guys

I am new to this forum
I came across with one problem
I have user name and password field
I have two panel with id errormsg and successmsg

<asp:Button ID="btnSubmit"  OnClientClick="SubmitForm();" Text="Login"
                                runat="server" onclick="btnSubmit_Click" />


     <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnSubmit" >
             <UpdatedControls>
                 <telerik:AjaxUpdatedControl ControlID="errormsg "></telerik:AjaxUpdatedControl>
             </UpdatedControls>
             <UpdatedControls>
                 <telerik:AjaxUpdatedControl ControlID="successmsg"></telerik:AjaxUpdatedControl>
         </UpdatedControls>
                </telerik:AjaxSetting>
     </AjaxSettings>    
   
so after entering username and password and enter key is pressed it not working

Please guide me

Karthik.K

Karthik Kantharaj
Top achievements
Rank 1
 answered on 25 Mar 2010
2 answers
81 views
Hi,

this is shanker am doing one project .My requirement is hierarchy of radgrid .I am doing multi hierarchy in single level hierarchy grid i have multiple detail tables in rad grid How to difference in item data bound event .this my code

if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
            {
            if (e.Item.OwnerTableView.DetailTableIndex == 0)
                {
                 
                        int? eventId = GetEventId(e.Item);

                        if (e.Item.OwnerTableView.IsItemInserted)
                        {
                            //item is about to be inserted
                        }
                        else
                        {
                            if (eventId.HasValue)
                            {
                                var det = studentinformation.sch_view_student_profile_detail(eventId.Value);


                                if (det != null)
                                {

                                    TextBox txtFristname = e.Item.FindControl("txtFristname") as TextBox;
                                    if (txtFristname != null)
                                    {
                                        txtFristname.Text = det.first_name;
                                    }
                                    TextBox txtLastName = e.Item.FindControl("txtLastName") as TextBox;
                                    if (txtLastName != null)
                                    {
                                        txtLastName.Text = det.last_name;
                                    }
                                    TextBox txtMiddleName = e.Item.FindControl("txtMiddleName") as TextBox;
                                    if (txtMiddleName != null)
                                    {
                                        txtMiddleName.Text = det.middle_name;
                                    }
                                    TextBox txtAdmission = e.Item.FindControl("txtAdmission") as TextBox;
                                    if (txtAdmission != null)
                                    {
                                        txtAdmission.Text = det.admission_number;
                                    }
                                    RadioButtonList rdbgender = e.Item.FindControl("rdbgender") as RadioButtonList;
                                    if (rdbgender != null)
                                    {
                                        rdbgender.SelectedValue = det.gender;
                                    }
                                    RadDatePicker rdp_start_date = e.Item.FindControl("rdp_start_date") as RadDatePicker;
                                    if (rdp_start_date != null)
                                    {

                                        rdp_start_date.SelectedDate = det.date_of_birth;

                                    }
                                    RadDatePicker rdp_end_date = e.Item.FindControl("rdp_end_date") as RadDatePicker;
                                    if (rdp_end_date != null)
                                    {
                                        rdp_end_date.SelectedDate = det.Admission_date;
                                    }
                                    CheckBox check = e.Item.FindControl("ficalyearcheck") as CheckBox;
                                    {
                                        if (check != null)
                                        {
                                            check.Checked = det.Active;
                                        }

                                    }
                               
                            }
                        }
                    }
                }

                else if (e.Item.OwnerTableView.DetailTableIndex == 1)
                {
                    
                        int? eventId = GetEventId(e.Item);
                        RadComboBox Existingperson = e.Item.FindControl("Existingperson") as RadComboBox;
                        if (Existingperson != null)
                        {
                            Existingperson.DataSource = studentinformation.org_view_person_lookup();
                            Existingperson.DataBind();
                        }
                        RadComboBox Relationship = e.Item.FindControl("Relationship") as RadComboBox;
                        if (Relationship != null)
                        {

                            Relationship.DataSource = studentinformation.org_view_relationship_lookup();
                            Relationship.DataBind();
                        }
                        RadComboBox Designation = e.Item.FindControl("Designation") as RadComboBox;
                        if (Designation != null)
                        {
                            Designation.DataSource = studentinformation.org_view_designation_lookup();
                            Designation.DataBind();
                        }


                        if (e.Item.OwnerTableView.IsItemInserted)
                        {
                            //item is about to be inserted
                        }
                        else
                        {
                            if (eventId.HasValue)
                            {
                                GridEditableItem editedItem = e.Item as GridEditableItem;
                                int? parent_person_id = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["parent_person_id"].ToString().GetInteger();
                                var det = studentinformation.sch_view_student_parent_relationship_detail(eventId.Value, parent_person_id);



                                if (det != null)
                                {
                                    if (det.parent_person_id != null)
                                    {
                                        Existingperson.SelectedIndex = Existingperson.Items.IndexOf(Existingperson.Items.FindItemByValue(det.parent_person_id.ToString()));
                                    }
                                    if (det.relationship != null)
                                    {
                                        Relationship.SelectedIndex = Relationship.Items.IndexOf(Relationship.Items.FindItemByText(det.relationship.ToString()));
                                    }
                                    if (det.designation != null)
                                    {
                                        Designation.SelectedIndex = Designation.Items.IndexOf(Designation.Items.FindItemByText(det.designation.ToString()));
                                    }

                                    TextBox txtfristname = e.Item.FindControl("txtfristname") as TextBox;
                                    if (txtfristname != null)
                                    {
                                        txtfristname.Text = det.parent_first_name;
                                    }
                                    TextBox txtMiddlename = e.Item.FindControl("txtMiddlename") as TextBox;
                                    if (txtMiddlename != null)
                                    {
                                        txtMiddlename.Text = det.parent_middle_name;
                                    }
                                    TextBox txtLastname = e.Item.FindControl("txtLastname") as TextBox;
                                    if (txtLastname != null)
                                    {
                                        txtLastname.Text = det.parent_last_name;
                                    }
                                    RadDatePicker rdp_end_date = e.Item.FindControl("rdp_end_date") as RadDatePicker;
                                    if (rdp_end_date != null)
                                    {
                                        rdp_end_date.SelectedDate = det.parent_date_of_birth;
                                    }
                                    RadioButtonList parentrdgender = e.Item.FindControl("parentrdgender") as RadioButtonList;
                                    if (parentrdgender != null)
                                    {
                                        parentrdgender.SelectedValue = det.parent_gender;
                                    }
                                }
                            }
                        }
                   
                }
            }
how to solve that problem it's argent am struck ed my project for this problem How to solve it,s argent

shanker.B

shanker bangari
Top achievements
Rank 1
 answered on 25 Mar 2010
13 answers
528 views
I have spent the last couple of weeks trying to evaluate the RadControls and OpenAccess and the whole process has been driving me nuts. If the website, the forums and the products themselves didn't look so good I would have given up ages ago.

I'm running XP SP2 and VS2008SP1 and the latest stable 2009 build

As per a previous post, the problems of which I circumvented with a workaround - I am repeatedly seeing a design-time issue.

I have just:

cleared out the cache and reinstalled the telerik controls.
created a new web project
created a sqldatasource and configured and tested it
dragged on a radgrid and assigned the sqldatasource to it

As soon as do this, at design-time (and runtime) I get:

Error creating control:

Telerik.Web.UI.GridColumnCollection must have items of type 'Telerik.Web.UI.GridColumn'. 'telerik.web.ui.gridboundcolumn' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'. + loads more of the same

I have tried with teh Telerik.Web.UI from the GAC and from the installation folder.

I feel like I've been round in circles on all this and lost track of what's what :(

I have been unable to find any definitive guide to what a working simple project's footprint should look like to a) fix this and b) avoid it happening again

Help! Please :)

Mark

as an update:

the following shows "Cannot resolve symbol telerik" for all entities in the <Columns> collection

    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"  
        GridLines="None"
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ID"  
            DataSourceID="SqlDataSource1"
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
        <telerik.web.ui.gridboundcolumn datafield="ID" datatype="System.Int32"  
            headertext="ID" readonly="True" sortexpression="ID" uniquename="ID"></telerik.web.ui.gridboundcolumn> 
        <telerik.web.ui.gridboundcolumn datafield="Code" headertext="Code"  
            sortexpression="Code" uniquename="Code"></telerik.web.ui.gridboundcolumn> 
        <telerik.web.ui.gridboundcolumn datafield="FirstName" headertext="FirstName"  
            sortexpression="FirstName" uniquename="FirstName"></telerik.web.ui.gridboundcolumn> 
        <telerik.web.ui.gridboundcolumn datafield="LastName" headertext="LastName"  
            sortexpression="LastName" uniquename="LastName"></telerik.web.ui.gridboundcolumn> 
        <telerik.web.ui.gridboundcolumn datafield="EmailAddress"  
            headertext="EmailAddress" sortexpression="EmailAddress"  
            uniquename="EmailAddress"></telerik.web.ui.gridboundcolumn> 
    </Columns> 
</MasterTableView> 
    </telerik:RadGrid> 
 






Matthew Hardesty
Top achievements
Rank 1
 answered on 24 Mar 2010
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?