Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
60 views
Hy,

Is it possible to adjust the width of combobox dropdown window dynamically...I want to display only 'Name' in comboBox input field on selecting a value...But i am displaying a table with three columns in itemtemplate,now my comboBox also has the width of table....Is there any possible way?
Thnx in advance
Princy
Top achievements
Rank 2
 answered on 01 Mar 2012
2 answers
255 views
Hello,

I am trying to access a cell value on post back when ever the user will click command button (select) in RadGrid. I have a command button with name select and this is what I am doing in code behind:

    protected void leadsGrid_ItemCommand(object sender, GridCommandEventArgs e)
    {
        GridDataItem myDataItem = (GridDataItem)leadsGrid.SelectedItems[0].DataItem;
        Response.Write(myDataItem["lead_name"].Text);
    }

but whenever I click on select button it gives me

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index


I supposed its occurring because SelectedItems[0] does not have anything but I don't know why it does not have anything as pressing the select command should select the row ?

Please tell me what I am doing wrong ? or a correct way to access cell values of selected row. I am not working on multiple rows so I only want to access cell values of one select row. I have experience with normal ASP.net GridView but I am fairly new with RadGrid so I apologize if this is a basic question.

Thanks.
Tahir Ahmed
Top achievements
Rank 1
 answered on 01 Mar 2012
31 answers
890 views
RadButton icon disappears after mouse over. Very strange behavior.
Just going over with the mouse cursor over the button will cause the icon to disappear.
I attached a before and after screenshots and here is a code snippet:
<telerik:RadButton ID="btnAdvancedLookup" runat="server" Text="Advanced Lookup" 
                     PostBackUrl="~/AdvancedLookup.aspx" AutoPostBack="true" >
                    <Icon PrimaryIconUrl="../Images/Buttons/Search.gif"/>
                    </telerik:RadButton>

Slav
Telerik team
 answered on 01 Mar 2012
2 answers
59 views
After updating to Q1 2012 where ExplorerMode="Thumbnails" by default I have switched back it to  grid view (ExplorerMode="Default"
). So FileExplorer is not recognize files in grid view. All files is shown as folders. See screenshot attached.
KAB
Top achievements
Rank 1
 answered on 01 Mar 2012
5 answers
110 views

Hi!

i have a radgrid with several pages and a grouping. When i close the grouping it is shown at the end of every single page.

There is one way to visualize the sequence of the grouping in the same page?

Thanks in Advance

Pavlina
Telerik team
 answered on 01 Mar 2012
1 answer
216 views
Hello. I have a problem with dropdowns filling.

I have one RadComboBox in Command item Template and second in PagerTemplate : 
<CommandItemTemplate>
                <table cellpadding="0" cellspacing="5" class="grd-message-header">
                    <tr>
                        <td>
                            Messages : 
                            <telerik:RadComboBox ID="ddlMessageFolder" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlMessageFolder_IndexChanged" EnableLoadOnDemand="false" ShowMoreResultsBox="false" EnableVirtualScrolling="false">
                                <Items>
                                    <telerik:RadComboBoxItem Text="Inbox" Value="Inbox" />
                                    <telerik:RadComboBoxItem Text="Sent" Value="Sent" />
                                </Items>
                            </telerik:RadComboBox>
                        </td>

 <PagerTemplate>

<telerik:RadComboBox ID="ddlMoveToFolder" Runat="server"
                                            EnableLoadOnDemand="False" EnableVirtualScrolling="false" 
                                            ShowMoreResultsBox="False"  >
                                            <Items>
                                                <telerik:RadComboBoxItem Text="Select Folder" Value="Select Folder" />
                                            </Items>
                                        </telerik:RadComboBox> 
</PagerTemplate>

On RadGridPrerender event I fill this radcomboboxes : 

