Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
202 views
Hello! I hope can help me ..
I need to show a confirmation message before the
Deleting a row, I tried this:
<telerik:RadGrid ID="rgSucursales" runat="server" AllowPaging="True" AllowSorting="True" 
                        GridLines="None" onneeddatasource="rgSucursales_NeedDataSource"  
                        VirtualItemCount="1" onitemcommand="rgSucursales_ItemCommand"  
                        onitemdatabound="rgSucursales_ItemDataBound" > 
                        <PagerStyle FirstPageToolTip="Primera Página" /> 
                        <MasterTableView PageSize="5"> 
                            <Columns>  
                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Editar"  
                                    ImageUrl="img/editar.png" Text="Editar Cuenta" UniqueName="column"> 
                                </telerik:GridButtonColumn> 
                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Eliminar"  
                                    ImageUrl="img/eliminar.png" Text="Eliminar Cuenta" UniqueName="EliminarColumna"  > 
                                </telerik:GridButtonColumn> 
                            </Columns> 
                        </MasterTableView> 
                        <ClientSettings EnableAlternatingItems="False"> 
                            <Selecting AllowRowSelect="False" /> 
                            <ClientMessages PagerTooltipFormatString="Página &lt;strong&gt;{0}&lt;/strong&gt; de &lt;strong&gt;{1}&lt;/strong&gt;" /> 
                        </ClientSettings> 
                    </telerik:RadGrid> 

protected void rgSucursales_ItemCommand(object source, GridCommandEventArgs e) 
        { 
            string cmd = e.CommandName.ToString(); 
             
             
            if (cmd.Equals("Editar")) 
            {                 
                Session["BANEDIT"] = item["Codigo"].Text; 
                rwSucursales.NavigateUrl = "~/OperCat.aspx"; 
                rwSucursales.Visible = true; 
 
            } 
            else if (cmd.Equals("Eliminar")) 
            { 
                GridDataItem item = (GridDataItem)e.Item; 
                ImageButton deleteBtn = (ImageButton)item["EliminarColumna"].Controls[0]; 
                deleteBtn.Attributes.Add("OnClick", "if(!confirm('¿Está seguro que desea Realizar la Venta?')){return false;};"); 
                                 
                var codigoEliminar = item["Codigo"].Text; 
 
                if (_dbase.DeleteQuery("Delete From tb where id_Bs=" + codigoEliminar).Equals("Ok")) 
                { 
                    //Row deleted 
                                                                   "AlertSucess('#effect','¡La Cuenta ha sido eliminada!');", true); 
 
                     
                } 
                else 
                { 
                    //Problem in query 
                } 
 
            } 
            
        } 





But the problem is that the first time I press the
button deletes the row, when I delete another row
It works and shows me the message.

That way I can show the confirmation message without
do a postback?

Thanks for your help!

Sincerly Briayan!

Brygom
Top achievements
Rank 1
 answered on 01 Jan 2010
4 answers
394 views
Is there an example of adding an expand all / collapse all button in a group header? I have looked at the example here:


but this is for a hierarchical grid. I'm interested in such a feature for a grid that is grouped, with the button in the group header. 


neebs
Top achievements
Rank 2
 answered on 01 Jan 2010
1 answer
89 views
I have a user using the telerik rad editor; there is a <link> tag in the editor which causes IE to crash (FireFox and GC do not crash).  Are there any known markup problems with the editor?

In this case if the <link> tag is on the page it crashes the browser; if I remove the <link> tag in another browser IE doesn't crash; if I place it back in IE crashes.
Rumen
Telerik team
 answered on 01 Jan 2010
1 answer
146 views
I am currently using another product for html text editing and spell checking and would like to switch it all over to RadEditor and RadSpell.  One feature that our current spell check provides is the ability to do a custom "Inappropriate Word Filter."  This is similar to spell checking but the main difference is that there are no "suggestions" of other spellings and the drop down would say something along the lines of "This word is flagged as an Inappropriate Word."  Does anyone have any suggestions on how to accomplish something along these lines ?

Thanks.
Rumen
Telerik team
 answered on 01 Jan 2010
1 answer
81 views
Hi there
i'm trying to apply CSS to my contents of the RadEditor , i'm sitting the Width property like this :
.A200 {    width: 200pt;   }
it works fine with IE * but it doesn't work in Google Chrome.
i tried to add the "!important" but in vain.
any suggestions anyone?
thanks
Rumen
Telerik team
 answered on 01 Jan 2010
7 answers
195 views
i have a background color for the rdContent cell and i want it to reach the border, seems it has a 6px margin or something. please see screenshot below.

Some help please.
Svetlina Anati
Telerik team
 answered on 01 Jan 2010
3 answers
139 views
My existing application uses RAD toolbars to run various server-side functions.

I now have a need to add a button that will print the current page, which I think would be a simple JavaScript "document.print()".

