Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
237 views
Dear Support,

I have a Treeviiew inside an usercontrol. On my page i have this user control and a Grid. I am trying to implement the Drag and drop from Tree to the Grid. But the
'RadTreeView_NodeDrop' 
event in the UserControl does not
fire in this case. If the tree is not in an user control but directrly on the Page it works fine. Is it that the since its in user control the Node Drop does not fire or internally the Drop gets cancelled as soon as the Drop goes outside the user control containing the Treeview. Is there a work around for this? Thanks.
Nikolay Tsenkov
Telerik team
 answered on 20 Sep 2010
1 answer
98 views
HI all,
I'm using RadGid control (Q3 2009), I see RadGrid have support Keyboard mode for Insert, Update, Delete... comand. But in my project I don't want to use it,
I want to create new hotkey to access custom itemcommand  on Radgird, example:

......
<
telerik:GridTemplateColumn HeaderText="View">
     <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
     <ItemStyle Font-Bold="True" HorizontalAlign="Center"></ItemStyle>
     <ItemTemplate>
          <asp:ImageButton ID="imgView" runat="server" ImageUrl="~/Images/Edit.gif" CommandName="View" />
      </ItemTemplate>
</telerik:GridTemplateColumn>
.....

Follow  above code block example, How to create a hotkey that when I press it, RadGrid will call corresponding method with CommandName.
Please give me any idea for my problem...
Thnks so much for any help.

hongnguyenx
Nikolay Rusev
Telerik team
 answered on 20 Sep 2010
1 answer
317 views
Hi
I am trying to adjust the cell padding within a gridview. I increased the cellpadding in the MasterTableView, but noticed that it also affects the space between the MasterTable and the DetailTable. How can I just have the cellpadding applied between the main rows within the master table and not have it affect the padding between the parent row and the detail table in the gridview?

Thanks
Dimo
Telerik team
 answered on 20 Sep 2010
1 answer
97 views
hi
i  have template field (twextbox) into radgrtid
i type value in textbox ,but when i get value ,show ""

    <telerik:GridTemplateColumn HeaderText="شماره سند" FilterControlWidth="10px" UniqueName="AccountingDoc1">
                        <ItemTemplate>
                        <asp:TextBox ID="txtAccountingDoc"  runat="server" >
                        </asp:TextBox>
                        
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>


*****************************************************************************************************************************

  protected void grdDetailAccount_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {

            e.Canceled = true;
            foreach (GridDataItem item in grdDetailAccount.Items)
            {

                string detailAccountID = grdDetailAccount.MasterTableView.DataKeyValues[e.Item.ItemIndex]["detailAccountID"].ToString();
          

                if (((TextBox)item["AccountingDoc1"].FindControl("txtAccountingDoc")).Text != "")
                {
                    strAccountingDocNo = ((TextBox)item["AccountingDoc1"].FindControl("txtAccountingDoc")).Text;
                    CDSStockLogic.BusinessObjects.UI.AccountingDocs.updateDetailAccountID(strAccountingDocNo, detailAccountID);
                }
            }
        }

strAccountingDocNo  is null but i type value
plz help

Shinu
Top achievements
Rank 2
 answered on 20 Sep 2010
7 answers
393 views
I am using RadGrid Q1 2009 in my application. I have set the pagesize of the grid to 50. While running the application, when I change the pagesize to 10 or 20, the OnPageSizeChanged event doesn't fire. As a result of this, the grid is not binding to the datasource and the grid doesn't show up.

However, if I set the pagesize to 10, then on changing the page size, then OnPageSizeChanged event gets fired appropriately.

Can anyone tell me what am I doing wrong or how to get around this problem.

Pavel
Telerik team
 answered on 20 Sep 2010
5 answers
102 views

Hi All,

RAD Grid scrolling(Horizontal and Vertical) performance in IE6 and IE7 is too slow. We need to show more than thousand records with static header but it's working fine in Fire fox and Safari.



Dimo
Telerik team
 answered on 20 Sep 2010
1 answer
201 views
hi,

how to get the height  of tree view after it has been expanded?

and how I can expand inner node from other html button click event?
Shinu
Top achievements
Rank 2
 answered on 20 Sep 2010
1 answer
641 views
Hi,
i am using terelik radgrid and i want to disable delete button on some condition. but i could not able to find out the button ...

here is the grid code...

