Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
198 views
Hey community,

I am working with version 2010.3.1109.35 of the RadControls for ASP.NET AJAX. I have a requirement to make a confirmation dialog appear on a grideditcommandcolumn.

For our purposes, we are retooling the edit button to do a delete.

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderText="Add/Delete"
    HeaderStyle-Font-Bold
="true" ButtonType="PushButton" EditText="Delete"
        InsertText="Add" HeaderStyle-Width="130"/>

In my grids ItemDataBound event, I have the following:
if ((e.Item is GridEditableItem) && (!e.Item.Edit))
{
    GridEditableItem _item = (GridEditableItem)e.Item;
    ((Button)_item.FindControl("EditButton")).Attributes.Add("onclick", SR.GetString(SR.Message_DeletePopup, "configuration"));
}
 
...

For your convenience my SR class looks like this:
...
 
public static string GetString(string strString, string param1)
 {
       return string.Format(strString, param1);
 }
 
...
 
public const string Message_DeletePopup = "javascript:return confirm('Are you sure you wish to delete this {0}?');";
 
...


The popup confirm dialog is displayed, but the cursor returns from there (ie: my debugger doesn't see it) and my ItemCommand event is never triggered. It doesn't seem matter which button I push, OK and Cancel do the same thing.


Any ideas?

johnv
Top achievements
Rank 2
 answered on 15 Mar 2011
1 answer
118 views

* Here RadGrid Extended for our framewok
* When Exporting to PDF,the content of the grid showing fine. But the HeaderText not visible.

<

 

PM:PMRADGrid ID="tgrdPrintHistoTrans" runat="server" AutoGenerateColumns="False" Height="450px" Width="70%" Visible="false" >

 

 

<MasterTableView DataKeyNames="cid,payee_id,request_id,parent_id" ClientDataKeyNames="payee_id,request_id,parent_id"

 

 

EnableViewState="true">

 

 

<GroupByExpressions>

 

 

<telerik:GridGroupByExpression>

 

 

<SelectFields>

 

 

<telerik:GridGroupByField FieldName="parent_id" HeaderText="" />

 

 

</SelectFields>

 

 

<GroupByFields>

 

 

<telerik:GridGroupByField FieldName="parent_id" HeaderText="" />

 

 

</GroupByFields>

 

 

</telerik:GridGroupByExpression>

 

 

</GroupByExpressions>

 

 

<Columns>

 

 

<telerik:GridTemplateColumn HeaderText="Effective &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posted&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fund"

 

 

HeaderStyle-Width="250px">

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblEDate" runat="server" Text='<%# Eval("effective_date", "{0:MM/dd/yyyy}") & " " & Eval("post_date", "{0:MM/dd/yyyy}") & " " & Eval("fidabbrev") %>'></asp:Label>

 

 

<br />

 

 

<asp:Label ID="lblRev" runat="server" Text='<%# Bind("reversal")%>' Visible=true></asp:Label>

 

 

<br />

 

 

<asp:Label ID="Label1" runat="server" Text='<%# Bind("ttype")%>' Visible="true"></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Dollar Value" HeaderStyle-Width="75px">

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblPDate" runat="server" Text='<%# Eval("dollar_val","{0:C}")%>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Amount" Display="true" HeaderStyle-Width="75px">

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblAmount" runat="server" Text='<%# Eval("amt","{0:00.000000}")%>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Units" HeaderStyle-Width="75px">

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblUnits" runat="server" Text='<%# Eval("units")%>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="UserId" HeaderStyle-Width="75px">

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblUserId" runat="server" Text='<%# Bind("userid")%>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings>

 

 

<Scrolling UseStaticHeaders="false" />

 

 

</ClientSettings>

 

 

</PM:PMRADGrid>

 

Daniel
Telerik team
 answered on 15 Mar 2011
0 answers
78 views
i am having 3 rad comboboxes on a page and on the selected index change event ofone of them a rad grid must appear. In that grid one column is coded in aspx page but other columns should appear as which month has been selected in the above rad combobox. so if january is selected 31 column must appear and accordingly. now in each those cells of column rad comboboxes should come and to be binded to the datatable containing some data as selection from remaining rad comboboxes.

any help will be grateful
thanks in advance
arun
arun
Top achievements
Rank 1
 asked on 15 Mar 2011
1 answer
116 views
Hi,

We used radgrid pagination function on our pages, our 508 team find there is issue for the pagination. Focus is lost when the user tabs to the page number link ( e.g 1, 2, 3 for page number) . The dotted border that denotes focus disappears on this link.

Is there any way to address this issue?

Thanks,
Wei
Maria Ilieva
Telerik team
 answered on 15 Mar 2011
1 answer
125 views
Hi,
We used pagination for Radgrid in our pages. There is a layout table being used to display the Page Size dropdown( see attached screen shot).
1. This layout table has a table summary attribute of "combobox" defined. ( see below source code). 

<table class="" summary="combobox" style="border-width: 0pt;" border="0" cellpadding="0" cellspacing="0">
<tbody><tr class="rcbReadOnly">
<td class="rcbInputCell rcbInputCellLeft" style="width: 100%;"><input autocomplete="off" name="ctl00$cphContent$ExceptionRequestRadGrid$ctl00$ctl03$ctl01$PageSizeComboBox" class="rcbInput" id="ctl00_cphContent_ExceptionRequestRadGrid_ctl00_ctl03_ctl01_PageSizeComboBox_Input" value="10" readonly="readonly" type="text"></td><td class="rcbArrowCell rcbArrowCellRight"><a id="ctl00_cphContent_ExceptionRequestRadGrid_ctl00_ctl03_ctl01_PageSizeComboBox_Arrow" style="overflow: hidden; display: block; position: relative; outline: medium none;">select</a></td>
</tr>
</tbody>
</table>

Our 508 team suggested that since this is not real data table, summary attribute should be removed, otherwise Jaws will read that summary and it will  confuse the user. Also, it is possible not use table  but div instead?

2.  The Page Size dropdown is missing a form label

Can these issues be addressed?

Thanks,
Wei

Maria Ilieva
Telerik team
 answered on 15 Mar 2011
2 answers
215 views
Hi,
I would like to have a Tree view that can be filtered. 
Filtering Combo box and a tree view within, but looks like telerik is not supporting it. So is there any alternate for that? or any idea how to achieve something similar to that?

regards,
Naresh
Nikolay Tsenkov
Telerik team
 answered on 15 Mar 2011
3 answers
60 views
Hi,

Trying to think of a way around this, the quickest would be to remove paging but i'd rather do some sort of paging.

If you look at http://brightwells.com/AntiquesAndFineArt/Antiques/Catalogue.aspx you will see it has a hyperlink at the top under order of sale for 1-120 which works as its in view but if you look at 311 and click on it it can't get the hook as it's not on the current page.  I'm binding the <a name="lotnumber"></a> in the Photo Thumbnail field.

Is there anyway to get the paging work according to the a name link?

Thanks,
Chris
Iana Tsolova
Telerik team
 answered on 15 Mar 2011
1 answer
57 views
on the index change of rad combobox arad grid must appear with dynamically created columns containing rad comboboxes and those comboboxes are to be binded with some data from database.the columns with comboboxes are coming but i am unable to bind with data. i am doing this programmatically using ITEMPLATE interface by inheriting in a class and calling InstantiateIn method.
help by sending or posting a code snippet.
thanks in advance
Anirud
    //calling this function inside an event
    public void loadGrid()
    {
      //looping for creating 31 columns
            for (int I_ColumnCount = 1; I_ColumnCount <= 31; I_ColumnCount++)
            {
                 
                GridTemplateColumn gridtemplatecolumn = new GridTemplateColumn();
                gridtemplatecolumn.ItemTemplate = new MyTemplate(Convert.ToString(I_ColumnCount));
                gridtemplatecolumn.HeaderText = Convert.ToString(I_ColumnCount);
                this.rg_Attendence.MasterTableView.Columns.Add(gridtemplatecolumn);
                ViewState["grid_DayCount"]=Convert.ToString(I_ColumnCount);
            }
    }
    
    public class MyTemplate : ITemplate
    {
        protected RadComboBox lblControl;
        public string colname;
        public MyTemplate(string cName)
        {
            colname = cName;
             
        }
        public void InstantiateIn(System.Web.UI.Control container)
        {
             
            lblControl = new RadComboBox();
            lblControl.ID = colname;
            container.Controls.Add(lblControl);
        }
    }
 
    //this function contains data which is retrieved from database and need to bind to rad grid and comboboxes(which are created inside rad grid dynamically)
    protected void loadEmployees()
    {
            RadComboBox lblControl = new RadComboBox();
            
            DataTable DT_Employee = new DataTable();
            DT_Employee = BLL.get_Attendance(_obj_Smhr_Attendance);
            if (DT_Employee.Rows.Count == 0)
            {
                
                    rg_Attendence.Visible = true;
                    rg_Attendence.DataSource = DT_Employee;
                    rg_Attendence.DataBind();
                    for (i = 0; i <= rg_Attendence.Items.Count - 1; i++)
                    {
                        //here i am trying to bind data to comboboxes which are created dynamically inside rad grid
                        rcmbList = rg_Attendence.Items[i].FindControl("lblControl") as RadComboBox;
                        if (Convert.ToString(Convert.ToString(DT_Employee.Rows[i][3])) == "0")
                            rcmbList.SelectedIndex = rcmbList.FindItemIndexByValue(Convert.ToString("P"));
                        else if (Convert.ToString(Convert.ToString(DT_Employee.Rows[i][3])) == "1")
                            rcmbList.SelectedIndex = rcmbList.FindItemIndexByValue(Convert.ToString("L"));
                        
                    }
                }
                else
                {
                    rg_Attendence.Visible = false;
                    btn_Save.Visible = false;
                    btn_Finalize.Visible = false;
                }
            }
            else
            {
                _obj_Smhr_Attendance.OPERATION = operation.Check;
                _obj_Smhr_Attendance.ATTENDANCE_MODE = true;
                DT_Employee = BLL.get_Attendance(_obj_Smhr_Attendance);
                rg_Attendence.Visible = true;
                rg_Attendence.DataSource = DT_Employee;
                rg_Attendence.DataBind();
                for (i = 0; i <= rg_Attendence.Items.Count - 1; i++)
                {
                    //here i am trying to bind data to comboboxes which are created dynamically inside rad grid 
                    lblControl = rg_Attendence.Items[i].FindControl("colname") as RadComboBox;
                    if ((Convert.ToString(Convert.ToString(DT_Employee.Rows[i][2]))).Trim() == "P")
                    {
                        lblControl.SelectedIndex = lblControl.FindItemIndexByValue(Convert.ToString("P"));
                    }
                    else if ((Convert.ToString(Convert.ToString(DT_Employee.Rows[i][2]))).Trim() == "L")
                    {
                        lblControl.SelectedIndex = lblControl.FindItemIndexByValue(Convert.ToString("L"));
                    }
                    
                     
                }
                
            }
            
    }
}
Iana Tsolova
Telerik team
 answered on 15 Mar 2011
