Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
1.4K+ 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
183 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
165 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
846 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
131 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
89 views
Hi.
how can i disable the sortcolour on sorting column. 
Princy
Top achievements
Rank 2
 answered on 20 May 2014
4 answers
274 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
592 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
2 answers
298 views
Hi,

I'm having some challenges hiding/showing a RadTextBox.
The set_visible client side method does not seem to work, so I'm using the following:
  document.getElementById('<%= txtURL.ClientID %>').style.display = 'block';

This makes the box visible, but as soon as I move the mouse over the field, it disappears!
Also, once the box is visible if I check another radio button like File, and then come back and check Link, the box does not reappear.
It seems that it only shows the first time I check the Link button.
Happening in IE, FF and Chrome.

Here's my complete scenario (see attached screenshot).
I have 3 radio buttons all of which have an OnClientCheckedChanged event defined.
These event handlers hide/show relevant controls.
I check the None radio button and hide all of the related labels/controls in the Page_Load event (code behind).

Here's the relevant code snippets.

Code Behind:
protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            lblURL.Style.Add("display", "none");
            txtURL.Style.Add("display", "none");
            lblUpload.Style.Add("display", "none");
            uplAttachment.Style.Add("display", "none");
            lblFileName.Style.Add("display", "none");
            lblFileNameValue.Style.Add("display", "none");
 
            optAttachment.Checked = false;
            optURL.Checked = false;
            optNone.Checked = true;
 
            taskID = Request.QueryString["taskID"].ToString();
            txtTaskID.Text = taskID;
        }
    }

RadTextBox declaration:
<tr>
                        <td class="templateLabel">
                            <asp:Label ID="lblURL" ToolTip="Specify a link (must start with http:// or https://)"
                                runat="server" Text="Link:"></asp:Label>
                            <asp:Label ID="lblFileName" ToolTip="File Name of last upload"
                                runat="server" Text="File Name:"></asp:Label>
                        </td>
                        <td class="templateValue">
                            <telerik:RadTextBox ID="txtURL" MaxLength="300" runat="server" EmptyMessage="Specify a link (must start with http:// or https://)"
                                Width="450px"
                                Enabled='<%# (Boolean)Session["EditProcess"] %>'>
                            </telerik:RadTextBox>
                            <asp:Label ID="lblFileNameValue" Text="File Name goes here" ToolTip="File Name of last upload"
                                runat="server"></asp:Label>
                        </td>
                    </tr>

Radio Buttons:
<tr>
    <td class="templateLabel">
         <asp:Label ID="lblAttachmentType" runat="server" Text="Reference:"></asp:Label>
    </td>
    <td class="templateValue">
        <telerik:RadButton runat="server" AutoPostBack="False" Enabled='<%# (Boolean)Session["EditProcess"] %>' ID="optAttachment" ButtonType="ToggleButton" ToggleType="Radio" GroupName="urlOrAtt" Text="File" Value="attachment" OnClientCheckedChanged="optAttachment_CheckedChanged"></telerik:RadButton>
        <telerik:RadButton runat="server" AutoPostBack="False" Enabled='<%# (Boolean)Session["EditProcess"] %>' ID="optURL" ButtonType="ToggleButton" ToggleType="Radio" GroupName="urlOrAtt" Text="Link" Value="url" OnClientCheckedChanged="optUrL_CheckedChanged"></telerik:RadButton>
        <telerik:RadButton runat="server" AutoPostBack="False" Enabled='<%# (Boolean)Session["EditProcess"] %>' ID="optNone" ButtonType="ToggleButton" ToggleType="Radio" GroupName="urlOrAtt" Text="None" Value="none" OnClientCheckedChanged="optNone_CheckedChanged"></telerik:RadButton>
    </td>
</tr>

OnClientCheckedChanged Handlers:
function optUrL_CheckedChanged(sender, eventArgs) {
            if (!g_rowSelected) {
                if (sender.get_checked()) {
                    alert('Link selected');
                    //var txtURL = $find("<%=txtURL.ClientID%>");
                    //txtURL.clear();
                    //txtURL.set_visible(true);
                    document.getElementById('<%= txtURL.ClientID %>').style.display = 'block';
                    document.getElementById('<%= lblURL.ClientID %>').style.display = 'block';
                    $find("<%=uplAttachment.ClientID%>").set_visible(false);
                    document.getElementById('<%= lblUpload.ClientID %>').style.display = 'none';
                    document.getElementById('<%= lblFileName.ClientID %>').style.display = 'none';
                    document.getElementById('<%= lblFileNameValue.ClientID %>').style.display = 'none';
                }
                EnableSave();
            }
        }
 
        function optAttachment_CheckedChanged(sender, eventArgs) {
            if (!g_rowSelected) {
                if (sender.get_checked()) {
                    alert('File selected');
                    var txtURL = $find("<%=txtURL.ClientID%>");
                    txtURL.clear();
                    txtURL.set_visible(false);
                    document.getElementById('<%= lblURL.ClientID %>').style.display = 'none';
                    $find("<%=uplAttachment.ClientID%>").set_visible(true);
                    document.getElementById('<%= lblUpload.ClientID %>').style.display = 'block';
                    document.getElementById('<%= lblFileName.ClientID %>').style.display = 'block';
                    document.getElementById('<%= lblFileNameValue.ClientID %>').style.display = 'block';
                }
                EnableSave();
            }
        }
 
        function optNone_CheckedChanged(sender, eventArgs) {
            if (!g_rowSelected) {
                if (sender.get_checked()) {
                    alert('None selected');
                    var txtURL = $find("<%=txtURL.ClientID%>");
                    txtURL.clear();
                    txtURL.set_visible(false);
                    document.getElementById('<%= lblURL.ClientID %>').style.display = 'none';
                    $find("<%=uplAttachment.ClientID%>").set_visible(false);
                    document.getElementById('<%= lblUpload.ClientID %>').style.display = 'none';
                    document.getElementById('<%= lblFileName.ClientID %>').style.display = 'none';
                    document.getElementById('<%= lblFileNameValue.ClientID %>').style.display = 'none';
                }
                EnableSave();
            }
        }


Any thoughts?

My thanks in advance.

Jim
jlj30
Top achievements
Rank 2
 answered on 19 May 2014
2 answers
222 views
I need to access an image control (img1) which nests within a second table in my Radlistview. Is this possible to do via ItemDatabound.
Here is the Radlistview:
 
<telerik:RadListView ID="radlist1" runat="server" ItemPlaceholderID="ListViewContainer" DataKeyNames="ID">
    <LayoutTemplate>
            <asp:PlaceHolder runat="server" ID="ListViewContainer"></asp:PlaceHolder>
    </LayoutTemplate>
       <ItemTemplate>
            <fieldset>
                  <legend><strong><%# Eval("Name")%></strong></legend>
                        <table >
                             <tr>
                                 <td>
                                        <table >
                                              <td>
                                                   <strong> <%# Eval("Title")%></strong> 
                                               </td>
                                                <td valign="top" style="width:52px;" >
                                                      <asp:Image ID="img1" runat="server"  />
                                                  </td>
                                            </table>
                                    </td>
                                </tr>
                                 <tr>
                                 </tr>
                             </table>
                        </fieldset>
                    </ItemTemplate>
             </telerik:RadListView>
K W
Top achievements
Rank 1
 answered on 19 May 2014
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?