GridCommandItem cmdItem = (GridCommandItem)grdMessage.MasterTableView.GetItems(GridItemType.CommandItem)[0];
            GridPagerItem pagerItem = (GridPagerItem)grdMessage.MasterTableView.GetItems(GridItemType.Pager)[0];
            RadComboBox customFolderDDL = (RadComboBox)pagerItem.FindControl("ddlMoveToFolder");
            RadComboBox combo = (RadComboBox)cmdItem.FindControl("ddlMessageFolder");


            List<MessageFolder> messageFolderList = ctrlComm.GetFolderList(HttpContextStorage.CurrentUser.UserID);
            List<RadComboBoxItem> rItemList = new List<RadComboBoxItem>();
            foreach (var item in messageFolderList)
            {
                rItemList.Add(new RadComboBoxItem(item.MessageFolderName, item.MessageFolderID.ToString()));
                
            }
            combo.Items.AddRange(rItemList);   
            //customFolderDDL.Items.AddRange(rItemList);    

If I fill only one Combobox (combo) then there are all okay.
But If I remove comment on second Combobox (customFolderDDL) filling , than no one RadCombobox will be filled.

Comboboxes are founded correctly , and if I see combobox items on debugging there are Items but they are not showing on page.
Shinu
Top achievements
Rank 2
 answered on 01 Mar 2012
1 answer
65 views
Hi,
  I am using 2 dropdwonlist to populate product and its provider names. I am using atomatic operations fro grid. In Database my both table have  one-to-one relation. I want to get value atomatically select when i select value from first dropdownlist it should show me related values in second dropdownlist. How to do it while using atomatic grid operations.

I have code like this

<telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="true"
    AllowSorting="true" EnableEmbeddedSkins="true" Skin="Sunset" AllowAutomaticInserts="true"
    PageSize="10" AllowPaging="true" PagerStyle-AlwaysVisible="true" PagerStyle-Mode="NextPrevAndNumeric"
    AllowAutomaticUpdates="true" AutoGenerateColumns="false" AllowFilteringByColumn="true"
    DataSourceID="SqlDataSource1" OnItemUpdated="RadGrid1_ItemUpdated" OnItemDeleted="RadGrid1_ItemDeleted"
    OnItemInserted="RadGrid1_ItemInserted" OnDataBound="RadGrid1_DataBound">
    <PagerStyle Mode="NextPrevAndNumeric" />
    <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="CUSTOMER_INSTRUMENT_ID"
        DataSourceID="SqlDataSource1" HorizontalAlign="NotSet" AutoGenerateColumns="False">
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                <ItemStyle CssClass="MyImageButton" />
            </telerik:GridEditCommandColumn>
            <telerik:GridDropDownColumn DataField="INSTRUMENT_ID" DataSourceID="SqlDataSource2"
                AllowFiltering="true" ShowFilterIcon="false" HeaderText="PRODUCT NAME" ListTextField="INSTRUMENT_NAME"
                ListValueField="INSTRUMENT_ID" UniqueName="INSTRUMENT_ID" ColumnEditorID="GridDropDownListColumnEditor1">
            </telerik:GridDropDownColumn>


            <telerik:GridDropDownColumn DataField="COMPANY_ID" DataSourceID="SqlDataSource3"
                HeaderText="PROVIDER COMPANY NAME" ListTextField="COMPANY_NAME" ListValueField="COMPANY_ID"
                AllowFiltering="true" ShowFilterIcon="false" UniqueName="COMPANY_ID"  ColumnEditorID="GridDropDownListColumnEditor1">
            </telerik:GridDropDownColumn>

            <telerik:GridBoundColumn DataField="OTHER_DESC" HeaderText="OTHER DESC NAME" SortExpression="OTHER_DESC"
                UniqueName="OTHER_DESC" ColumnEditorID="GridTextBoxColumnEditor1">
            </telerik:GridBoundColumn>
            <%--<telerik:GridBoundColumn DataField="INSTRUMENT_NO" HeaderText="INSTRUMENT NO" SortExpression="INSTRUMENT_NO"
                UniqueName="INSTRUMENT_NO" ColumnEditorID="GridTextBoxColumnEditor1">
            </telerik:GridBoundColumn>--%>
            <telerik:GridDateTimeColumn UniqueName="ISSUE_DATE" PickerType="DatePicker" HeaderText="DATE ISSUED"
                CurrentFilterFunction="Contains" DataField="ISSUE_DATE" FooterText="DateTimeColumn footer"
                DataFormatString="{0:MM/dd/yyyy}" EditDataFormatString="MMMM dd, yyyy hh:mm tt">
                <ItemStyle Width="120px" />
            </telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn UniqueName="MATURITY_DATE" PickerType="DatePicker" HeaderText="MATURITY DATE"
                DataField="MATURITY_DATE" FooterText="DateTimeColumn footer" DataFormatString="{0:MM/dd/yyyy}"
                EditDataFormatString="MMMM dd, yyyy hh:mm tt">
                <ItemStyle Width="120px" />
            </telerik:GridDateTimeColumn>
            <telerik:GridBoundColumn DataField="VALUE" HeaderText="VALUE" SortExpression="VALUE"
                CurrentFilterFunction="Contains" AllowFiltering="true" UniqueName="VALUE" ColumnEditorID="GridTextBoxColumnEditor1">
            </telerik:GridBoundColumn>
            <telerik:GridButtonColumn ConfirmText="Delete This Column?" ConfirmDialogType="RadWindow"
                ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                UniqueName="DeletColumn">
            </telerik:GridButtonColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <ClientEvents OnRowDblClick="RowDblClick" OnGridCreated="gridCreated" />
    </ClientSettings>
