Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
82 views
Hello,

I have a problem with RadComboBox, when i switched to IE8.0, i found the rad combo box behavior so strange, it became so long and when you open it , it opens to the wrong direction, i have applied the compatibility option from IE tools , and now it became normal, but my problem is that i can't do that for all clients who will use my site, so a solution has to be found before.
Any suggestions will be appreciated,,

Kind Regards,
Shatha J
Top achievements
Rank 1
 answered on 01 Sep 2009
2 answers
154 views
Hi there,

I've read in this forum that it's possible to obtain a value that the user changed on the Edit Form as follows:

            if ((e.Item is GridEditFormInsertItem) && (e.Item.OwnerTableView.IsItemInserted)) 
            { 
                GridEditFormInsertItem editformItem = (GridEditFormInsertItem)e.Item; 
                TextBox textBox = (TextBox)editformItem[columnName].Controls[0]; 
                return textBox.Text; 
            } 

But how would you do the same thing in the ItemUpdated handler?

There have been a few posts regarding obtaining a value from the grid in the ItemUpdated handler:

http://www.telerik.com/community/forums/aspnet-ajax/grid/get-item-name-from-grid.aspx

However, if the user modified the value, this method still returns the previous value.

Is there any way to obtain the value that the user entered in the TextBox from the GridUpdatedEventArgs instance?

Thanks,
Mark

Mark DeMichele
Top achievements
Rank 1
 answered on 01 Sep 2009
1 answer
348 views
Hi,

i have a RadToolbar and a RadGrid.

In the RadGrid i selected Items to delete them. Before i deleting i want to confirm this event by a radConfirm.

But no matter what i do always the postback is running.

Here my code:
<script type="text/javascript">  
 
    var RadGrid1;  
    var RadConfirmState = false;  
 
      
    function GetGridObject(sender, eventArgs) {  
        RadGrid1 = sender;  
    }  
 
      
    function OnClientButtonClicking(sender, args) {  
        var comandName = args.get_item().get_commandName();  
        if (comandName == "Save") {  
            var DataItems = $find("<%=Grid1.ClientID %>").get_masterTableView().get_dataItems();  
            var masterTable = $find('<%= Grid1.ClientID %>').get_masterTableView();  
            for (i = 0; i < DataItems.length; i++) {  
                var cell = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[i], "ckbDelete");  
                var checkbox = cell.getElementsByTagName("INPUT")[0];  
                if (checkbox != null) {  
                    if (checkbox.checked == true) {  
                        OpenConfirm();  
                    }  
                }    
            }  
        }  
        //alert('RadConfirmState: ' + RadConfirmState);  
          
       // CAN NOT CANCEL EVENT  
        args.set_cancel(!RadConfirmState);  
        //return false;  
    }  
 
    function OpenConfirm() {  
        radconfirm('<h3 style=\'color: #333399;\'>Are you sure?</h3>', confirmCallBackFn, 330, 100, null, 'RadConfirm custom title');  
    }  
    function confirmCallBackFn(arg) {  
        radalert("<strong>radconfirm</strong> returned the following result: <h3 style='color: #ff0000;'>" + arg + "</h3>", null, null, "Result");  
        RadConfirmState = arg;  
    }  
 
</script> 
 
<table class="style1" cellpadding="0" cellspacing="0">     
    <tr>    
        <td style="width: 100%">     
            <telerik:RadToolBar ID="rtbOne"      
                                style="display: block; float: none"       
                                runat="server"      
                                OnClientButtonClicking="OnClientButtonClicking"    
                                OnButtonClick="rtbOne_ButtonClick"      
                                Width="100%">     
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>    
                <Items>    
                        
                    <telerik:RadToolBarButton runat="server"      
                        ImageUrl="~/Image_01.png"      
                        CommandName="Save" Text="Save"      
                        ToolTip="Save...">     
                    </telerik:RadToolBarButton>                                                
                </Items>    
            </telerik:RadToolBar>    
        </td>    
     </tr>    
