Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
The scenario :
My customer wants the tree node text to be edited after some button the page clicked. The scenario is as follows:
1 button clicked
2 selected node in tree became editable (displayed inside textbox)
3 after losing focus the changes are saved

My Code :
When i populate the tree nodes i set the

AllowEdit property to false - to prevent node became editable when clicked.
in the button_Click eventhandler i put call to

 

startNodeInEditMode function

 

as in the following code:

public void startNodeInEditMode(string nodeValue)
{
                 
    string js = "Sys.Application.add_load(editNode); function editNode(){ ";
    js += "var tree = $find(\"" + RadTreeView1.ClientID + "\");";
    js += "var node = tree.get_selectedNode();";
    js += "if (node) node.startEdit();";
    js += "Sys.Application.remove_load(editNode);};";
    RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "nodeEdit", js, true);           
}
protected void RadTreeView1_NodeEdit(object sender, RadTreeNodeEditEventArgs e)
{

     e.Node.Text = e.Text;


The Problem :
The changed  text of the node returns back to old version of text (the changes suddenly disappear after few seconds and old text appear)
Althougt i see that changes are saved in db inside the RadTreeView1_NodeEdit function.


Please help








shootermv
Top achievements
Rank 1
 answered on 02 Nov 2010
1 answer
100 views
Hi,

I'm creating a RadGrid totally programmatically in the code behind in a server control.  This grid contains a GridButtonColumn that triggers a routine in the code behind.  It works, but the first time the page is rendered, the button requires two clicks.  It does postback on the first click, but the command handler is not called.  On the second click, the command handler is called.  Any ideas what I'm doing wrong.  Thanks in advance for your help.
Princy
Top achievements
Rank 2
 answered on 02 Nov 2010
1 answer
218 views
Required functionality, on upload from the file explorer upload dialog if the document being uploaded already exists(and overwrite files is not selected), automatically rename the document with a new version number, and upload it.  How do I cancel the validation that happens between the ItemCommand() and custom content provider method StoreFile()?  Currently, ItemCommand() method fires, I am not able to change the upload.filename (read only) in this method.  The validation then fires preventing the StoreFile() method, so I am not able to modify the filename in this method either.  I would really like to remove this automated validation, and add my own.

Thanks!
Michelle
Fiko
Telerik team
 answered on 02 Nov 2010
1 answer
162 views

I have a requirement for a project that I'm having some difficulty getting to work.  I've looked at the following post, http://www.telerik.com/community/forums/aspnet-ajax/grid/client-side-expand-collapse-of-group.aspx, but it only takes me so far.  For my page, I have a grid that is configured for client-side grouping.  I have a requirement that the expanded groups are persisted on grid rebind.  There is a control on the page that allows the user to select from a list of items that translate to the groups in the grid.  So, the user selects 3 items in the list and there are 3 groups of those selected items in the grid, the user selects 5 items from the list and there are 5 groups in the grid, etc.  In other words the number of groups is variable based on user selection. 
I've set up a web service to handle the persisting of the group information via ajax callback from the page, and that all works fine.  The problem I'm having is that there isn't any way to get the selected group information in the OnGroupExpanded or OnGroupCollapsed events.  It appears that the sender is the grid itself and the event args are empty?  I currently have the following code, based on the link above:


                               


<telerik:RadGrid ...>
    <ClientSettings EnableRowHoverStyle="false">
        <ClientEvents OnGroupExpanded="groupExpanded" />
    </ClientSettings>
    ...
</telerik:RadGrid>

                                               


function
groupExpanded(sender, e) {
var grid = $find(sender.get_id());
var expandedGroupItems = grid._expandedGroupItems;
var lastItemId = expandedGroupItems[expandedGroupItems.length - 1];
alert("Owner TableView: " + lastItemId.split('!')[0]);
alert("Table Row Index : " + lastItemId.split('!')[1]);
}


In the example, it shows getting the row index by parsing the item ID and then this ID can be used server-side to set the row expansion.  However with variable groups, that ID is also variable (I've tested as such, the IDs change as groups are added or removed).  Is there really no way to get at the group item that was expanded or collapsed directly?  What I'd like, is to use our own internal unique id for the group, but it doesn't look like any group information is exposed at all in these events.


Also, I'd like to say that the documentation for OnGroupsExpanded and OnGroupsCollapsed is incorrect.  It states that the sender is a GridDataItem, when in fact it is the grid itself.  It is a bit confusing.


Any and all help would be greatly appreciated.



Thanks,

-Matt.


Radoslav
Telerik team
 answered on 02 Nov 2010
1 answer
78 views
when i m trying to show image in calender control,the day vale can not  seen.
Shinu
Top achievements
Rank 2
 answered on 02 Nov 2010
1 answer
62 views
the article in online help (Saving grid settings on a per user basis) works well untill i hit this headache:
after I added a new record into the grid i want to show the new record as the first row of the grid. also after edited an existing record when return to the grid I want to see the most-recently edited record listed as first row of the grid.

Is this possible to achieve? thanks in advance
Veli
Telerik team
 answered on 02 Nov 2010
2 answers
114 views
Hi all.
 I am using radeditor in VS 2005. I am unable to enter a line break. when I add data(text) in the editor and when i press enter to write in the next line instead of break  "$0$0" is coming and the next line continues in same line.(This is seen in chrome browser only). In other browsers this is working fine.
($0$0 for single break if I press enter twice I get $0$0)
I dont understand what is the problem Help me.
Thanks.
madhu
Top achievements
Rank 1
 answered on 02 Nov 2010
3 answers
100 views
Hi,

if you follow these steps in RadEditor:

1. Add a Table (e.g. 3x3 sized)
2. Set focus on the top right cell
3. Click on "Merge Cells Vertically" button
4. Set focus on the central cell (the second row)
5. Click on "Delete Row" button

The resulting table is a mess. This is because "delete row" doesn't check whether some of the cells on top of the affected row have a rowspan that needs to be decremented.
Marco
Top achievements
Rank 1
 answered on 02 Nov 2010
3 answers
191 views
Hi

I am successfully running a .Net2 application on a server which works pefectly with RadUploadProgressHandler. But When I try to access the same application accross domains the I receive an error when trying to Upload a file. The error is :
Did you register the RadUploadProgressHandler in web.config?
Please, see the help for more details: RadUpload 2.x - Using RadUpload - Configuration - RadUploadProgressHandler.

I don't understand why it works on the internal domain that the application is hosted on but throws error when the same application is accessed from another domain.

I have the following in my web config.

<

 

httpHandlers>

 

 

 

<

 

add verb="*" path="Telerik.RadUploadProgressHandler.aspx" type="Telerik.WebControls.RadUploadProgressHandler, RadUpload.Net2"/>

 

 

 

<

 

add verb="POST,GET" path="csharpwrapper/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/>

 

 

 

<

 

add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/>

 

 

 

</

 

httpHandlers>

 

 

 

<

 

httpModules>

 

 

 

<

 

add name="RadUploadModule" type="Telerik.WebControls.RadUploadHttpModule, RadUpload.Net2"/>

 

 

 

</

 

httpModules>

 

 

 

<

 

httpRuntime maxRequestLength="102400" executionTimeout="600"/>

 

 

 

Thanks in advance for any help.

Genady Sergeev
Telerik team
 answered on 02 Nov 2010
2 answers
58 views
    Hello.
I used RadGrid with declarative binding to SqlDataSource.
I need to store old and new values in log table when I make insert/delete/update operation.
I can handle RadGrid_UpdateCommand event like this:

protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
{
    GridEditableItem editItem = (GridEditableItem)e.Item;
          
    //extract the edited values in a Hashtable
    Hashtable values = new Hashtable();
    editItem.ExtractValues(values);
  
    //get the saved old values before editing
    Hashtable oldValues = (Hashtable)editItem.SavedOldValues;
      
    //insert  data to Database
    //...    
}

but this event fires before real operation in database and I don`t know if there is an error in current operation in DB or not.
Can anybody help?
Andrey
Top achievements
Rank 1
 answered on 02 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?