</telerik:RadGrid>.


Please help me to get through it.
How should i achive it.

Please suggest.



Shinu
Top achievements
Rank 2
 answered on 01 Mar 2012
1 answer
161 views
Hi,
 
I want to get the dropdownlist.selectedvalue that located outside from the radgrid and pass the value to the User Custom Edit From in Insert/Edit mode. how can it possible?

.aspx
<asp:DropDownList ID="DropDownList1" runat="server">
       <asp:ListItem Value="Item1">Item1</asp:ListItem>
       <asp:ListItem>Item2</asp:ListItem>
       <asp:ListItem>Item3</asp:ListItem>
   </asp:DropDownList>
 
   <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" DataSourceID="SDSDropDownList"
       GridLines="None" Skin="WebBlue">
       <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataKeyNames="UID"
           DataSourceID="SDSDropDownList" EditMode="PopUp">
            <Columns>
               <telerik:GridEditCommandColumn ButtonType="ImageButton">
               </telerik:GridEditCommandColumn>
               <telerik:GridBoundColumn DataField="UID" DataType="System.Int32" FilterControlAltText="Filter UID column"
                   HeaderText="UID" ReadOnly="True" SortExpression="UID" UniqueName="UID" Visible="False">
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn DataField="DataValue" FilterControlAltText="Filter DataValue column"
                   HeaderText="DataValue" SortExpression="DataValue" UniqueName="DataValue">
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn DataField="DataText" FilterControlAltText="Filter DataText column"
                   HeaderText="DataText" SortExpression="DataText" UniqueName="DataText">
               </telerik:GridBoundColumn>
               <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmText="Are You Sure You Want to Delete ?"
                   Text="Delete" UniqueName="Delete">
               </telerik:GridButtonColumn>
           </Columns>
           <EditFormSettings UserControlName="DropDownListGridDetail.ascx" EditFormType="WebUserControl">
               <PopUpSettings Width="500px"></PopUpSettings>
           </EditFormSettings>
       </MasterTableView>
   </telerik:RadGrid>

i want DropDownList1.selectedvalue to be parse to label1 at DropDownListGridDetail.ascx 

