Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
167 views

I've tried everything, can't seem to get the value of a EditItemTemplate that holds a radComboBox.  I have my grid setup like this:

<telerik:RadGrid ID="RadGrid1" GridLines="Both" AutoGenerateColumns="False"
                                    AllowPaging="True" AllowSorting="True" runat="server" OnItemDataBound="OnItemDataBoundHandler"
                                    OnInsertCommand="RadGrid1_InsertCommand" OnItemCreated="RadGrid1_ItemCreated"
                                    DataSourceID="DeliverableDataSource" AllowAutomaticUpdates="False" AllowAutomaticInserts="False" AllowAutomaticDeletes="false"
                                    ShowStatusBar="True" CellSpacing="0" OnUpdateCommand="RadGrid1_UpdateCommand" OnDeleteCommand="RadGrid1_DeleteCommand" Width="900px">
                                    <MasterTableView ShowFooter="false" EditMode="InPlace" CommandItemDisplay="Top">
                                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

                                        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

                                        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="DeliverableID" DataType="System.Int32" Visible="false" FilterControlAltText="Filter DeliverableID column" HeaderText="DeliverableID" ReadOnly="True" SortExpression="DeliverableID" UniqueName="DeliverableID">
                                            </telerik:GridBoundColumn>

                                            <telerik:GridTemplateColumn HeaderText="Deliverable Type" HeaderStyle-Font-Bold="true" ItemStyle-Width="240px">
                                                <ItemTemplate>
                                                    <%#DataBinder.Eval(Container.DataItem, "DeliverableType")%>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <telerik:RadComboBox runat="server" EnableLoadOnDemand="true" ID="cmbType" DataTextField="DeliverableTypeDesc"
                                                        DataValueField="DeliverableTypeDesc" DataSourceID="DeliverableTypeDataSource" SelectedValue='<%#Bind("DeliverableType") %>'>
                                                    </telerik:RadComboBox>
                                                </EditItemTemplate>
                                                <HeaderStyle Font-Bold="True" />
                                                <ItemStyle Width="140px" />
                                            </telerik:GridTemplateColumn>

                                            <telerik:GridTemplateColumn HeaderText="Deliverable User" ItemStyle-Width="240px" HeaderStyle-Font-Bold="true">
                                                <ItemTemplate>
                                                    <%#DataBinder.Eval(Container.DataItem, "DeliverableUser")%>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <telerik:RadComboBox runat="server" ID="cmbUser" DataTextField="UserName" SelectedValue='<%#Bind("DeliverableUser") %>'
                                                        DataValueField="UserName" DataSourceID="UserDataSource">
                                                    </telerik:RadComboBox>
                                                </EditItemTemplate>
                                                <HeaderStyle Font-Bold="True" />
                                                <ItemStyle Width="140px" />
                                            </telerik:GridTemplateColumn>

                                            <telerik:GridTemplateColumn DataField="Verdict" HeaderText="Verdict" HeaderStyle-Font-Bold="true" UniqueName="Verdict">
                                                <ItemTemplate>
                                                    <%#DataBinder.Eval(Container.DataItem, "Verdict")%>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <telerik:RadComboBox runat="server" ID="cmbVerdict" SelectedValue='<%#Bind("Verdict") %>'>
                                                        <Items>
                                                            <telerik:RadComboBoxItem Text=" " Value=" " />
                                                            <telerik:RadComboBoxItem Text="Accepted" Value="Accepted" />
                                                            <telerik:RadComboBoxItem Text="Rejected" Value="Rejected" />
                                                        </Items>
                                                    </telerik:RadComboBox>
                                                </EditItemTemplate>
                                                <HeaderStyle Font-Bold="True" />
                                                <ItemStyle Width="100px" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridEditCommandColumn FooterText="EditCommand footer" UniqueName="EditCommandColumn" ButtonType="ImageButton" EditImageUrl="~/Images/DeviationEdit.png"
                                                HeaderText="" HeaderStyle-Width="80px" UpdateText="Save" UpdateImageUrl="~/Images/DeviationSave.jpg" CancelImageUrl="~/Images/DeviationCancel.jpg" InsertImageUrl="~/Images/DeviationSave.jpg">
                                                <HeaderStyle Width="50px" />
                                            </telerik:GridEditCommandColumn>
                                            <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ImageUrl="~/Images/DeviationDelete.jpg" ButtonType="ImageButton" UniqueName="deleteColumn">
                                                <HeaderStyle Width="30px"></HeaderStyle>
                                            </telerik:GridButtonColumn>

                                        </Columns>

                                        <EditFormSettings>
                                            <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
                                        </EditFormSettings>
                                    </MasterTableView>

                                    <FilterMenu EnableImageSprites="False"></FilterMenu>
                                </telerik:RadGrid>




I want to hit a button that is not part of the radGrid, and from code behind, I want to get the selected Value from the cmbVerdict column for every row in the grid.  Something like this:

            foreach (GridDataItem item in RadGrid1.Items)
            {                               
                RadComboBox cmbV = (RadComboBox)item.FindControl("cmbVerdict");
                ....
            }
This always return null.  I've tried 7000 different combinations from the hundreds of posts.  Nothing seems to work.  Please help.

Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Apr 2013
6 answers
183 views
In compatibility view enable my grid css are not adjusting .Please check the following attachment.
JJ
Top achievements
Rank 1
 answered on 22 Apr 2013
8 answers
525 views
HI there.

Is there any way that I can disable the alert that appears when navigation to a date using the top navigation arrows that is before the mindate value that I have set?

