Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
133 views
Folks
using RadControls for ASP.NET AJAX Q3 2013 with VStudio 10. I am using below link as Prototype.

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/form-template-update/defaultcs.aspx

My Radgrid has Filter enabled.  Below are my steps to reproduce the error:

1) Filtered the Grid with some condition; Grid has no Rows.
2) Clicked Add New Command Item link Button.
3) Now can't Cancel Insert operation from Form Template.  Edit Form Stays open.
4) But if Grid has some rows, Cancel Insert operation works perfectly.

Below is my Code. Any help will be appreciated.

Thanks

Gc_0620

_________

01.protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
02.   {
03.       if (true && e.Item.OwnerTableView.Name == "MainClient") //validated
04.       {
05.           switch (e.CommandName)
06.           {
07.               case "Cancel":
08.                    
09.                   if (HiddenField1.Value == "false")
10.                   {
11.                       e.Canceled = true;
12.                       Session["savedIndex"] = e.Item.ItemIndex;
13.                       RadWindowManager1.RadConfirm("Continue with Cancel? Warning, you will loose any unsaved work!!!",
14.                           "confirmCancelBackFnMain", 350, 150, null, "Cancel Confirm");
15.                   }
16.                    
17.                   break;
18.               case "CancelConfirmed":
19.                   foreach (GridEditableItem item in RadGrid1.MasterTableView.GetItems(GridItemType.EditFormItem))
20.                   {
21.                       if (item.IsInEditMode && item.ItemIndex == (int)Session["savedIndex"])
22.                       {
23.                           item.FireCommandEvent("Cancel", String.Empty);
24.                       }
25.                   }
26.                   HiddenField1.Value = "false";
27.                   break;
28.           }
29.       }
30.   }
31.        
32.   __________
33.    
34.   function confirmCancelBackFnMain(arg)
35.   {
36.       var grid = $find("<%= RadGrid1.ClientID %>");
37.       if (arg)
38.       {
39.           //alert(document.getElementById('<%=HiddenField1.ClientID%>').value);
40.           document.getElementById(
41.           '<%=HiddenField1.ClientID
42.           %>').value = "true";
43.           grid.get_masterTableView().fireCommand("CancelConfirmed", String.Empty);
44.       }
45.       else
46.       {
47.           document.getElementById(
48.           '<%=HiddenField1.ClientID
49.           %>').value = "false";
50.       }
51. 
52.       document.getElementById(
53.       '<%=HiddenField1.ClientID
54.       %>').value = "false";
55.   }

Princy
Top achievements
Rank 2
 answered on 20 May 2014
1 answer
157 views
Hi, I am writing the statement like,
 int value=Convert.ToInt32(objRadDropDowmTree.EmbadedTree.Nodes[1].Value);

But its showing an error "Input string was not correct"
 Please tell me, how to access any specific node value? 

Please also help me, how to assign tooltip in RadDropDowmTree Nodes .
Shinu
Top achievements
Rank 2
 answered on 20 May 2014
6 answers
1.3K+ views
Hi,

   how to create 1 or more radgrid dynamically in page load and grid needdatasource grid bind also databound use............

Advance & Thanks,
Ansari.
Princy
Top achievements
Rank 2
 answered on 20 May 2014
1 answer
159 views
Hi All,

I am using a RadGrid with "Batch" Edit mode. Any individual
change on a cell is working fine. My problem is when I made changes to a
column values from code behind (ex. Increasing a salary). Any changes
are not "marked" as changed, not saved when I press the "Save Changes"
values and after refreshing the grid I get the old ones. Any
suggestion?

Thanks!
Kostadin
Telerik team
 answered on 20 May 2014
4 answers
125 views
Do you have an example of deleting a node by keyboard button click?

Vsoni
Top achievements
Rank 1
 answered on 20 May 2014
4 answers
522 views
Hi,

i tried out your Rating-Example "Rating - Rate and Leave a Comment" which works great, but how do
i get the Rating Object in the "btnPostComment_Click" Event?

Thanks
Best Regards
Rene
Shinu
Top achievements
Rank 2
 answered on 20 May 2014
1 answer
92 views
I need a check box column in my RadGrid. When should I use a GridCheckBoxColumn  and when should I use a GridTemplateColumn?
Currently I am using a GridCheckBoxColumn but unable to click and select a check box!
Princy
Top achievements
Rank 2
 answered on 20 May 2014
1 answer
54 views
Hi.
how can i disable the sortcolour on sorting column. 
Princy
Top achievements
Rank 2
 answered on 20 May 2014
4 answers
215 views
I have a fairly complicated scenario that I can't seem to sort out.  

We are using a RadEditor control to allow users to enter Text Ads in a fixed DIV area.  To do this we are setting up the Content area of the RadEditor something like this:

<Content>
    <div id="textContainer" contenteditable="false" unselectable="on">
        <div id="paddingContainer" contenteditable="false" unselectable="on">
            <div id="classifiedArea" contenteditable="true" unselectable="off">
 
    </div></div></div>
</Content>

In the code behind we set the allowed dimensions of the Div's.

When a User enters text, it looks something like this:

<div id="textContainer" contenteditable="false" unselectable="on">
     <div id="paddingContainer" contenteditable="false" unselectable="on">
          <div id="classifiedArea" contenteditable="true" unselectable="off" style="width: 172.8px; font-family: HELVETICA; font-size: 14px; line-height: 22px; min-height: 22px;">
Line 1<br>Line 2<br>Etc
</div></div></div><!-- End -->

Then the user selects say the first Line and uses the Center Justify tool on the tool bar.

Problem - this justifies all of the lines!

Playing around, I found that if we change the NewLineMode to "P" or "Div" - then the Center Justify works as desired, but introduces a new problem.  It closes the contentEditable <div> tag, then replicates it for the new Div or P tag.  

Example:

<div id="textContainer" contenteditable="false" unselectable="on">
     <div id="paddingContainer" contenteditable="false" unselectable="on">
     <div id="classifiedArea" contenteditable="true" unselectable="off" style="width: 172.8px; font-family: HELVETICA; font-size: 14px; line-height: 22px; min-height: 22px;">Line 1
</div>
<p id="classifiedArea" contenteditable="true" unselectable="off" style="width: 172.8px; font-family: HELVETICA; font-size: 14px; line-height: 22px; min-height: 22px;">Line 2</p>
<p id="classifiedArea" contenteditable="true" unselectable="off" style="width: 172.8px; font-family: HELVETICA; font-size: 14px; line-height: 22px; min-height: 22px;">Line 3</p>
</div></div>

This breaks things.

What I am trying to get it to do is insert <p> or <div> tags inside the editable <div> - without hijacking it.

I tried adding a fourth nested <div>, but no luck.  

Any help would be great.

Dan

Dan
Top achievements
Rank 1
 answered on 19 May 2014
6 answers
556 views
From reading this forum it looks like the code below should allow me to use a physical path for the RadFileExplorer but instead I get this error message:  'C:/Test2' is a physical path, but a virtual path was expected.

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        string[] viewPaths = new string[] { @"C:\Test2", @"\\CHRISTIAN_KING2\Test1" };
 
        RadFileExplorer1.Configuration.ViewPaths = viewPaths;
    }
 
}
Mark
Top achievements
Rank 1
 answered on 19 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?