</table>    
    <telerik:RadGrid ID="Grid1" runat="server" BorderStyle="Solid"      
        AllowMultiRowEdit="True" Width="100%"      
        AutoGenerateColumns="False" onitemdatabound="Grid1_ItemDataBound"      
        OnItemCreated="Grid1_ItemCreated"    
        OnNeedDataSource="Grid1_OnNeedDataSource"      
        oncancelcommand="Grid1_CancelCommand" GridLines="None">     
        <HeaderContextMenu>    
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>    
        </HeaderContextMenu>    
        <PagerStyle Mode="NumericPages"></PagerStyle>    
        <ClientSettings allowrowsdragdrop="false" AllowColumnsReorder="false"       
                ReorderColumnsOnClient="false">     
                <Selecting AllowRowSelect="True" />    
                <Scrolling AllowScroll="false" UseStaticHeaders="false" />    
                <ClientEvents OnGridCreated="GetGridObject"></ClientEvents>    
        </ClientSettings>    
        <MasterTableView EditMode="InPlace" GridLines="Both" BorderStyle="Solid" GroupsDefaultExpanded="true" runat="server">     
             
            <GroupByExpressions>    
                <telerik:GridGroupByExpression>    
                    <SelectFields>    
                        <telerik:GridGroupByField      
                                FieldName="Text_one"      
                                HeaderText=" "    
                                HeaderValueSeparator=" ">     
                        </telerik:GridGroupByField>    
                    </SelectFields>       
                    <GroupByFields>    
                        <telerik:GridGroupByField      
                                FieldName="Text_one"      
                                SortOrder="Ascending">     
                        </telerik:GridGroupByField>    
                    </GroupByFields>                                       
                </telerik:GridGroupByExpression>    
            </GroupByExpressions>    
             
            <Columns>    
                <telerik:GridEditCommandColumn  UniqueName="editCommand"      
                    HeaderImageUrl="~/Images/Edit.gif"      
                    ButtonType="ImageButton"      
                    CancelImageUrl="~/Images/Cancel.gif"      
                    UpdateImageUrl="~/Images/Save.gif"      
                    EditImageUrl="~/Images/Edit.gif">     
                <ItemStyle Width="20px"></ItemStyle>    
                </telerik:GridEditCommandColumn>    
                 
                <telerik:GridCheckBoxColumn UniqueName="ckbDelete"      
                    HeaderImageUrl="~/Images/Close.gif">     
    
                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>    
                    <ItemStyle Width="20px" />    
                </telerik:GridCheckBoxColumn>    
    
                <telerik:GridBoundColumn DataField="Id" UniqueName="Id"      
                    Visible="false">     
                </telerik:GridBoundColumn>    
        
                                                        
                <telerik:GridTemplateColumn HeaderText="Text Group" GroupByExpression="" Groupable="true"    
                    DataField="CT" UniqueName="CT" Visible="false">     
                    <ItemStyle Width="200px"/>     
                    <ItemTemplate>    
                        <asp:Label runat="server" Text='<%# Eval("text") %>'      
                            CssClass=""></asp:Label>    
                    </ItemTemplate>    
                </telerik:GridTemplateColumn>    
    
                <telerik:GridTemplateColumn HeaderText="Description" DataField="Temptext"      
                    UniqueName="Temptext">     
                    <ItemTemplate>    
                        <asp:Label runat="server" Text='<%# Eval("Temptext") %>' CssClass=""></asp:Label>    
                    </ItemTemplate>    
                </telerik:GridTemplateColumn>    
                  
            </Columns>                        
        </MasterTableView>    
        <FilterMenu>    
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>    
        </FilterMenu>    
    
    </telerik:RadGrid>    
 

Thanks
Princy
Top achievements
Rank 2
 answered on 01 Sep 2009
1 answer
97 views
Hi, I have a combobox inside an updatepanel (Q2 2009).

After selectedIndexChanged, I can't click on dropdown arrow. This bug is happening in Firefox and Chrome.
in IE it's fine.

This updatepanel is inside LoggedInTemplate:

<

 

asp:UpdatePanel runat="server" ID="formupdatepanel">

 

 

 

<ContentTemplate>

 

 

 

<telerik:RadComboBox ID="formlist" runat="server" AutoPostBack="true"

 

 

 

OnSelectedIndexChanged="formlist_selectedindexchanged" OffsetX="-40" OffsetY="-155" AllowCustomText="true" EmptyMessage="Select a form">

 

 

 

<Items>

 

 

 

<telerik:RadComboBoxItem Text="Absence Form" Value="Absence Form" />

 

 

 

<telerik:RadComboBoxItem Text="Satisfaction Form" Value="Satisfaction Form" />

 

 

 

</Items>

 

 

 

</telerik:RadComboBox> <br />

 

 

 

<div runat="server" ID="formdiv"></div>

 

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

On My code behind, in selectedIndexChanged event,

I put formdiv.InnerHtml = CallForm()
Where CallForm is just an object tag to play Flash.

Also, I have to manually put the items on on the aspx page. When I put them in RadBuilder, it doesn't work.

Any help is appreciated

 

 

 

 

Andreas
Top achievements
Rank 1
 answered on 01 Sep 2009