Shinu
Top achievements
Rank 2
 answered on 01 Mar 2012
3 answers
142 views
I've added this GridCalculatedColumn to my ASP.NET RadGrid:

<
telerik:GridCalculatedColumn Aggregate="Sum"
    DataFields="Imponibile1,Imponibile2,Imponibile3,Imponibile4"
    DataFormatString="{0:C}" Expression="{0}+{1}+{2}+{3}"
    FooterAggregateFormatString="{0:C}" HeaderText="Totale Imp."
    UniqueName="TotaleImponibile" DataType="System.Decimal">
    <FooterStyle HorizontalAlign="Right" Font-Bold="True" Font-Size="Small"
        Wrap="True" ForeColor="#3333FF"/>
    <HeaderStyle Width="80px" />
    <ItemStyle HorizontalAlign="Right" Wrap="False" />
</telerik:GridCalculatedColumn>

but now I got this exception when loading the page:

[ParseException: ')' or ',' expected]
   Telerik.Web.UI.ExpressionParser.ValidateToken(TokenId t, String errorMessage) +89
   Telerik.Web.UI.ExpressionParser.ParseNew() +531
   Telerik.Web.UI.ExpressionParser.ParseIdentifier() +268
   Telerik.Web.UI.ExpressionParser.ParsePrimaryStart() +65
   Telerik.Web.UI.ExpressionParser.ParsePrimary() +36
   Telerik.Web.UI.ExpressionParser.ParseUnary() +404
   Telerik.Web.UI.ExpressionParser.ParseMultiplicative() +54
   Telerik.Web.UI.ExpressionParser.ParseAdditive() +54
   Telerik.Web.UI.ExpressionParser.ParseComparison() +69
   Telerik.Web.UI.ExpressionParser.ParseLogicalAnd() +49
   Telerik.Web.UI.ExpressionParser.ParseLogicalOr() +49
   Telerik.Web.UI.ExpressionParser.ParseExpression() +60
   Telerik.Web.UI.ExpressionParser.Parse(Type resultType) +58
   Telerik.Web.UI.DynamicExpression.ParseLambda(ParameterExpression[] parameters, Type resultType, String expression, Object[] values) +81
   Telerik.Web.UI.DynamicExpression.ParseLambda(Type itType, Type resultType, String expression, Object[] values) +114
   Telerik.Web.UI.GridDynamicQueryable.Select(IQueryable source, String selector, Object[] values) +178
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData35() +2735
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData() +1064
   Telerik.Web.UI.GridResolveEnumerable.Initialize() +58
   Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +45
   Telerik.Web.UI.GridResolveEnumerable.get_DataTable() +31
   Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, IEnumerable enumerable, Boolean CaseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +227
   Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +164
   Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +581
   Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +238
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +73
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +66
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +128
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
   Telerik.Web.UI.GridTableView.PerformSelect() +38
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   Telerik.Web.UI.GridTableView.DataBind() +366
   Telerik.Web.UI.RadGrid.DataBind() +173
   Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +3903
   Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +183
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

Please help me if I'm getting something wrong. Thank you.
Sem
Top achievements
Rank 1
 answered on 01 Mar 2012
1 answer
64 views
This is a overlay question for the "mega menu" implementation of the RadMenu control.

When the code from the example is put into my web page, it works, but it also pushes everything on the page down to start underneath the control area of the RadMenu "mega menu". I assume this has something to do with the DIV tags that are within the example HTML code:

<div id="MegaDropDown">

...etc.

 I've been playing with the "z-index" style property, but it hasn't worked for me yet. If anyone has any idea of how to overlay the entire menu region to be on top of the pages other stuff, it would be appreciated.

Also, I'm looking for an example of a fully "black" skin implementation of the "mega menu"....one where the drop-down background is dark, and the menu headers aren't green (like in the given example)...

Thanks,

Bazz
Barry
Top achievements
Rank 1
 answered on 01 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?