Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
312 views
Hi All,

I am using RadGrid AutoGenerateDeleteColumn.

Is there any possibility to add a confirmation message before deleting anything from the database. I would like to add a confirmation message from code behind. I have also tried the find the column on columnCreated event but I didn't find that column name. I am setting the autogeneratedeletecolumn = true property on Page_Load event.

Many thanks for your advance responses.


Thanks everyone to read this post. I have found the answer.

<telerik:RadGrid ID="rgList" Width="100%" AllowFilteringByColumn="true" Skin="Metro"
       AutoGenerateDeleteColumn="false" AutoGenerateEditColumn="false" EnableEmbeddedBaseStylesheet="true"
       AllowSorting="True" AllowPaging="True" PageSize="10" ShowHeader="true" runat="server"
       AutoGenerateColumns="true" ShowStatusBar="true">
       <MasterTableView TableLayout="Auto" CommandItemDisplay="Top">
           <CommandItemSettings ShowRefreshButton="false" ShowAddNewRecordButton="false" ShowExportToCsvButton="true"
               ShowExportToExcelButton="true" />         
       </MasterTableView>
       <GroupingSettings CaseSensitive="false" />
       <ClientSettings>
           <Selecting AllowRowSelect="true" />
       </ClientSettings>
   </telerik:RadGrid>

 Protected Sub rgList_ColumnCreated(ByVal sender As Object, ByVal e As GridColumnCreatedEventArgs) Handles rgList.ColumnCreated

        For Each col As GridColumn In rgList.MasterTableView.AutoGeneratedColumns
            If col.UniqueName = Constants.EDIT Then
                TryCast(col, GridBoundColumn).AllowFiltering = False
                TryCast(col, GridBoundColumn).HeaderText = ""
            ElseIf col.UniqueName = Constants.DELETE Then 'hiding Delete column from database
                col.Visible = False
            ElseIf col.UniqueName = "AutoGeneratedDeleteColumn" Then
                Dim gridButtonColumn As GridButtonColumn = col
                gridButtonColumn.ConfirmText = Constants.DELETE_CONFIRM_MESSAGE
            Else
                col.AutoPostBackOnFilter = True
                col.CurrentFilterFunction = GridKnownFunction.Contains
            End If
        Next

    End Sub


Muhammad
Top achievements
Rank 1
 asked on 30 Jul 2013
2 answers
139 views

Hey you all,

I am in trouble with my radcombox controls.

I use to load my radcombobox on demand with the below script :

protected void rbox1_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
        {
                
                    DataTable datatable = new DataTable();
                    datatable = Load.Mydata();
                    foreach (DataRow datarow in datatable.Rows)
                    {
                        RadComboBoxItem item = new RadComboBoxItem();
                        string col1 = datarow["col1"].ToString();
                        string col2 = datarow["col2"].ToString();
                        item.Value = col2;
                        item.Text = col1;
                        item.Attributes.Add("MYColumn", col2);
                        rbox1.Items.Add(item);
                        item.DataBind();
                    }
                 
        }

Now I am using a masterpage in my webapplication. and since, the combobox failed to load several times before loading data in its list( I have to click several times before seeing my data in the dropdown list). 

Please help me to go through this blocking point.

Regards,
PPRINC
Top achievements
Rank 1
 answered on 30 Jul 2013
1 answer
133 views
Hi
I'm trying to use some existing code to change the style when the Content is changed - on the client with JQuery,
I see from the HTML that the Rad Editor control is rendered as a textarea.

This is my jQuery:
$(document).ready(function () {
 
    $('textarea').on('keyup', function () {
        alert("Boo 2");
        inputIsDifferent($(this));
    });
 
});

 

My problem is the Alert(Boo 2) is not popping up, What am I doing wrong.

Andy

Ianko
Telerik team
 answered on 30 Jul 2013
1 answer
73 views
Hello,

I have a rad editor inside a rad dialog.  In IE7 , when the dialog loads for the first time the toolbar is not showing properly.  This only happens in IE7 and that too only when I load it for the first time.  The second time around everything works great.  I am attaching the screen shot of the page.  