I've tried the following example copied from your documentation, just to teach myself how to connect to the client-side, which I have never learned, nor can I invest much in JavaScript.

Nothing happens, and I don't know why. I am using VS2008 on Windows Vista with IE8, all current updates, and the latest Q3 release of RAD/Ajax controls.

OOPS!, Sorry didn't notice the Format Code Block option before posting. TPG

 

<

 

script type="text/javascript">   (note VS2008 tells me a "type" is required, so I changed the script here)

 

 

 

function OnClientButtonClicked(sender, args) {

 

 

 

var button = args.get_item();

 

alert(button.get_text());

}

 

</

 

script>

 

<

 

 

telerik:RadToolBar id="RadToolBar1" runat="server" Orientation="Horizontal" OnClientButtonClicked="OnClientButtonClicked">

 

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

 

<Items>

 

 

 

<telerik:RadToolBarButton Text="button1" runat="server"></telerik:RadToolBarButton>

 

 

 

<telerik:RadToolBarDropDown Text="dropdown" runat="server">

 

 

 

<Buttons>

 

 

 

<telerik:RadToolBarButton Text="Button2" runat="server"></telerik:RadToolBarButton>

 

 

 

</Buttons>

 

 

 

</telerik:RadToolBarDropDown>

 

 

 

</Items>

 

</

 

 

telerik:RadToolBar>

 

 

Tomica
Top achievements
Rank 2
 answered on 31 Dec 2009
3 answers
148 views
Hello,

I have a RAD Grid that has several people's records and the first column is an ID (named SID)field.  What I want to do, is on a button click, build a comma delimited string of all the ID's in the Grid.  I have done this in VB but now need to convert it to C# and m having a bit of trouble with it.  It would be a bit simpler but I actually use the SID column as a link to each person's profile, so it's not as simple as somethinging like:

OwnerTableView.Columns.FindByUniqueName("SID").ToString(); (If I do this I get "<a href=/default.aspx?sid=XXXX>XXXX </a>" as the value, when I only want the XXXX part.

This is what I use in VB to make the string, I use the Data key values (which is the SID field).

Session("sidlist") = Nothing
        Dim SID_ListNewStudents As StringBuilder = New StringBuilder()
        For Each item As Telerik.Web.UI.GridDataItem In SelectedGrid.MasterTableView.Items
            SID_ListNewStudents.Append(item.OwnerTableView.DataKeyValues(item.DataSetIndex).Values(0))
            SID_ListNewStudents.Append(", ")
        Next

Any help would be great, Thanks!
Schlurk
Top achievements
Rank 2
 answered on 31 Dec 2009
4 answers
126 views
How can I remove the accruing weekly tally of weeks on the left hand side of the calendar?  What property would that be?  I'm using the raddatepicker.

Thanks!
wen
Wendy Hunt
Top achievements
Rank 2
 answered on 31 Dec 2009
2 answers
150 views
Hi experts,

we are facing challenges in converting an exisitng asp.net gridview to radgrid hosted by a radpanel.  below is the existing asp.net gridview code which we are trying to convert to radgrid.   Issue is we are not able to get the reference to the controls hosted by the radgrid for eg. Label)e.Row.FindControl("lblRole"), is always returning null. Please note that container for the radgrid is radpanel.  Tried looping the controls collection and finding the control by using ID (lblrole) but still noluck. any help is appreciated

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)  
        {  
            string strPrimary = string.Empty;  
            string sCopy = string.Empty;  
 
            if (e.Row.RowType == DataControlRowType.DataRow)  
            {  
                Label lblRole = (Label)e.Row.FindControl("lblRole");  
                RadioButtonList rbroles = (RadioButtonList)e.Row.FindControl("rbroles");  
                Label lbldelete = (Label)e.Row.FindControl("lbldelete");  
 
                rbroles.SelectedValue = lblRole.Text;  
                CheckBox chk = (CheckBox)e.Row.FindControl("chkUser1");  
 
                if (lbldelete != null)  
                {  
                    if (string.Compare(lbldelete.Text, "true", true) == 0)  
                    //if (lbldelete.Text.Equals("true",StringComparison.InvariantCultureIgnoreCase)  
                    {  
                        chk.Checked = true;  
                    }  
                }  
 
                if (hdnCurrenUserRole.Value.Length > 0)  
                {  
                    currentUserRole = Int32.Parse(hdnCurrenUserRole.Value);  
                }  
                if (currentUserRole == (int)Role.Owner || IsAdmin)  
                {  
                    rbroles.Enabled = true;  
                    chk.Enabled = true;  
                }  
                else  
                {  
                    rbroles.Enabled = false;  
                    chk.Enabled = false;  
                }  
            }  
        } 
Sharada Murali
Top achievements
Rank 1
 answered on 31 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?