Your help would be greatly appreciated!!

Danielle
Arno
Top achievements
Rank 2
 answered on 22 Apr 2013
1 answer
79 views
Hello,

I have a simple page with one RadUpload control. I have set up the skin to Office2007.
The problem appears when I use IE8 or IE9 - the skin/css is broken and the RadUpload has two textboxes and two button (also the dot of the list element is visible). My telerik version is Q3 2011.
IE10 is fine.

I read the existing threads for the same issue and I tried all different suggestions but without any success.
I added <telerik:RadStyleSheetManager runat="server" ID="RadStyleSheetManager1"> </telerik:RadStyleSheetManager>--%> but nothing has changed.

Please find attached an image showing the issue!

Could you help me to solve it, please?


Thanks in advance!



Plamen
Telerik team
 answered on 22 Apr 2013
1 answer
123 views
Hi

     How can I implement drag and drop in my treelist.

thanks in advance
Allen
Princy
Top achievements
Rank 2
 answered on 22 Apr 2013
1 answer
115 views
Hi everyone,
I hope you can help me with this issue I'm having with the AsyncUploader it is simply not showing up in the browser I tried using it in another project and it worked fine I have this  feeling that it has something to do with my CSS, does this make any sense?
oh and another thing I also trying to use RadCalender now it is visible alright but not functioning as it should, when I try to pick a date nothing happens instead the view changes to the top of the page and just to make it clear I'm using RadGrid and it works fine.
please bare with me i'm new to this.
Thanks in advance :)
Plamen
Telerik team
 answered on 22 Apr 2013
1 answer
99 views
Hello, I have a RadGrid to display a list of items.

Columns:
Client Name | Invoice | Item description

What I'm trying to accomplish is to filter the second RadComboBox data, when the first one is used (filter).
For instance, when customer John Smith is selected as a filter, I'd like to rebind the RadComboBox "Invoice" to show only the invoices of John Smith. As of today, it rebinds, but uses the full dataset, so it shows all invoices.

Data is in a Dataset in a session variable.
Client Name and Invoice each have a RadComboBox setup as a FilterTemplate.
RadGrid is using the "NeedDataSource" event to bind.
On RadGrid's ItemCreated event (when item created is a GridFilteringItem), I find and call RadComboBox's DataBind, using the dataset as DataSource.

Is there a way to do that (without having to run RadComboBoxes as standalone objects)?

Thank you.
Mosart

Andrey
Telerik team
 answered on 22 Apr 2013
2 answers
681 views
I'm currently working on a C# asp.net website that populates Telerik RadComboBoxes with a treeView from a database on_load.

I have a form that has 15+ ComboBoxes and when I select values from those ComboBoxes those ComboBox selections must be used as filter to search through a large table in my database. A gridView will display the returned data.

I have used the same format of code throughout the rest of my project and it works perfectly, But when I select an item from my "Location" DropDownBox and select a CHILD node to search through my database I get the error 'Input string was not in a correct format' and I'm guessing its because i am using null values

here is my Location.cs Class

region Properties
 
    [Key]
    public int LocationID { get; se; }
    [Column("Location")]
    public string LocationName { get; set; }
    private int? _ParentLocationID;
    [Column]
    public int? ParentLocationID
    {
        get
        {
            return _ParentLocationID;
        }
        set
        {
            if (value == 0)
            {
                _ParentLocationID = null;
            }
            else
            {
                _ParentLocationID = value;
            }
        }
    }
 
    [Column]
    public int SiteID { get; set; }
    [Column]
    public bool Active { get; set; }
 
region Method
 
    public static IEnumerable<Location> LoadActiveLocations(int siteID)
    {
        iThNkContext db = new iThNkContext();
 
        var LocationList = (from l in db.Locations
                                where(l.SiteID == siteID && l.Active == true)
                                orderby l.LocationID
                                select l).ToList();
 
        return LocationList;
    }

And here is the code I am using in my .aspx file

RadTreeView trvLocation = (RadTreeView)cboLocation.Controls[2].FindControl("trvLocation");
         if (trvLocation.SelectedValue != "")
         {
            var locationID = Convert.ToInt32(trvLocation.SelectedValue);  //Error
            predicates.Add(p => p.LocationID == locationID);
        }

On the //Error line is where I am getting the 'Input string was not in the correct format' error, any suggestions please. I cant understand why I am having this problem or how to get values from child nodes.

thank you in advance


Goat_
Top achievements
Rank 1
 answered on 22 Apr 2013
3 answers
328 views
How can we determine the hierarchy level and child item count in a treelist?
Shinu
Top achievements
Rank 2
 answered on 22 Apr 2013
1 answer
186 views

Hello Community,

 

i have a question about the custom attributes.

For example, I want to bind an Item with 3 attributes. A Text, Value and a Custom Attribute.

The Data come from a Datatable. I need to do this Server Side.

The custom attribute don't need to be visible.
It's just a second ID.


I tried this:

Define

        Dim dtBank As DataTable = Allgemeines.GETBank()

        If dtBank.Rows.Count > 0 Then

            rcbBankID.DataSource = dtBank

            rcbBankID.DataBind()

'Maybe this is totaly wrong

            For Each drBank As DataRow In dtBank.Rows

                rcbBankID1.Attributes.Add("BLZ", drBank("BLZ"))

            Next

        End If

 

Use                      

        Dim strTest As String = rcbBankID.SelectedItem.Attributes("BLZ").ToString


I hope you understand me.

Thank you for your Help
Daniel
Kate
Telerik team
 answered on 22 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?