Can you please let me know what the issue might be -  Thank you

The html code in the page

<td align="left"><strong>Article</strong> <br />
         <tlrk:RadEditor ID="D0_RadArticle" runat ="server" Width="690px" Height="420px"      ToolsFile="~/XML/Editor/HelpEditor.xml"
           StripAbsoluteImagesPaths="true"/>
 </td>


Javascript in the page -
function Dialog_OnOpen(dialogId)
     {
      if (dialogId == "<%=Dialog1.ClientID%>")
      {
       var editor = $find("<%=D0_RadArticle.ClientID%>");
       if (OI_b.IE)
        editor.setSize("690", "420");
       if (!OI_b.Fx)
       editor.onParentNodeChanged();
       $get("ctl00_Dialogs_Dialog1_C").style.overflow = "hidden";
      }
     }


Ianko
Telerik team
 answered on 30 Jul 2013
1 answer
298 views
<telerik:RadEditor ID="rdEditor" EditModes="Design,Preview"   OnClientLoad="OnRadClientLoad()"
                                StripFormattingOptions="NoneSupressCleanMessage" StripFormattingOnPaste="NoneSupressCleanMessage"
                                Width="100%" Height="400px" runat="server" ToolsFile="../XML/BasicTools.xml">
                              
                                 <Tools>     
                                  
                                  
        </Tools>                             
         
                            </telerik:RadEditor>

rdEditor.Content

The above is what I have used to configure RadEditor and am reading the html from  rdEditor.Content property
For some cases it works fine ie no extra line breaks are added while copying from microsoft word file .docx
 .  But in some case extra line breaks are added . I tried the solution ie adding ContentFilters=none but this remove even the valid line breaks

The strange part is that in preview mode it does not show any line breaks 

Would appreciate a quick response since thew issue is in production enviornment.

Regards
Ianko
Telerik team
 answered on 30 Jul 2013
1 answer
129 views
We are using telerik RadGrid in my web page to list data and I am using pagination.

<PagerStyle Mode="NextPrevAndNumeric" VerticalAlign="Bottom" Position="Bottom" AlwaysVisible="true" />
Dll -  Telerik.Web.UI
Version - 2011.1.519.40

Problem:
While changing the page size from 10 to 20/50 the pagination control disappears and then appears.
PFA the attached screen shots describing the issue.

I want the pagination to be static and it must not disappear.

Kindly help.

Konstantin Dikov
Telerik team
 answered on 30 Jul 2013
0 answers
91 views
Hello,

The demo http://demos.telerik.com/aspnet-ajax/asyncupload/examples/draganddrop/defaultcs.aspx works as expected but I am wondering if fullback mechanism can be implemented someway so that user can see the simple version of the control . Please share code snippet if necessary.

Thanks,
-Aarsh
Aarsh
Top achievements
Rank 1
 asked on 30 Jul 2013
0 answers
69 views
I have an editing page in my C# Dot Net 4.5 web app, using RadTextBoxes.  

It appears that this page will be used to store script in multiple alphabets, including right to left oriented ones like Arabic and Hebrew.

What I had hoped to do was put a checkbox on the page that toggles the boxes orientation between left-to-right (default) and right-to-left.

It occurs to me that I might be mixing up windows and web development.

Is this sort of thing possible with RadTextBoxes?  What would be my best approach?  
(It is possible that actual editing would not be done in this screen, that users would merely paste in text from other applications without actual typing.)

Sorry.  Never mind.  Found it.
Textbox1.Attributes["dir"] = "RTL";  
Boris
Top achievements
Rank 1
 asked on 30 Jul 2013
6 answers
309 views
Hello,

I have a WCF service.  On the client, I'm binding RadComboBox via web service.  I tap into ItemRequesting, and I do on the client:

function rcb_ItemsRequesting(sender, e) {
    var context = e.get_context();

    context["A"] = 5;
    context["B"] = 4;
    context["RelativeDate"] = null;
}