2 answers
144 views
  Hi,
    I have this code snip of what my signiture looks like .....
 protected void RadMenu1_OnItemClick(object sender, RadMenuEventArgs e)  
        {  
        RadMenuItem ItemClicked = e.Item;  
        string mText = ItemClicked.Text.ToString(); 

    I am trying to figure out how to keep the loading panel from running when i just click on the menu. I thought that I could just cancel the flow in the click_event itself , like e.Cancel ?
   Here is my code for the loading panel ..... 
 <telerik:RadAjaxManagerProxy ID="RadAjaxManageriq1" runat="server" > 
        <AjaxSettings>          
            <telerik:AjaxSetting AjaxControlID="equipmentGrid">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="equipmentGrid" 
                      LoadingPanelID="RadAjaxLoadingPanel1" />    
                   <telerik:AjaxUpdatedControl ControlID="RadToolTipGeneralHelp" />                       
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
     </telerik:RadAjaxManagerProxy>   
      
      
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="5">  
        <table style="width: 100%; height: 100%;">  
            <tr style="height: 100%">  
                <td align="center" valign="middle" style="width: 100%">  
                    <asp:Image ID="Image2" ImageUrl="~/mybodyscience/iqimages/Loading_Images/loading3.gif" 
                        BorderWidth="0px" Height="45px" Width="145px" AlternateText="Processing Data ...." 
                        runat="server"></asp:Image> 
                </td> 
            </tr> 
        </table> 
    </telerik:RadAjaxLoadingPanel> 
     
 thanks for any advice ...  



IQworks
Top achievements
Rank 1
 answered on 01 Sep 2009
2 answers
615 views
Hellow there,

I have a rad combobox with 4 items. I would like to hide the redhighlighted items (Customer Id's ANATR & ANTON) from Combo box in Radgrid Edit Mode if users do not have permission to view/select them. Below is my code. Thanks a lot for your help.

gc_0620
_____________

<asp:AccessDataSource ID="AccessDataSource1" runat="server"

DataFile="~/App_Data/Nwind.mdb"

DeleteCommand="DELETE FROM [Customers] WHERE (([CustomerID] = ?) OR ([CustomerID] IS NULL AND ? IS NULL))"

InsertCommand="INSERT INTO [Customers] ([CustomerID], [CompanyName]) VALUES (?, ?)"

SelectCommand="SELECT [CustomerID], [CompanyName] FROM [Customers] where left([CustomerId],1) = 'A'"

UpdateCommand="UPDATE [Customers] SET [CompanyName] = ? WHERE (([CustomerID] = ?) OR ([CustomerID] IS NULL AND ? IS NULL))">

<DeleteParameters>

<asp:Parameter Name="CustomerID" Type="String" />

</DeleteParameters>

<UpdateParameters>

<asp:Parameter Name="CompanyName" Type="String" />

<asp:Parameter Name="CustomerID" Type="String" />

</UpdateParameters>

<InsertParameters>

<asp:Parameter Name="CustomerID" Type="String" />

<asp:Parameter Name="CompanyName" Type="String" />

</InsertParameters>

</asp:AccessDataSource>
<telerik:RadGrid ID="RadGrid1" runat="server">

 

 

<telerik:RadComboBox ID="RadComboBox2" Runat="server" DataTextField="CompanyName" DataValueField="CustomerID"

 

 

 DataSourceID="AccessDataSource1">

</telerik:RadComboBox>

 

 

</telerik:RadGrid>

 

 

 

____________________________________________

 

CustomerID:                 CompanyName

 

 

ALFKI                             Alfreds Futterkiste

ANATR                           Ana Trujillo Emparedados y helados

ANTON                          Antonio Moreno Taquería

AROUT                          Around the Horn

gc_0620
Top achievements
Rank 1
 answered on 01 Sep 2009
2 answers
159 views
I have a stacked bar chart that is bound to a SQLDataSource. The dataset has 3 columns: Project, StartDate, Hours. StartDate is on the x-axis, hours is on the y-axis, and the data is grouped by project. When I added a click event for the chart to the code behind, each stacked bar piece became clickable. In the click event code, I want to be able to access the project name, date, and hours for the item that was clicked. So far I was able to figure out how to get project name using args.Series.Name and hours using args.seriesItem.yvalue. However, I can't figure out a way to get the date of the clicked item.

I'm new to the telerik controls, so it's possible I'm not binding the chart properly. When I bind the chart to the datasource, I set

 

RadChart1.DataGroupColumn = "Project"

RadChart1.PlotArea.XAxis.DataLabelsColumn = "StartDate"

Kim
Top achievements
Rank 1
 answered on 31 Aug 2009
4 answers
190 views
I've got a hierarchical grid with one DetailTable.  The RadGrid is auto-generating an ExpandCollapseColumn on the left, and I'd really like to either move it so it's the rightmost column, or prevent it from being generated so I can just declare my own.  Is there any way to do either of these?
nitesh monga
Top achievements
Rank 1
 answered on 31 Aug 2009
1 answer
88 views
Hi,

What to do for disabling the horizontal scroll bar in a radgrid?
I have used both the properties 

Scrolling

 

AllowScroll="True" UseStaticHeaders="True"

 


But still when my text is too long inside a cell, horizontal bar is visible.
What all can be the issues and how can i rectify them?

Thanks!
Pavlina
Telerik team
 answered on 31 Aug 2009
2 answers
107 views
I have a textbox that I made into a text area and when the user types in it just keeps going in one line instead of wrapping in the text box. Here is my code
<telerik:RadTextBox ID="descInput" runat="server" Skin="Web20"
                                    Height="150px" Width="150px" Wrap="true">
                                </telerik:RadTextBox>
Thanks


Web Services
Top achievements
Rank 2
 answered on 31 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?