<telerik:RadPageView ID="rpvActions" runat="server">
<div>
    
                <table style="width: 780px; height: 256px;">
                    <tr>
                        <td colspan="2" valign="top" style="height: 100px">
                        <asp:Panel ID="pnlActions" runat="server" GroupingText="Workplan"
                                CssClass="groupBoxActionGrid" Style="position: relative; z-index: 100; top: 0px; left: 0px; " 
                                Font-Size="12px" Width="780px">
                            <div style="left: 0px; width: 100%; position: relative; top: 0px;">
                            &nbsp;&nbsp;&nbsp;&nbsp;
                                <telerik:RadGrid runat="server"
                                    ID="grdActions"
                                    AllowPaging="false"
                                    Width="750px"
                                    AutoGenerateColumns="false"
                                    Skin="Office2007"
                                    DataSourceID="TaskActionsDataSource"
                                    AllowAutomaticInserts="true"
                                    AllowAutomaticUpdates="true"
                                    AllowAutomaticDeletes="true"
                                    CommandItemDisplay="Top"
                                    OnItemDataBound="grdActions_ItemDataBound"
                                >
                                <ClientSettings EnableAlternatingItems="true"
                                                EnableRowHoverStyle="true"
                                                AllowExpandCollapse="false"
                                                ClientEvents-OnPopUpShowing="PopUpShowing"
                                            >
                                            
                                    <DataBinding EnableCaching="true" />
                                    <Selecting AllowRowSelect="True" />
                                </ClientSettings>
                                
                                <MasterTableView DataKeyNames="Id" TableLayout="Fixed"
                                     AllowMultiColumnSorting="false"
                                     AllowFilteringByColumn="false"
                                     AlternatingItemStyle-BackColor="#F2F3F5"
                                     AllowAutomaticInserts="true"
                                     AllowAutomaticUpdates="true"
                                     CommandItemDisplay="Top"
                                     NoMasterRecordsText="There are currently no actions for the task. Note that at least one action needs to be present"
                                     EditMode="PopUp"
                                 >
                                    <Columns>                                   
                                         <telerik:GridBoundColumn
                                            DataField="SortCode"
                                            Visible="true"
                                            HeaderText="#"
                                            HeaderStyle-Width = "30"
                                            ItemStyle-Font-Bold="true"
                                            ItemStyle-Font-Names="Tahoma"
                                        >
                                        </telerik:GridBoundColumn>
                                        
                                        <telerik:GridTemplateColumn UniqueName="TemplateColumn" InitializeTemplatesFirst="false">
                                            <HeaderTemplate>
                                                <table id="Table1" cellspacing="0" cellpadding="0" border="0">
                                                    <tr>
                                                        <td colspan="0">
                                                            <b>Action Details</b>
                                                         </td>
                                                    </tr>
                                                </table>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <table cellpadding="0" cellspacing="0" width="100%">
                                                
                                                <tr>
                                                    <td style="border-width: 0px;"><input type="hidden" id="hiddenActionId" value="<%# Eval("Id") %>" /></td>
                                                </tr>
                                                
                                                    <tr>
                                                        <td colspan="6" style="width: 200px; font-size: 12px; font-family: Tahoma;">
                                                            <b>Name:&nbsp;</b><%# Eval("Description") %> (<%# Eval("TypeName") %>) <%#  Convert.ToBoolean(Eval("Location").Equals("")) ? "" : ":: " + Eval("Location")%>
                                                        </td>
                                                        <td align="right">
                                                             <img src="../images/status_<%# Eval("StatusName")%>.png" alt="<%# Eval("StatusName")%>" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="4" style="width: 250px; font-size: 12px; font-family: Tahoma;">
                                                            <b>Output:&nbsp;</b> <%# Eval("Output") %>
                                                        </td>
                                                        <td rowspan="3" style="width: 50px; font-size: 12px; font-family: Tahoma;" align="center">
                                                            <img src="../images/status_<%# Convert.ToBoolean(Eval("NoBudgetFlag")) ? "nobudget" : "budget" %>.png" 
                                                            alt='<%# Convert.ToBoolean(Eval("NoBudgetFlag")) ? "No budget required for this action" : "Budget estimation required for this action" %>' />
                                                        </td>
                                                        
                                                        <td colspan="2" rowspan="3" style="width: auto; font-size: 12px; font-family: Tahoma;" align="center">
                                                           $ <%# Eval("TotalEstimationInDollar") %> &nbsp;&nbsp;&nbsp;&nbsp; € <%# Eval("TotalEstimationInEuro") %>

                                                    </tr>
                                                    <tr>
                                                        <td colspan="4" style="font-size: 12px; font-family: Tahoma;">
                                                            <b>Date:&nbsp;</b> <%# Eval("StartDate") %> <%# Convert.ToBoolean(Eval("CompletionDate").Equals("")) ? "" : " to " + Eval("CompletionDate") %>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="4" style="font-size: 12px; font-family: Tahoma;">
                                                            <b>Comment:&nbsp;</b> <%# Eval("Comment") %>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                            
                                        </telerik:GridTemplateColumn>
                                        
                        <telerik:GridButtonColumn  
                            ConfirmTitle="Edit" ButtonType="ImageButton" ImageUrl="~/Images/Edit.gif" CommandName="Edit" Text="Edit"
                            UniqueName="EditCommandColumn" HeaderStyle-Width="30px">
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridButtonColumn>
                        
                        <telerik:GridButtonColumn ConfirmText="Are you sure you want to delete the action (NOTE: Task save is required to persist the operation)?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete Record" ButtonType="ImageButton" ImageUrl="~/Images/Delete.gif" CommandName="Delete" Text="Delete"
                            UniqueName="DeleteCommandColumn" HeaderStyle-Width="30px">
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridButtonColumn>
                        
                                    </Columns>

                <EditFormSettings EditFormType="Template" PopUpSettings-Width="620px"
                        PopUpSettings-Height="390px" CaptionFormatString="Action Details">
                    <FormTemplate>
                        <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                            style="border-collapse: collapse; background: white; height: 320px; width: 600px;">
                            
                            <asp:Label runat="server" ID="actionId" value='<%# Eval("Id") %>' />
                                <br />
                            <tr>
                                <td>
                                    <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0">
                                        <tr>
                                            <td class="smallFont" style="top: 82px; position: absolute;">Name &nbsp;&nbsp;</td>
                                            <td class="smallFont" style="top: 79px; position: absolute; left: 65px;">
                                                <asp:TextBox ID="txtDescription" runat="server" Text='<%# Bind("Description") %>' Width="500px">
                                                </asp:TextBox>
                                                 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ControlToValidate="txtDescription"
 ErrorMessage="* Enter Name" Style="z-index: 106; left: 670px;
                                    position: absolute; top: 51px" Display="None" ValidationGroup="actionsave"/>
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td class="smallFont" style="top: 112px; position: absolute;">Type &nbsp;</td>
                                            <td style="top: 109px; left: 65px; position: absolute;">
                                                <asp:RadioButtonList ID="rblActionType" runat="server" Height="26px" ReadOnly="true" Width="220px" AppendDataBoundItems="true" RepeatDirection="Horizontal"
                                                    AutoPostBack="false" SelectedValue='<%# Bind("ActionTypeId") %>' DataSourceID="ActionTypeInfoList"
                                                    DataValueField="Id" DataTextField="Name" OnTextChanged="rblActionType_TextChanged"
                                                    >
                                                    
                                                    <asp:ListItem Value="" Text="" style="display: none;" />
                                                
                                                </asp:RadioButtonList>
                                                
                                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="rblActionType"
 ErrorMessage="* Select Action Type" Style="z-index: 106; left: 670px;
                                    position: absolute; top: 51px" Display="None" ValidationGroup="actionsave"/>
                                            </td>

                                        </tr>
                                        <tr>
                                            <td class="smallFont" style="top: 138px; position: absolute;">
                                                Location &nbsp;</td>
                                            <td>
                                                <asp:TextBox ID="txtLocation" runat="server" Text='<%# Bind("Location") %>' Width="500px" style="top: 136px; left: 65px; position: absolute;">
                                                </asp:TextBox></td>
                                        </tr>

                                        <tr>
                                            <td class="smallFont" style="top: 165px; position: absolute;">Start &nbsp;</td>
                                            <td class="smallFont">
                                            
                                                <telerik:RadDatePicker ID="startDate" runat="server" Skin="Web20" DbSelectedDate='<%# Bind("StartDate") %>' style="top: 164px; left: 65px; position: absolute;">
                                                </telerik:RadDatePicker>
                                            
                                            
                                                <asp:Label ID="Label1" runat="server" style="top: 165px; position: absolute; left: 250px;" Text="End Date" />
                                            
                                                <telerik:RadDatePicker ID="endDate" runat="server" Skin="Web20" DbSelectedDate='<%# Bind("CompletionDate") %>' style="top: 164px; position: absolute; left: 315px;">
                                                </telerik:RadDatePicker>
                                            </td>
                                            
                                        </tr>

                                        <tr>
                                            <td class="smallFont" style="top: 195px; position: absolute;">Status &nbsp;</td>
                                            <td>
                                                <asp:DropDownList runat="server" DataSourceID="ActionStatusInfoList" AppendDataBoundItems="true"
                                                    ID="cboActionStatus" Width="220px" DataValueField="Id"
                                                    DataTextField="Name" SelectedValue='<%# Bind("ActionStatusId") %>' style="height: 21px; top: 192px; left: 65px; position: absolute;"
                                                     OnTextChanged="cboActionStatus_TextChanged"
                                                    >
                                                    
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                
                                                </asp:DropDownList>
                                                
                                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" ControlToValidate="cboActionStatus"
 ErrorMessage="* Select Status" Style="z-index: 106; left: 670px;
                                    position: absolute; top: 51px" Display="None" ValidationGroup="actionsave"/>
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td class="smallFont" style="top: 221px; position: absolute;">
                                                Output &nbsp;</td>
                                            <td>
                                                <asp:TextBox ID="txtOutput" runat="server" Text='<%# Bind("Output") %>' Width="500px" style="top: 223px; left: 65px; position: absolute;">
                                                </asp:TextBox></td>
                                        </tr>
                                        <tr>
                                            <td class="smallFont" style="top: 253px; position: absolute;">Requires Budget?</td>
                                            <td style="top: 0px; left: 105px; position: absolute;">
                                                <asp:RadioButtonList ID="RadioButtonList2" runat="server" Height="26px"
                                                    ReadOnly="true" Width="220px" RepeatDirection="Horizontal" style="top: 251px; position: absolute;"
                                                    AutoPostBack="false" SelectedValue='<%# Bind("NoBudgetFlag") %>'
                                                    >
                                                        <asp:ListItem Value="" Text="" style="display: none;" />
                                                        <asp:ListItem Value="False" Text="Yes" />
                                                        <asp:ListItem Value="True" Text="No" />
                                                </asp:RadioButtonList>
                                                
                                                 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="RadioButtonList2"
 ErrorMessage="* Select Requires Budget" Style="z-index: 106; left: 670px;
                                    position: absolute; top: 51px" Display="None" ValidationGroup="actionsave"/>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td class="smallFont" style="top: 284px; position: absolute;">Show on schedule? &nbsp;</td>
                                            <td style="top: 0px; left: 105px; position: absolute;">
                                                <asp:RadioButtonList ID="RadioButtonList1" runat="server" Height="26px"
                                                    ReadOnly="true" Width="220px" RepeatDirection="Horizontal" style="top: 281px; position: absolute;"
                                                    AutoPostBack="false" SelectedValue='<%# Bind("ShowOnScheduleFlag") %>'
                                                    >
                                                        <asp:ListItem Value="" Text="" style="display: none;" />
                                                        <asp:ListItem Value="True" Text="Yes" />
                                                        <asp:ListItem Value="False" Text="No" />
                                                
                                                </asp:RadioButtonList>
                                                
                                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ControlToValidate="RadioButtonList1"
 ErrorMessage="* Select Show on schedule" Style="z-index: 106; left: 670px;
                                    position: absolute; top: 51px" Display="None" ValidationGroup="actionsave"/>
                                        </tr>
                                        <tr>
                                            <td class="smallFont" style="top: 310px; position: absolute;">
                                                Comment &nbsp;</td>
                                            <td>
                                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Comment") %>' Width="500px" style="top: 307px; left: 65px; position: absolute;">
                                                </asp:TextBox></td>
                                        </tr>
                            <tr>
                                <td align="right" colspan="2" rowspan="4" style="top: 340px; position: absolute; left: 300px;">
                                    <asp:Button ID="btnUpdate" ValidationGroup="actionsave" Text='<%# (Container is GridEditFormInsertItem) ? "Insert (Task Save Required)" : "Update (Task Save Required)" %>'
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                    </asp:Button>&nbsp;
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                        CommandName="Cancel"></asp:Button></td>
                                         
                            </tr>
                            </table>
                        </table>
                    </FormTemplate>
                </EditFormSettings>

                                </MasterTableView>
                                </telerik:RadGrid>
                                &nbsp;&nbsp; &nbsp;&nbsp;
                            </div>
                           </asp:Panel>
                         </td>
                         <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> 
            <td style="width: 980px; height: 200px;" >
            
            <asp:ValidationSummary ID="vsSave" Width="204px" ValidationGroup="actionsave" Height="300px" runat="server" DisplayMode="List" Font-Bold="False" HeaderText="<b>Please correct the errors:</b><br>" />
            
</td>   
                    </tr>
                 </table>
           </div>
         </telerik:RadPageView>  


please help me as i could not able to find the button in code...

thanks.




Princy
Top achievements
Rank 2
 answered on 20 Sep 2010
1 answer
101 views

Hello,

I want to know how to use the datetimepicker with a single botton.
it's means that after I choose the date the timeView will apear.

Thanks.
Shinu
Top achievements
Rank 2
 answered on 20 Sep 2010
2 answers
103 views

When the treeview tries to do a postback after a node edit with this dynamic code:

__doPostBack(

 

'ctl00$ContentPlaceHolder1$SectionsTreeView','{"commandName":"NodeEdit","index":"0","nodeEditText":"BRASS%20Monkey"}')

we get a 'Microsoft JScript runtime error: Object expected'

The html for the start of the treeview is

 

<div id="ctl00_ContentPlaceHolder1_SectionsTreeView" class="RadTreeView RadTreeView_WebBlue">

 

 

 

 

 so the object name seems OK.

What's going wrong and more impartantly how do I fix it?

Dale
Top achievements
Rank 1
 answered on 19 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?