This is a migrated thread and some comments may be shown as answers.

ASP:CheckBox filtering into next RadGrid

3 Answers 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 04 Feb 2009, 08:47 PM
Hi there,

I have just begun using telerik controls and have been very successful up to this point...with the help of your excellent support pages.

RadGrid1(RG#) posts user data (upon row selection) to the following RadComboBox(RCB) and updates the following RadGrid2(RG#) with data pertaining to that selection.

I am using asp:CheckBox to evaluate the current check box selections in RG2 to then filter the possible data elements in RG3.

Successfully, I used the RCB to alter the data elements in RG2, by changing the selection in the RCB you'll subsequently notice the possible values available in RG2. I have not been so fortunate with the CheckBox...thus far.

I try to populate RG3 in the same way as I did using the RCB, but I continually get an error stating "SelectedValue is read only", but it worked for the RCB to RG2, so I assumed it was translatable.

The first, snippet is of RCB to RG using a method FillFacility to fill RG2. The second, is how I have been trying to populate RG3 with check box selections. The check all, one, or none works fine in RG2 check box column item selection, but does not post values to RG3 or allow the attempt, because of the error.

 
        Me.rcbSite.SelectedValue = DR("SiteID")  
        Me.FillFacility(Convert.ToInt32(DR("SiteID")))  
        'Here is the problem I think  
        Me.RG2.SelectedValues = DR("FacilityID")  
        Me.FillDepartment(Convert.ToInt32(DR("FacilityID")))  
 
   

I appreciate any and all help.

Cheers,

-Ryan

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 09 Feb 2009, 01:15 PM
Hello Ryan,

Based on this information, it is hard to determine what is the problem with the implementation.
If the issue persists, you can open a formal support ticket, and send us the relevant code, demonstrating how the grid is populated, and how the combo and checkbox are related to it - more specifically, how checking/unchecking the checkbox triggers a change of the data for the grid, and how this change is realized.
I will review the code locally, and get back to you with additional information.

Kind regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ryan
Top achievements
Rank 1
answered on 09 Feb 2009, 06:06 PM
Thanks Yavor. After posting this, I figured it would be difficult to answer with my limited code for the problem.

I have come believe the problem stems from my SQL query for the data. Once I can formulate the proper SQL stored procedures, I'll return with better examples and a clearer question.

Although, I am now having difficulty with combo boxes elsewhere.

I want all my combo boxes to be empty on load. They currently fill with the first element in the list. I have enabled autocomplete, which works fine. I have also tried to insert a new element to the list as either empty or "Please do this (x)".

I am not happy with this format, but it works for now. I'd like to have to add any elements, because now the introduced element has become part of the combo boxes, of course.

Although, I have a section of combo boxes (2) which do not populate on load, with either introduce element or the existing data. I like this way of course, but I cannot replicate anywhere else and I cannot see the formatting difference with the other combo boxes.

Here:
Protected Sub SetEndPayerGroup()  
        Dim DS As DataSet = New DataSet  
        Dim sqlCN As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(sSQL)  
        Dim sqlDA As System.Data.SqlClient.SqlDataAdapter  
        sqlDA = New System.Data.SqlClient.SqlDataAdapter("PayerGroupList", sqlCN)  
        sqlDA.SelectCommand.CommandType = CommandType.StoredProcedure  
 
        sqlCN.Open()  
        sqlDA.Fill(DS)  
 
        Dim DT As DataTable = New DataTable  
        DT = DS.Tables(0)  
        rcbEndPayerGroup.DataTextField = "PayerName" 
        rcbEndPayerGroup.DataValueField = "PayerGroup" 
        rcbEndPayerGroup.DataSource = DT.DefaultView  
        rcbEndPayerGroup.DataBind()  
        rcbEndPayerGroup.Items.Insert(0, New Telerik.Web.UI.RadComboBoxItem)  
        rcbEndPayerGroup.Items(0).Text = "-Enter payer group-" 
    End Sub 
And the ASPX code:
            <td> 
                <asp:Label ID="lblEndPayerGroup" runat="server" Font-Bold="true" Text="End Payer Group" /> 
            </td> 
            <td> 
                <telerik:RadComboBox ID="rcbEndPayerGroup" runat="server" BorderColor="Navy" BackColor="WhiteSmoke" 
                    Skin="Office2007" MarkFirstMatch="true" HighlightTemplatedItems="true">  
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </telerik:RadComboBox> 
            </td> 
I have multiple combo boxes and all the others fill the box on load, except this one.

Cheers!
0
Yavor
Telerik team
answered on 16 Feb 2009, 07:45 AM
Hello Ryan,

I reviewed this code sample as well, and I cannot determine for sure what is causing this erratic behavior.  One possible option would be to load the combo on demand, thus having the option to pass any items you like. However, since you mentioned that the other combos are behaving properly, there may be another problem at play. To further investigate, I will need to look at and debug a small project, which you can send through a formal support ticket.

Sincerely yours,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Ryan
Top achievements
Rank 1
Share this question
or