I have this web service:

[OperationContract]
public RadComboBoxData Get(RadComboBoxContext context)
{
    //context doesn't have anything
}

As my comment says, my context property has a zero count, the values aren't getting passed along.  I'm using 2008.3.1125.35.

Thanks.
Nencho
Telerik team
 answered on 30 Jul 2013
3 answers
160 views
I have a pop-up that works with the radgrid and on past grid it owrks fine, when I scroll the pop-up shows next to the line that i mouse over.  Fro some reason on this grid as soon as I scroll the pop-up always shows near the top of the screene of the grid instead of next to the row I am highlighting the label, at this point I ma lost as to what i could be.  the service works and the popup works, it just when I scroll down the grid the pop-up returns the correct info but shows always at top of the screen and grid half shown instead of next to row I am mousing over.

telerik Grid.
<telerik:GridTemplateColumn HeaderText="DMOS">
                                <ItemTemplate>
                                    <asp:Label ID="lblDMOS" runat="server" Text='<%#Bind("DMOS")%>'></asp:Label>
                                    <asp:PopupControlExtender ID="popInfo" runat="server" PopupControlID="pnlPop" TargetControlID="lblDMOS" DynamicContextKey='<% #Eval("DMOS")%>'
                                    DynamicControlID="pnlpop" DynamicServiceMethod="GetMOS" Position="Right"></asp:PopupControlExtender>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
 
 
Pop-up that it calls
 <asp:Panel ID="pnlPop" runat="server" style="display:none"></asp:Panel>
 
 
Item created event of the Radgrid
 Protected Sub myRadVacancy_ItemCreated(sender As Object, e As GridItemEventArgs) Handles myRadVacancy.ItemCreated
        If TypeOf e.Item Is GridDataItem Then
            Dim pce As PopupControlExtender = TryCast(e.Item.FindControl("popInfo"), PopupControlExtender)
 
            Dim behaviorID As String = "pce_" + e.Item.RowIndex.ToString
            pce.BehaviorID = behaviorID
 
            Dim lbl As Label = DirectCast(e.Item.FindControl("lblDMOS"), Label)
 
            Dim OnMouseOverScript As String = String.Format("$find('{0}').showPopup();", behaviorID)
            Dim OnMouseOutScript As String = String.Format("$find('{0}').hidePopup();", behaviorID)
 
            lbl.Attributes.Add("onmouseover", OnMouseOverScript)
            lbl.Attributes.Add("onmouseout", OnMouseOutScript)
        End If
    End Sub
 
Sergvice that it all calls
 
 'Serice for the MOS
    <System.Web.Services.WebMethod(), System.Web.Script.Services.ScriptMethodAttribute()> _
    Public Shared Function GetMOS(contextKey As String) As String
 
        Dim sb As New StringBuilder()
 
        sql = "Select strMOS, strJobTitle, strRemarks from MOSDescription where SUBSTRING(strMOS, 1,3) like '" & contextKey.Substring(0, 3) & "'"
 
        myDataTable = New DataTable
        myDataTable = getData(sql)
 
        If myDataTable.Rows.Count > 0 Then
            sb.Append("<table style='background-color:#f3f3f3; border: #ADC9F7 3px solid; ")
            sb.Append("width:260px; font-size:10pt; font-family:Verdana;' cellspacing='0' cellpadding='3'>")
            sb.Append("<tr><td colspan='3' style='background-color:#ADC9F7; color:white;'>")
            sb.Append("<b>MOS " + myDataTable.Rows(0)(0).ToString() + "</b>")
            sb.Append("</td></tr>")
            sb.Append("<tr><td style='width:400px;'> " + myDataTable.Rows(0)(1).ToString() + "</td></tr>")
            sb.Append("<tr><td style='width:400px;'> " + myDataTable.Rows(0)(2).ToString() + "</td></tr>")
            sb.Append("</table>")
        End If
        Return sb.ToString()
    End Function

Pavlina
Telerik team
 answered on 30 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?