This is a migrated thread and some comments may be shown as answers.

get DropDownTree

3 Answers 20 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Mohamad Javad
Top achievements
Rank 1
Mohamad Javad asked on 12 Nov 2014, 04:29 AM
hi

which find control for example, DropDownTree or ....
, in RadListView1_ItemEditing



i try below code,but give error.







  protected void RadListView1_ItemEditing(object sender, RadListViewCommandEventArgs e)

    {

RadListViewEditableItem editedItem = (RadListViewEditableItem)e.ListViewItem;



 RadTextBox txtSubject =(RadTextBox)editedItem.FindControl("txtSubject");



txtSubject .Text="hi";



}

please help me.

thanks

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 12 Nov 2014, 03:39 PM
Hello,

Go through the article below for more information about accessing controls in RadListView control:
http://www.telerik.com/help/aspnet-ajax/listview-accessing-controls.html


Regards,
Pavlina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mohamad Javad
Top achievements
Rank 1
answered on 16 Nov 2014, 06:01 AM
hi



my normal view form have textbox with text(for example text box have
this text > "Nice") ,  when i press the edit button, I have need, to
add some text( for example add > "Re: ") to texbox.

also need add  row number ,add to the textbox .

in otherwise the texbox befor edite="nice"

and after press edit="Re: nice"+ row number





when i set value to propertice in RadListView1_PreRender or RadListView1_ItemCreated , give error



for example when i set :

   protected void RadListView1_ItemCreated(object sender, RadListViewItemEventArgs e)

    {

    if (e.Item is RadListViewEditableItem && e.Item.IsInEditMode)

        {

         

            RadEditor txtEditor = e.Item.FindControl("txtEditor") as RadEditor;



           txtEditor.Content += "Re: " + txtEditor.Content ;



        }

}





or

 protected void RadListView1_PreRender(object sender, EventArgs e)

    {



        RadEditor txtEditor = RadListView1.FindControl("txtEditor") as RadEditor;



        txtEditor.Content += "Re: " + txtEditor.Content;

}



give Error.



please Help Me
0
Pavlina
Telerik team
answered on 19 Nov 2014, 09:31 PM
Hello,

What is the error you received? Did you try using ItemDataBound instead of ItemCreated and what is the result?

Regards,
Pavlina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
DropDownTree
Asked by
Mohamad Javad
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Mohamad Javad
Top achievements
Rank 1
Share this question
or