2 answers
107 views
I'm using a radcombox (with custom text). I need to be able to change the caret position in the input area of the combo box from the client side.

I can figure out how to get the input domelement - but for the life of me I can't figure out how to change the caret position.

Help!

Thanks.
Karl
Top achievements
Rank 1
 answered on 15 Mar 2011
0 answers
97 views
Hi All,

I have implemented the self ref hierarchy in my page as per the instruction and it is working fine. but yesterday i found that when there are more than 15 records (15 is page size for grid) on secondary level grid shows pagination footer and after clicking on next page button (secondary level pagination) it updates primary level and navigate to the next page of grid instead of secondary levels next page. :(

Please help me..

This is my code
    <telerik:RadGrid ID="RadGrid1" AllowPaging="true" runat="server" PageSize="15">
        <PagerStyle Mode="NextPrevAndNumeric" />
        <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" Width="100%"
            DataKeyNames="PRIMARYSERIALNUMBER,SERIALNUMBER">
            <SelfHierarchySettings ParentKeyName="PRIMARYSERIALNUMBER" KeyName="SERIALNUMBER" />
            <Columns>
                <telerik:GridTemplateColumn>
                    <ItemTemplate>
                        <asp:HyperLink ID="hLinkName" runat="server" ToolTip='<%# DataBinder.Eval(Container.DataItem, "NAME") %>'> </asp:HyperLink>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>  
chetan jagtap
Top achievements
Rank 1
 asked on 15 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?