Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
261 views
The problem I have is that when i do a client-side rebind of the rows in a grid (using a webservice call), the GridTemplateColumn which contains checkboxes, does NOT refresh.  The data rows populate properly with no problem.  However, the number of checkboxes, as well as their state, are not affected by the rebind.  They are actually in exactly the same state as before the rebind.  I have tried a number of workarounds, none of which have worked.

I have some server-side activity that toggles the visible property of some of the rows prior to the rebind, but I don't think that should affect the behavior of the grid.  The following is done from a button click:

  .
  .
  .

 

var retval = ADAdvisor.ws.ADAdvisorMaintService.InvestorAccountsForCF(parseInt(currInvID.value), UpdateAccountList);

 

}

 

 


function
UpdateAccountList(result) {

 

 

var tableView = $find("<%= radGridAccounts.ClientID %>").get_masterTableView();

 

 

 

tableView.set_dataSource(result);

tableView.dataBind();

}

 

 



And, here is the grid with the template column checkbox:

 

<telerik:RadGrid ID="radGridAccounts" runat="server" Width="480px" Height="300px" Skin="Black" AllowMultiRowSelection="true" >

 

<ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="True" >

 

 

 

<Selecting AllowRowSelect="true" UseClientSelectColumnOnly="false" />

 

 

 

<Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true" />

 

 

 

</ClientSettings>

 

 

 

 

 

 

<MasterTableView AutoGenerateColumns="false" Font-Size="Larger" DataKeyNames="UserID,InvAcctID,AcctTypeCode" NoMasterRecordsText="All Accounts Assigned to Cash Flows..." >

 

 

 

 

<Columns>

 

<telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Select for<br/>Cash Flow" >

 

 

 

<ItemTemplate>

 

 

 

<asp:Panel ID="Panel1" runat="server" >

 

 

 

 

 

 

<asp:CheckBox ID="chkBoxCFAccts" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="AccountChecked" />

 

 

 

 

</asp:Panel>

 

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn  DataField="AcctDesc"

                         

HeaderText="Account Description:"

 

                         

SortExpression="AcctDesc"

 

                         

UniqueName="AcctDesc"

 

                     

HeaderStyle-Width="200px" />

 

 

<telerik:GridBoundColumn  DataField="CurrBalance"

 

 

                            HeaderText="Balance:"

 

                             

SortExpression="CurrBalance"

 

 

                            UniqueName="CurrBalance"

 

                            HeaderStyle-Width="90px" />

 

<telerik:GridBoundColumn DataField="AcctTypeName"

 

                             

HeaderText="Account Type:"

 

                             

SortExpression="AcctTypeName"

 

                             

UniqueName="AcctTypeName"

 

                             

HeaderStyle-Width="100px" />

 

 

<telerik:GridBoundColumn DataField="UserID"

 

                              

HeaderText="UserID:"

 

                             

Visible="false" />

 

 

<telerik:GridBoundColumn DataField="InvAcctID"

 

                             

HeaderText="InvAcctID:"

 

                             

Visible="false" />

 

 

<telerik:GridBoundColumn DataField="AcctTypeCode" 
                                HeaderText="AcctTypeCode:"

 

 

 

                                Visible="false" />

 

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

 


I'm sure I am missing something simple, but I just can't solve this one.

Thanks,
Shahryar
Veli
Telerik team
 answered on 24 Jun 2010
3 answers
251 views
Hi,

I want to add row header and column header on grid. Please let me know what is the better way.


Support Currency

 

Base Currency

SGD

THB

USD

 

 

BHD

 

 

HKD

 

 

 

 

 

 

 

 

 

Daniel
Telerik team
 answered on 24 Jun 2010
1 answer
201 views
I have a Radtreeview residing inside a splitter that I build manually using the following code:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        If Not IsPostBack Then 
 
            buildTree()  
            RadTreeView1.ExpandAllNodes()  
        End If 
        setValues()  
 
 
    End Sub 
    Private Sub buildTree()  
        RadTreeView1.Skin = "Forest" 
 
 
        Dim connect As New SqlConnection(ConfigurationManager.ConnectionStrings("CouncilAgendaConnectionString").ConnectionString)  
        connect.Open()  
        Dim dsAgenda As New DataSet  
 
        Dim yearTable As New DataTable  
        Dim councilMeetingTable As New DataTable  
 
        Dim ConsentAgendaTitleTable As New DataTable  
        Dim otherApprovalsTitleTable As New DataTable  
        Dim consentAgendaTable As New DataTable  
        Dim consentAgendaExhibitsTitleTable As New DataTable  
 
        Dim minutesTitleTable As New DataTable  
        Dim minutesTable As New DataTable  
 
        Dim callToOrderTitleTable As New DataTable  
 
        Dim citizenCommentsTitleTable As New DataTable  
 
        Dim publicHearingsTitleTable As New DataTable  
        Dim publicHearingsSubTitleTable As New DataTable  
        Dim publicHearingsTable As New DataTable  
 
        Dim ordinancesTitleTable As New DataTable  
        Dim ordinancesCommitteesTable As New DataTable  
        Dim ordinancesCommitteesABTable As New DataTable  
 
        Dim reportsTitleTable As New DataTable  
        Dim reportsCommitteesTable As New DataTable  
        Dim reportsAgendaABTable As New DataTable  
        Dim reportsDiscussionTitleTable As New DataTable  
        Dim reportsDiscussionTable As New DataTable  
 
        Dim staffReportsTitleTable As New DataTable  
        Dim staffReportsTable As New DataTable  
 
        'Start SQL Queries  
        Dim yearAdapter As New SqlDataAdapter("select distinct year(meetingdate) as 'year' from meetings where meetingdate is not null " & _  
                "and idgroup = 7 order by year(meetingdate) desc", connect)  
        Dim councilMeetingAdapter As New SqlDataAdapter("select idcouncilmtgdate, meetingdate from agendapacketcurrent inner join meetings on meetings.id = idcouncilmtgdate", connect)  
        Dim callToOrderTitleAdapter As New SqlDataAdapter("select idcouncilmtgdate, meetingdate from agendapacketcurrent inner join meetings on meetings.id = idcouncilmtgdate", connect)  
        Dim citizenCommentsTitleAdapter As New SqlDataAdapter("select idcouncilmtgdate, meetingdate from agendapacketcurrent inner join meetings on meetings.id = idcouncilmtgdate", connect)  
        Dim publicHearingsTitleAdapter As New SqlDataAdapter("select idcouncilmtgdate, meetingdate from agendapacketcurrent inner join meetings on meetings.id = idcouncilmtgdate", connect)  
        Dim ConsentAgendaTitleAdapter As New SqlDataAdapter("select idcouncilmtgdate, meetingdate from agendapacketcurrent inner join meetings on meetings.id = idcouncilmtgdate", connect)  
        Dim ordinancesTitleTableAdapter As New SqlDataAdapter("select idcouncilmtgdate, meetingdate from agendapacketcurrent inner join meetings on meetings.id = idcouncilmtgdate", connect)  
 
 
 
        'Public Hearings Etc Section  
        Dim publicHearingsSubTitleAdapter As New SqlDataAdapter("select distinct contenttype.type, content.idcouncilmtgdate from [contenttype] inner join [content] on [content].idtype = contenttype.id where idcouncilmtgdate is not null and contenttype.type in ('Public Hearings','Presentations','Proclamations','Appointments')  and content.idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent)", connect)  
        Dim publicHearingsAdapter As New SqlDataAdapter("select content.description, contenttype.type,  content.id, url, content.idcouncilmtgdate from [contenttype] inner join [content] on [content].idtype = contenttype.id where idcouncilmtgdate is not null and contenttype.type in ('Public Hearings','Presentations','Proclamations','Appointments')  and idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent) order by content.orderindex", connect)  
        'End Public Hearing Etc Section  
 
        'Reports Section  
        Dim reportsTitleAdapter As New SqlDataAdapter("select idcouncilmtgdate, meetingdate from agendapacketcurrent inner join meetings on meetings.id = idcouncilmtgdate", connect)  
        Dim reportsCommitteesAdapter As New SqlDataAdapter("select [group].groupname, meetingdate, meetings.id as 'idcouncilmtgdate', [group].id as 'idgroup' from [group], meetings where [group].idgrouptype = 4 and meetingdate is not null  and meetings.id = (select idcouncilmtgdate from agendapacketcurrent)", connect)  
        Dim reportsAgendaABAdapter As New SqlDataAdapter("SELECT AgendaBills.id, AgendaBills.ab_no, AgendaBills.idCouncilMtgDate, AgendaBills.idCommittee FROM AgendaBills INNER JOIN [Group] ON AgendaBills.idCommittee = [Group].id where [group].idgrouptype = 4 and agendabills.isordinance = 'no' and agendabills.isapproved = 'yes' and isconsentagenda = 'no'  and agendabills.idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent) order by AgendaBills.orderindex", connect)  
        Dim reportsDiscussionTitleAdapter As New SqlDataAdapter("SELECT distinct [type], idgroup, idcouncilmtgdate FROM ContentType INNER JOIN [Content] ON ContentType.id = [Content].idType where content.idtype = 4  and idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent)", connect)  
        Dim reportsDiscussionAdapter As New SqlDataAdapter("select [description], idgroup, [idcouncilmtgdate], [url], [content].[id] from [content] where content.idtype = 4  and idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent) order by content.orderindex", connect)  
 
        Dim staffReportsTitleAdapter As New SqlDataAdapter("select distinct contenttype.type, content.idcouncilmtgdate from [contenttype] inner join [content] on [content].idtype = contenttype.id where idcouncilmtgdate is not null and contenttype.type in ('Staff Reports')  and content.idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent)", connect)  
        Dim staffReportsAdapter As New SqlDataAdapter("select content.description, contenttype.type,  content.id, content.idcouncilmtgdate from [contenttype] inner join [content] on [content].idtype = contenttype.id where idcouncilmtgdate is not null and contenttype.type in ('Staff Reports')  and idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent) order by content.description", connect)  
        'End Reports Section  
 
        Dim otherApprovalsTitleAdapter As New SqlDataAdapter("select idcouncilmtgdate, meetingdate from agendapacketcurrent inner join meetings on meetings.id = idcouncilmtgdate", connect)  
        Dim minutesTitleAdapter As New SqlDataAdapter("select idcouncilmtgdate, meetingdate from agendapacketcurrent inner join meetings on meetings.id = idcouncilmtgdate", connect)  
        Dim minutesAdapter As New SqlDataAdapter("select [description], [idcouncilmtgdate], [url], [content].[id] " & _  
            "from [content] " & _  
            "inner join " & _  
            "[contenttype] on [content].idtype = [contenttype].id " & _  
            "where [contenttype].[type] = 'Minutes' and idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent)" & _  
            "order by [orderindex]", connect)  
        Dim consentAgendaAdapter As New SqlDataAdapter("SELECT [ab_no], [title], [id], [idcouncilmtgdate] FROM [AgendaBills] WHERE (([isapproved] LIKE 'yes') AND ([isordinance] LIKE 'no') AND ([isConsentAgenda] LIKE 'yes'))  and agendabills.idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent) order by [orderindex]", connect)  
        Dim consentAgendaExhibitsTitleAdapter As New SqlDataAdapter("", connect)  
 
        Dim ordinancesCommitteesAdapter As New SqlDataAdapter("SELECT distinct [Group].groupname, [Group].id, AgendaBills.idCouncilMtgDate FROM [Group] INNER JOIN AgendaBills ON [Group].id = AgendaBills.idCommittee where [group].idgrouptype = 4 and agendabills.isordinance = 'yes' and agendabills.isapproved = 'yes' and agendabills.idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent)", connect)  
        Dim ordinancesCommitteesABAdapter As New SqlDataAdapter("SELECT AgendaBills.id, AgendaBills.ab_no, AgendaBills.idCouncilMtgDate, AgendaBills.idCommittee FROM AgendaBills INNER JOIN [Group] ON AgendaBills.idCommittee = [Group].id where [group].idgrouptype = 4 and agendabills.isordinance = 'yes' and agendabills.isapproved = 'yes' and agendabills.idcouncilmtgdate = (select idcouncilmtgdate from agendapacketcurrent)", connect)  
 
        'End SQL Queries  
 
        'Start Fill Tables  
        yearAdapter.Fill(yearTable)  
        councilMeetingAdapter.Fill(councilMeetingTable)  
        ConsentAgendaTitleAdapter.Fill(ConsentAgendaTitleTable)  
        otherApprovalsTitleAdapter.Fill(otherApprovalsTitleTable)  
        minutesTitleAdapter.Fill(minutesTitleTable)  
        minutesAdapter.Fill(minutesTable)  
        consentAgendaAdapter.Fill(consentAgendaTable)  
        callToOrderTitleAdapter.Fill(callToOrderTitleTable)  
        citizenCommentsTitleAdapter.Fill(citizenCommentsTitleTable)  
        publicHearingsTitleAdapter.Fill(publicHearingsTitleTable)  
        ordinancesTitleTableAdapter.Fill(ordinancesTitleTable)  
        reportsTitleAdapter.Fill(reportsTitleTable)  
        ordinancesCommitteesAdapter.Fill(ordinancesCommitteesTable)  
        ordinancesCommitteesABAdapter.Fill(ordinancesCommitteesABTable)  
        reportsCommitteesAdapter.Fill(reportsCommitteesTable)  
        reportsAgendaABAdapter.Fill(reportsAgendaABTable)  
        reportsDiscussionTitleAdapter.Fill(reportsDiscussionTitleTable)  
        reportsDiscussionAdapter.Fill(reportsDiscussionTable)  
        publicHearingsSubTitleAdapter.Fill(publicHearingsSubTitleTable)  
        publicHearingsAdapter.Fill(publicHearingsTable)  
        staffReportsTitleAdapter.Fill(staffReportsTitleTable)  
        staffReportsAdapter.Fill(staffReportsTable)  
 
 
        dsAgenda.Tables.Add(yearTable) '0  
        dsAgenda.Tables.Add(councilMeetingTable) '1  
        dsAgenda.Tables.Add(ConsentAgendaTitleTable) '2  
        dsAgenda.Tables.Add(otherApprovalsTitleTable) '3  
        dsAgenda.Tables.Add(minutesTitleTable) '4  
        dsAgenda.Tables.Add(minutesTable) '5  
        dsAgenda.Tables.Add(consentAgendaTable) '6  
        dsAgenda.Tables.Add(callToOrderTitleTable) '7  
        dsAgenda.Tables.Add(citizenCommentsTitleTable) '8  
        dsAgenda.Tables.Add(publicHearingsTitleTable) '9  
        dsAgenda.Tables.Add(ordinancesTitleTable) '10  
        dsAgenda.Tables.Add(reportsTitleTable) '11  
        dsAgenda.Tables.Add(ordinancesCommitteesTable) '12 should reference table 10 column id  
        dsAgenda.Tables.Add(ordinancesCommitteesABTable) '13 references table 12 id to idcommittee and idcouncilmtgdate to idcouncilmtgdate  
        dsAgenda.Tables.Add(reportsCommitteesTable) '14 should reference table 11 column id  
        dsAgenda.Tables.Add(reportsAgendaABTable) '15 references table 14  
        dsAgenda.Tables.Add(reportsDiscussionTitleTable) '16 references table 14  
        dsAgenda.Tables.Add(reportsDiscussionTable) '17 references table 16 idgroup, idcouncilmtgdate  
        dsAgenda.Tables.Add(publicHearingsSubTitleTable) '18 references table 9  
        dsAgenda.Tables.Add(publicHearingsTable) '19 references table 18  
        dsAgenda.Tables.Add(staffReportsTitleTable) '20 references table 11  
        dsAgenda.Tables.Add(staffReportsTable) '21 references table 20  
        'End Fill Tables  
 
        'Start All Relationships  
        'Start Add staffReportsTitle to staffReports Relation Columns  
        Dim parentstaffReportsTitleTableColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(20).Columns("type"), dsAgenda.Tables(20).Columns("idcouncilmtgdate")}  
        Dim childstaffReportsTableColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(21).Columns("type"), dsAgenda.Tables(21).Columns("idcouncilmtgdate")}  
 
        'End Start Add staffReportsTitle to staffReports Relation Columns  
 
        'Start Add PublicHearingsSubTitle to PublicHearings Relation Columns  
        Dim parentPublicHearingsSubTitleTableColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(18).Columns("type"), dsAgenda.Tables(18).Columns("idcouncilmtgdate")}  
        Dim childPublicHearingsTableColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(19).Columns("type"), dsAgenda.Tables(19).Columns("idcouncilmtgdate")}  
        'End Start Add PublicHearingsSubTitle to PublicHearings Relation Columns  
 
        'Start Add Ordinances Committees to Ordinances AB Relation Columns  
        Dim parentOrdinancesCommitteesTableColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(12).Columns("id"), dsAgenda.Tables(12).Columns("idcouncilmtgdate")}  
        Dim childordinancesCommitteesABTableColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(13).Columns("idcommittee"), dsAgenda.Tables(13).Columns("idcouncilmtgdate")}  
        'End Add Ordinances Committees to Ordinances AB Relation Columns  
 
        'Start Add Reports Committees to Reports AB Relation Columns  
        Dim parentReportsCommitteesTableColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(14).Columns("idgroup"), dsAgenda.Tables(14).Columns("idcouncilmtgdate")}  
        Dim childReportsCommitteesABTableColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(15).Columns("idcommittee"), dsAgenda.Tables(15).Columns("idcouncilmtgdate")}  
        'End Add Reports Committees to Reports AB Relation Columns  
 
        'Start Add Reports Committees to Discussion Title Columns  
        'References --> parentReportsCommitteesTableColumns <--  
        Dim childReportsDiscussionTitleColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(16).Columns("idgroup"), dsAgenda.Tables(16).Columns("idcouncilmtgdate")}  
        'End Start Add Reports Committees to Discussion Title Columns  
 
        'Start Add Discussion Title to Discussions   
        Dim parentReportsDiscussionTitleColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(16).Columns("idgroup"), dsAgenda.Tables(16).Columns("idcouncilmtgdate")}  
        Dim childReportsDiscussionColumns As DataColumn() = New DataColumn() {dsAgenda.Tables(17).Columns("idgroup"), dsAgenda.Tables(17).Columns("idcouncilmtgdate")}  
        'End Start Add Discussion Title to Discussions   
 
        'dsAgenda.Relations.Add("Year", dsAgenda.Tables(0).Columns("Year"), dsAgenda.Tables(1).Columns("Year"))  
        dsAgenda.Relations.Add("CouncilMeetingDate", dsAgenda.Tables(1).Columns("idcouncilmtgdate"), dsAgenda.Tables(2).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_CouncilMeeting_to_CallToOrder", dsAgenda.Tables(1).Columns("idcouncilmtgdate"), dsAgenda.Tables(7).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_CouncilMeeting_to_CitizenComments", dsAgenda.Tables(1).Columns("idcouncilmtgdate"), dsAgenda.Tables(8).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_CouncilMeeting_to_PublicHearings", dsAgenda.Tables(1).Columns("idcouncilmtgdate"), dsAgenda.Tables(9).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_CouncilMeeting_to_Ordinances", dsAgenda.Tables(1).Columns("idcouncilmtgdate"), dsAgenda.Tables(10).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_CouncilMeeting_to_Reports", dsAgenda.Tables(1).Columns("idcouncilmtgdate"), dsAgenda.Tables(11).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_Ordinances_to_OrdinancesCommittees", dsAgenda.Tables(10).Columns("idcouncilmtgdate"), dsAgenda.Tables(12).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_OrdinancesCommittees_to_OrdinancesCommitteesAB", parentOrdinancesCommitteesTableColumns, childordinancesCommitteesABTableColumns)  
        'dsAgenda.Relations.Add("rel_OrdinancesCommittees_to_OrdinancesCommitteesAB", dsAgenda.Tables(12).Columns("id"), dsAgenda.Tables(13).Columns("idcommittee"))  
        dsAgenda.Relations.Add("rel_consentAgendaTitle_to_otherApprovalsTitle", dsAgenda.Tables(2).Columns("idcouncilmtgdate"), dsAgenda.Tables(3).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_otherApprovals_to_consentAgenda", dsAgenda.Tables(3).Columns("idcouncilmtgdate"), dsAgenda.Tables(6).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_consentAgendaTitle_to_MinutesTitle", dsAgenda.Tables(2).Columns("idcouncilmtgdate"), dsAgenda.Tables(4).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_MinutesTitle_Minutes", dsAgenda.Tables(4).Columns("idcouncilmtgdate"), dsAgenda.Tables(5).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_Reports_To_ReportsCommittees", dsAgenda.Tables(11).Columns("idcouncilmtgdate"), dsAgenda.Tables(14).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_ReportsCommittees_To_ReportsCommitteesAB", parentReportsCommitteesTableColumns, childReportsCommitteesABTableColumns)  
        dsAgenda.Relations.Add("rel_ReportsCommittees_To_ReportsDiscussionTitle", parentReportsCommitteesTableColumns, childReportsDiscussionTitleColumns)  
        dsAgenda.Relations.Add("rel_ReportsDiscussionTitle_To_ReportsDiscussion", parentReportsDiscussionTitleColumns, childReportsDiscussionColumns)  
        dsAgenda.Relations.Add("rel_PublicHearings_To_PublicHearingsSubTitle", dsAgenda.Tables(9).Columns("idcouncilmtgdate"), dsAgenda.Tables(18).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_PublicHearingsSubTitle_To_PublicHearings", parentPublicHearingsSubTitleTableColumns, childPublicHearingsTableColumns)  
        dsAgenda.Relations.Add("rel_Reports_To_StaffReportsTitle", dsAgenda.Tables(11).Columns("idcouncilmtgdate"), dsAgenda.Tables(20).Columns("idcouncilmtgdate"))  
        dsAgenda.Relations.Add("rel_StaffReportsTitle_To_StaffReports", parentstaffReportsTitleTableColumns, childstaffReportsTableColumns)  
 
        'End All Relationships  
 
        For Each councilMeetingRow As DataRow In dsAgenda.Tables(1).Rows  
            Dim councilMeetingNode As New RadTreeNode(String.Format("{0:D}", councilMeetingRow(1)))  
            RadTreeView1.Nodes.Add(councilMeetingNode)  
            councilMeetingNode.ImageUrl = "~/images/logo_16x16.png" 
            councilMeetingNode.Value = councilMeetingRow(0).ToString()  
            councilMeetingNode.Attributes("idCouncilMtgdate") = Guid.NewGuid().ToString()  
            For Each callToOrderTitleRow As DataRow In councilMeetingRow.GetChildRows("rel_CouncilMeeting_to_CallToOrder")  
                Dim callToOrderTitleNode As New RadTreeNode(callToOrderTitleRow(0).ToString())  
                councilMeetingNode.Nodes.Add(callToOrderTitleNode)  
                callToOrderTitleNode.Text = "Call to Order" 
                callToOrderTitleNode.Font.Bold = True 
                callToOrderTitleNode.ImageUrl = "~/images/folderclose_16x16.png" 
                callToOrderTitleNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
            Next 
            For Each CitizenCommentsTitleRow As DataRow In councilMeetingRow.GetChildRows("rel_CouncilMeeting_to_CitizenComments")  
                Dim CitizenCommentsTitleNode As New RadTreeNode(CitizenCommentsTitleRow(0).ToString())  
                councilMeetingNode.Nodes.Add(CitizenCommentsTitleNode)  
                CitizenCommentsTitleNode.Text = "Citizen Comments" 
                CitizenCommentsTitleNode.Font.Bold = True 
                CitizenCommentsTitleNode.ImageUrl = "~/images/folderclose_16x16.png" 
                CitizenCommentsTitleNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
            Next 
            For Each PublicHearingsTitleRow As DataRow In councilMeetingRow.GetChildRows("rel_CouncilMeeting_to_PublicHearings")  
                Dim PublicHearingsTitleNode As New RadTreeNode(PublicHearingsTitleRow(0).ToString())  
                councilMeetingNode.Nodes.Add(PublicHearingsTitleNode)  
                PublicHearingsTitleNode.Text = "Public Hearings, Presentations, Proclamations, & Appointments" 
                PublicHearingsTitleNode.Font.Bold = True 
                PublicHearingsTitleNode.Style.Value = "white-space:normal" 
                PublicHearingsTitleNode.ImageUrl = "~/images/folderclose_16x16.png" 
                PublicHearingsTitleNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                PublicHearingsTitleNode.ContextMenuID = "cmPublicHearings" 
                For Each PublicHearingsSubTitleRow As DataRow In PublicHearingsTitleRow.GetChildRows("rel_PublicHearings_To_PublicHearingsSubTitle")  
                    Dim publicHearingsSubTitleNode As New RadTreeNode(PublicHearingsSubTitleRow(0).ToString())  
                    PublicHearingsTitleNode.Nodes.Add(publicHearingsSubTitleNode)  
                    publicHearingsSubTitleNode.ImageUrl = "~/images/folderclose_16x16.png" 
                    publicHearingsSubTitleNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                    For Each PublicHearingsRow As DataRow In PublicHearingsSubTitleRow.GetChildRows("rel_PublicHearingsSubTitle_To_PublicHearings")  
                        Dim PublicHearingsNode As New RadTreeNode(PublicHearingsRow(0).ToString())  
                        publicHearingsSubTitleNode.Nodes.Add(PublicHearingsNode)  
                        PublicHearingsNode.Attributes("idPublicHearing") = Guid.NewGuid().ToString()  
                        PublicHearingsNode.Value = PublicHearingsRow(2).ToString()  
 
                        If PublicHearingsRow(3).ToString = "" Then 
                            PublicHearingsNode.ImageUrl = "~/images/text_16x16.png" 
                            PublicHearingsNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                        Else 
                            'PublicHearingsNode.NavigateUrl  
                            'this means that there is a URL record  
 
 
                            PublicHearingsNode.NavigateUrl = "~/downloadfile.aspx?id=" & PublicHearingsNode.Value  
                            PublicHearingsNode.Target = "blank" 
                            PublicHearingsNode.ImageUrl = "~/images/pdf_16x16.png" 
                        End If 
                        'If (DirectCast((sender), RadTreeView)).ID = "RadTreeView1" Then  
                        'RadToolTipManager1.TargetControls.Add(PublicHearingsNode.Attributes("idPublicHearing"), PublicHearingsNode.Value, True)  
                        'End If  
 
                    Next 
                Next 
            Next 
            For Each consentAgendaTitleRow As DataRow In councilMeetingRow.GetChildRows("CouncilMeetingDate")  
                Dim consentAgendaTitleNode As New RadTreeNode(consentAgendaTitleRow(0).ToString())  
                councilMeetingNode.Nodes.Add(consentAgendaTitleNode)  
                consentAgendaTitleNode.Text = "Consent Agenda - Action Items" 
                consentAgendaTitleNode.Font.Bold = True 
                consentAgendaTitleNode.ImageUrl = "~/images/folderclose_16x16.png" 
                consentAgendaTitleNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                For Each minutesTitleRow As DataRow In consentAgendaTitleRow.GetChildRows("rel_consentAgendaTitle_to_MinutesTitle")  
                    Dim minutesTitleNode As New RadTreeNode(minutesTitleRow(0).ToString())  
                    consentAgendaTitleNode.Nodes.Add(minutesTitleNode)  
                    minutesTitleNode.Text = "Minutes" 
                    minutesTitleNode.Font.Italic = True 
                    minutesTitleNode.ImageUrl = "~/images/folderclose_16x16.png" 
                    minutesTitleNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                    minutesTitleNode.ContextMenuID = "cmMinutesWarrants" 
                    For Each minutesRow As DataRow In minutesTitleRow.GetChildRows("rel_MinutesTitle_Minutes")  
                        Dim minutesNode As New RadTreeNode(minutesRow(0).ToString())  
                        minutesTitleNode.Nodes.Add(minutesNode)  
                        minutesNode.ImageUrl = "~/images/minutes_16x16.png" 
                        minutesNode.Value = minutesRow(3).ToString()  
                        minutesNode.Attributes("id") = Guid.NewGuid().ToString()  
                        minutesNode.NavigateUrl = "~/downloadfile.aspx?id=" & minutesNode.Value  
                        minutesNode.Target = "blank" 
                        minutesNode.EnableContextMenu = False 
                    Next 
                Next 
                For Each otherApprovalsTitleRow As DataRow In consentAgendaTitleRow.GetChildRows("rel_consentAgendaTitle_to_otherApprovalsTitle")  
                    Dim otherApprovalsNode As New RadTreeNode(otherApprovalsTitleRow(0).ToString())  
                    consentAgendaTitleNode.Nodes.Add(otherApprovalsNode)  
                    otherApprovalsNode.Text = "Other Approvals" 
                    otherApprovalsNode.Font.Italic = True 
                    otherApprovalsNode.ImageUrl = "~/images/folderclose_16x16.png" 
                    otherApprovalsNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                    'otherApprovalsNode.EnableContextMenu = False  
                    otherApprovalsNode.ContextMenuID = "ConsentAgendaAdd" 
                    'Generate Consent Agendas  
                    For Each consentAgendaRow As DataRow In otherApprovalsTitleRow.GetChildRows("rel_otherApprovals_to_consentAgenda")  
                        Dim consentAgendaNode As New RadTreeNode(consentAgendaRow(0).ToString())  
                        otherApprovalsNode.Nodes.Add(consentAgendaNode)  
                        consentAgendaNode.Value = consentAgendaRow(2).ToString()  
                        consentAgendaNode.Attributes("id") = Guid.NewGuid().ToString()  
                        consentAgendaNode.ImageUrl = "~/images/agendabills_16x16.png" 
                        consentAgendaNode.EnableContextMenu = False 
                    Next 
                Next 
            Next 
            For Each OrdinancesTitleRow As DataRow In councilMeetingRow.GetChildRows("rel_CouncilMeeting_to_Ordinances")  
                Dim OrdinancesTitleNode As New RadTreeNode(OrdinancesTitleRow(0).ToString())  
                councilMeetingNode.Nodes.Add(OrdinancesTitleNode)  
                OrdinancesTitleNode.Text = "Ordinances" 
                OrdinancesTitleNode.Font.Bold = True 
                OrdinancesTitleNode.ImageUrl = "~/images/folderclose_16x16.png" 
                OrdinancesTitleNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                For Each ordinancesCommitteesRow As DataRow In OrdinancesTitleRow.GetChildRows("rel_Ordinances_to_OrdinancesCommittees")  
                    Dim ordinancesCommitteesNode As New RadTreeNode(ordinancesCommitteesRow(0).ToString())  
                    OrdinancesTitleNode.Nodes.Add(ordinancesCommitteesNode)  
                    ordinancesCommitteesNode.ImageUrl = "~/images/folderclose_16x16.png" 
                    ordinancesCommitteesNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                    ordinancesCommitteesNode.Font.Italic = True 
 
                    'rel_OrdinancesCommittees_to_OrdinancesCommitteesAB  
                    For Each OrdinancesCommitteesABRow As DataRow In ordinancesCommitteesRow.GetChildRows("rel_OrdinancesCommittees_to_OrdinancesCommitteesAB")  
                        Dim OrdinancesCommitteesABNode As New RadTreeNode(OrdinancesCommitteesABRow(1).ToString())  
                        ordinancesCommitteesNode.Nodes.Add(OrdinancesCommitteesABNode)  
                        OrdinancesCommitteesABNode.Value = OrdinancesCommitteesABRow(0).ToString()  
                        OrdinancesCommitteesABNode.Attributes("id") = Guid.NewGuid().ToString()  
                        OrdinancesCommitteesABNode.ImageUrl = "~/images/agendabills_16x16.png" 
                    Next 
                Next 
            Next 
            For Each ReportsTitleRow As DataRow In councilMeetingRow.GetChildRows("rel_CouncilMeeting_to_Reports")  
                Dim ReportsTitleNode As New RadTreeNode(ReportsTitleRow(0).ToString())  
                councilMeetingNode.Nodes.Add(ReportsTitleNode)  
                ReportsTitleNode.Text = "Reports" 
                ReportsTitleNode.Font.Bold = True 
                ReportsTitleNode.ImageUrl = "~/images/folderclose_16x16.png" 
                ReportsTitleNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                For Each reportsCommitteesRow As DataRow In ReportsTitleRow.GetChildRows("rel_Reports_To_ReportsCommittees")  
                    Dim reportsCommitteesNode As New RadTreeNode(reportsCommitteesRow(0).ToString())  
                    ReportsTitleNode.Nodes.Add(reportsCommitteesNode)  
                    reportsCommitteesNode.ImageUrl = "~/images/folderclose_16x16.png" 
                    reportsCommitteesNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                    reportsCommitteesNode.Font.Italic = True 
                    For Each ReportsCommitteesABRow As DataRow In reportsCommitteesRow.GetChildRows("rel_ReportsCommittees_To_ReportsCommitteesAB")  
                        Dim ReportsCommitteesABNode As New RadTreeNode(ReportsCommitteesABRow(1).ToString())  
                        reportsCommitteesNode.Nodes.Add(ReportsCommitteesABNode)  
                        ReportsCommitteesABNode.Value = ReportsCommitteesABRow(0).ToString()  
                        ReportsCommitteesABNode.Attributes("id") = Guid.NewGuid().ToString()  
                        ReportsCommitteesABNode.ImageUrl = "~/images/agendabills_16x16.png" 
                    Next 
                    For Each ReportsDiscussionTitleRow As DataRow In reportsCommitteesRow.GetChildRows("rel_ReportsCommittees_To_ReportsDiscussionTitle")  
                        Dim ReportsDiscussionTitleNode As New RadTreeNode(ReportsDiscussionTitleRow(0).ToString())  
                        reportsCommitteesNode.Nodes.Add(ReportsDiscussionTitleNode)  
                        ReportsDiscussionTitleNode.Value = ReportsDiscussionTitleRow(0).ToString()  
                        ReportsDiscussionTitleNode.ImageUrl = "~/images/folderclose_16x16.png" 
                        ReportsDiscussionTitleNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                        For Each ReportsDiscussionRow As DataRow In ReportsDiscussionTitleRow.GetChildRows("rel_ReportsDiscussionTitle_To_ReportsDiscussion")  
                            Dim ReportsDiscussionNode As New RadTreeNode(ReportsDiscussionRow(0).ToString())  
                            ReportsDiscussionTitleNode.Nodes.Add(ReportsDiscussionNode)  
 
                            If ReportsDiscussionRow(3).ToString = "" Then 
                                ReportsDiscussionNode.ImageUrl = "~/images/text_16x16.png" 
                                ReportsDiscussionNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                            Else 
                                'ReportsDiscussionNode.NavigateUrl  
                                'this means that there is a URL record  
                                ReportsDiscussionNode.Value = ReportsDiscussionRow(4).ToString()  
                                ReportsDiscussionNode.Attributes("id") = Guid.NewGuid().ToString()  
                                ReportsDiscussionNode.NavigateUrl = "~/downloadfile.aspx?id=" & ReportsDiscussionNode.Value  
                                ReportsDiscussionNode.Target = "blank" 
                                ReportsDiscussionNode.ImageUrl = "~/images/pdf_16x16.png" 
                            End If 
                        Next 
                    Next 
                Next 
                For Each staffReportsTitleRow As DataRow In ReportsTitleRow.GetChildRows("rel_Reports_To_StaffReportsTitle")  
                    Dim staffReportsTitleNode As New RadTreeNode(staffReportsTitleRow(0).ToString)  
                    ReportsTitleNode.Nodes.Add(staffReportsTitleNode)  
                    staffReportsTitleNode.ImageUrl = "~/images/folderclose_16x16.png" 
                    staffReportsTitleNode.ExpandedImageUrl = "~/images/folderselected_16x16.png" 
                    For Each staffReportsRow As DataRow In staffReportsTitleRow.GetChildRows("rel_StaffReportsTitle_To_StaffReports")  
                        Dim staffReportsNode As New RadTreeNode(staffReportsRow(0).ToString)  
                        staffReportsTitleNode.Nodes.Add(staffReportsNode)  
                        staffReportsNode.Value = staffReportsRow(2).ToString  
                        staffReportsNode.Attributes("id") = Guid.NewGuid().ToString()  
                        staffReportsNode.NavigateUrl = "~/downloadfile.aspx?id=" & staffReportsNode.Value  
                        staffReportsNode.Target = "blank" 
                        staffReportsNode.ImageUrl = "~/images/pdf_16x16.png" 
                    Next 
                Next 
            Next 
        Next 
 
    End Sub 
    Private Sub RadTreeView1_ContextMenuItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeViewContextMenuEventArgs) Handles RadTreeView1.ContextMenuItemClick  
        Dim clickedNode As RadTreeNode = e.Node  
 
        Select Case e.MenuItem.Value  
            Case "AddPublicHearings" 
                'Response.Redirect("~/editors/addagendabill.aspx")  
                wdwInformation.Visible = True 
                Me.wdwInformation.WindowState = Infragistics.Web.UI.LayoutControls.DialogWindowState.Normal  
                Me.wdwInformation.Modal = True 
                Me.wdwInformation.InitialLocation = Infragistics.Web.UI.LayoutControls.DialogWindowPosition.Centered  
                'Button1.Text = "You Clicked Add Public Hearings"  
                Exit Select 
            Case "AddConsentAB" 
                wdwInformation.Visible = True 
                Me.wdwInformation.WindowState = Infragistics.Web.UI.LayoutControls.DialogWindowState.Normal  
                Me.wdwInformation.Modal = True 
                Me.wdwInformation.InitialLocation = Infragistics.Web.UI.LayoutControls.DialogWindowPosition.Centered  
                Exit Select 
            Case "AddProclamations" 
                Response.Redirect("http://www.yahoo.com")  
                Exit Select 
            Case "AddMinutes" 
                uContent.Visible = True 
                'RadTreeView1.DataBind()  
                'setValues()  
                RadTreeView1.DataSourceID = "" 
                Exit Select 
 
 
        End Select 
 
    End Sub 
    Private Sub setValues()  
        'uContent.idCouncilMeetingDate = RadComboBox1.SelectedValue  
 
        'Get id of ContentType  
        Dim connect_idType As New SqlConnection(ConfigurationManager.ConnectionStrings("CouncilAgendaConnectionString").ConnectionString)  
        connect_idType.Open()  
        Dim command_idType As New SqlCommand("select id from contenttype where type like 'Minutes'", connect_idType)  
        Dim idType As Int32  
        idType = command_idType.ExecuteScalar  
 
        'Set the idType to 'Staff Reports'  
        uContent.idType = idtype  
 
        'Set Departments as Group for dropdownlist  
        Dim connect_groupType As New SqlConnection(ConfigurationManager.ConnectionStrings("CouncilAgendaConnectionString").ConnectionString)  
        connect_groupType.Open()  
        Dim command_groupType As New SqlCommand("select id from grouptype where type like 'Staff Reports'", connect_groupType)  
        Dim groupType As Int32  
        groupType = command_groupType.ExecuteScalar  
 
        uContent.groupSelect = groupType  
 
        'Get Working Council Meeting Agenda ID  
        Dim connect_idCouncilMeetingDate As New SqlConnection(ConfigurationManager.ConnectionStrings("CouncilAgendaConnectionString").ConnectionString)  
        connect_idCouncilMeetingDate.Open()  
        Dim command_idCouncilMeetingDate As New SqlCommand("select idCouncilMtgDate from AgendaPacketCurrent", connect_idCouncilMeetingDate)  
        Dim idCouncilMeetingDate As Int32  
        idCouncilMeetingDate = command_idCouncilMeetingDate.ExecuteScalar  
        'Set ID of CouncilMeetingDate  
        uContent.idCouncilMeetingDate = "97" 
 
        'set GroupHeader Text  
        uContent.groupHeader = "Meeting Minutes" 
 
        'Enable error validation  
        uContent.rfvGroupEnabled = False 
        'uContent.rcUploadCOV = 8  
        'uContent.rcUploadCOV = 2  
        'uContent.rcUploadCOV = 1  
 
        uContent.lblDescriptionHeaderVisibility = False 
        uContent.reDescriptionVisibility = False 
 
    End Sub 



I have a context menu in the RadTreeView that when clicked, shows a user control that allows me to upload a file. The upload works well, but in order for the RadTreeView to show the new content of the database after the upload, I have to manually refresh the page.

I've tried setting the datasourceid of the the radtree to nothing then calling the BuildTree function again but that doesn't work either. Hopefully someone can provide a solution that I might be not seeing.

BTW, the ASPX page is below:

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
 
        <telerik:RadTreeView ID="RadTreeView1" runat="server">  
            <ContextMenus> 
                <telerik:RadTreeViewContextMenu ID="ConsentAgendaAdd" runat="server">  
                    <Items> 
                        <telerik:RadMenuItem Value="AddConsentAB" Text="New Consent Agenda Bill" ImageUrl="~/images/menu/16x16/addagendabill.png">  
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem Value="DelAB" Text="Delete Agenda Bill" ImageUrl="~/images/menu/16x16/addagendabill.png">  
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem IsSeparator="true">  
                        </telerik:RadMenuItem> 
                    </Items> 
                    <CollapseAnimation Type="none" /> 
                </telerik:RadTreeViewContextMenu> 
                <telerik:RadTreeViewContextMenu ID="cmMinutesWarrants" runat="server">  
                    <Items> 
                        <telerik:RadMenuItem Value="AddMinutes" Text="New Minutes" ImageUrl="~/images/menu/16x16/addagendabill.png">  
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem Value="AddWarrants" Text="New Warrants" ImageUrl="~/images/menu/16x16/addagendabill.png">  
                        </telerik:RadMenuItem> 
                    </Items> 
                    <CollapseAnimation Type="none" /> 
                </telerik:RadTreeViewContextMenu> 
                <telerik:RadTreeViewContextMenu ID="cmPublicHearings" runat="server">  
                    <Items> 
                        <telerik:RadMenuItem Value="AddPublicHearings" Text="New Public Hearing" PostBack="true">  
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem Value="AddPresentations" Text="New Presentation">  
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem Value="AddProclamations" Text="New Proclamation">  
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem Value="AddAppointments" Text="New Appointment">  
                        </telerik:RadMenuItem> 
                    </Items> 
                    <CollapseAnimation Type="none" /> 
                </telerik:RadTreeViewContextMenu> 
            </ContextMenus> 
        </telerik:RadTreeView> 
 
      
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">  
    <asp:PlaceHolder ID="contentUpload" runat="server"></asp:PlaceHolder> 
    <asp:PlaceHolder ID="agendaBill" runat="server"></asp:PlaceHolder> 
    <uc1:Upload ID="uContent" runat="server" Visible="false" /> 
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="radtreeview1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="uContent" /> 
                    <telerik:AjaxUpdatedControl ControlID="Panel1" /> 
                      
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="uContent">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="pMainTree" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 
</asp:Content> 
 

Thanks in advance!


PJ
Nikolay Tsenkov
Telerik team
 answered on 24 Jun 2010
1 answer
137 views
when using a splitter pane with embedded content (ie not an external url) and implementing  pane,print(), some browsers open a window with url "about:blank". Is there any way to specify something other than about:blank?
Dobromir
Telerik team
 answered on 24 Jun 2010
5 answers
255 views
Hello,

I am emulating the demo for the Hierarchy with Templates in the RadGrid except I want to create my tabs programatically.  The problem is when I need to access the RadTabStrip and the RadMultiPage controls within my codebehind functions for AddTab and AddPageView, I am not able to access thsoe controls.  I get a "object reference not set to an instance of an object" error.

I tried declaring the controls using FindControl but that doesn't seem to work:

Dim

 

RadTabStrip1 As RadTabStrip = CType(RadGrid1.FindControl("RadTabStrip1"), RadTabStrip)

So basically I need to know how to access controls in a NestedViewTemplate from the codebehind.

Thanks,

Steve

 

Sebastian
Telerik team
 answered on 24 Jun 2010
6 answers
180 views
The slider control seems to work fine on normal use but if I click it rapidly and repeatedly I inevitebly will eventually generate a System.InvalidCastException at some point. Here is the stack trace it is all in the control:

<br />EXCEPTION

Exception Type System.InvalidCastException

Source: Telerik.Web.UI

Message: Specified cast is not valid.

Stack Trace: at Telerik.Web.UI.RadSlider.LoadClientState(Dictionary`2 clientState)

at Telerik.Web.UI.RadDataBoundControl.LoadPostData(String postDataKey, NameValueCollection postCollection)

at Telerik.Web.UI.RadSlider.LoadPostData(String postDataKey, NameValueCollection postCollection)

at Telerik.Web.UI.RadDataBoundControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)

at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Please advise...

Thijs
Top achievements
Rank 1
 answered on 24 Jun 2010
2 answers
206 views
I am using an inline if condition in a grid which is based on a bound field and another field. While implementing the if condition in Eval statement, i am getting an unknown error.

 <telerik:GridTemplateColumn> 
                    <ItemTemplate> 
                        <table class="search_results_new" border="0" cellpadding="0" cellspacing="0"> 
                            <tr class="suggestionResults" title="select to edit suggestion"> 
                                <td> 
                                       <% if (ViewData["UserLevelBySCDS"].ToString() == "1" || (ViewData["UserLevelBySCDS"].ToString() == "2" && Eval("ResourceCategoryID").ToString() == "1") || (ViewData["UserLevelBySCDS"].ToString() == "4" && Eval("ResourceCategoryID").ToString() == "2"))   //  
                                        { %> 
                                        <!-- Delete Suggestion Original-->         
                                                Res Cat Id: <%# Eval("ResourceCategoryID").ToString() == "1" ? "Xplore" : "District" %>   <!-- Temporary line -->       
                                                <input id="hfResourceCategoryID" name="hfResourceCategoryID" type="hidden" value='<%# Eval("ResourceCategoryID")%>' /> 
                                                <div id="deleteSuggestion" class="deleteSuggestion">  
                                                    <input id="hfSuggestionID" type="hidden" value='<%# Eval("SuggestionID") %>' /> 
                                                </div> 
                                                <%# Html.ActionLink("-", "Edit", new { pID = Eval("SuggestionID") }, new { id = "A1", @class = "editMyResource", style="display: inline;" }) %> 
                                                 
                                                <!-- End of Delete Suggestion -->         
                                             
                                        <% } %>  
                                         
                                     <span> 
                                        <a href='<%# Eval("Link")%>' target="_blank"> 
                                            <%# Eval("ResourceType.Description")%> 
                                        </a> 
                                        <br /> 
                                        <b> 
                                            <div onclick="window.open('<%# Eval("Link")%>')"> 
                                                <u> 
                                                    <%# Eval("Link")%></u> 
                                             </div> 
                                        </b> 
                                     </span> 
                                     <i> 
                                            <div class="rating" id="mainStarDiv"> 
                                                <input id="hfSuggestionID" name="hfSuggestionID" type="hidden" value='<%# Eval("SuggestionID")%>' /> 
                                                <input id="hfDefaultRating" type="hidden" value='<%# Eval("Rank")%>' /> 
                                                <div class="star" id="star1" starrank="1"> 
                                                    <a href="javascript:void(0);" style="width: 100%;">1</a></div> 
                                                <div class="star" id="star2" starrank="2"> 
                                                    <a href="javascript:void(0);" style="width: 100%;">2</a></div> 
                                                <div class="star" id="star3" starrank="3"> 
                                                    <a href="javascript:void(0);" style="width: 100%;">3</a></div> 
                                                <div class="star" id="star4" starrank="4"> 
                                                    <a href="javascript:void(0);" style="width: 100%;">4</a></div> 
                                                <div class="star" id="star5" starrank="5"> 
                                                    <a href="javascript:void(0);" style="width: 100%;">5</a></div> 
                                            </div> 
                                        </i> 
                                </td> 
                            </tr> 
                        </table> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 




Please note that i am implementing this grid in MVC and please do not refer me to use Telerik MVC Grid.
Pavlina
Telerik team
 answered on 24 Jun 2010
2 answers
267 views
Hi,

I'm setting a menu using the "mega drop-down" sample. The menu and sitemap are working fine but I'd like to dynamically update a part of the menu items.

I'm binding some content from the siteMap on the left of the menuItem and, on the right, I want to dynamicall add some text:
 
                <telerik:RadMenuItem Text="Home" PostBack="false" CssClass="menuOff" ClickedCssClass="menuOn"  SelectedCssClass="menuOn" FocusedCssClass="menuOn" ExpandedCssClass="menuOn">  
                    <Items> 
                        <telerik:RadMenuItem CssClass="">  
                                <ItemTemplate> 
                                <div class="menuContent">  
                                        <div class="menuLeftPart">  
                                        <div id="menuSiteMap">  
                                             <telerik:RadSiteMap runat="server" ID="RadSiteMapHome" Skin=""  DataSourceID="RadSiteMapData0" Width="640px" CssClass="leSiteMap" EnableTheming="false">  
                                                <DefaultLevelSettings> 
                                                    <NodeTemplate> 
                                                        <a class="siteMapLink" href='<%# DataBinder.Eval(Container.DataItem, "url") %>'>  
                                                            <%# DataBinder.Eval(Container.DataItem, "title") %> 
                                                        </a>            
                                                    </NodeTemplate> 
                                                </DefaultLevelSettings>    
                                            </telerik:RadSiteMap> 
                                        </div> 
                                    </div> 
                                    <div class="menuRightPart">[Insert HTML code here dynamically]</div>                                     
                                </div> 
                            </ItemTemplate> 
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadMenuItem> 
I've tried using a "Label" but cannot access it from my code-behind (vb.net). Is it protected because it is inside the RadMenuItem ?

Thank you for your help.

Evelyne Schreiner
Top achievements
Rank 1
 answered on 24 Jun 2010
2 answers
92 views
hi,

How can i check that GridEditCommandColumn button is clicked or Add new Record button is clicked?
I want to bind different datasource in GridDropDownColumn when Add new record button is clicked and different when GridEditCommandColumn is clicked.

Thanks,
Rootvik.
Rootvik Pancholi
Top achievements
Rank 1
 answered on 24 Jun 2010
1 answer
180 views
Hi,

I am using Telerik AsyncUpload control, I am facing some problems when this control used in the user control.

 

protected

 

void RadAsyncUpload1_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs e)

 

{

 

try

 

{

Thumbnail.Width =

Unit.Pixel(100);

 

Thumbnail.Height =

Unit.Pixel(100);

 

 

byte[] imageData = new byte[e.File.InputStream.Length];

 

e.File.InputStream.Read(imageData, 0, (

int)e.File.InputStream.Length);

 

Thumbnail.DataValue = imageData;

Session[

"ImageData"] = imageData;

 

Session[

"ImageFileName"] = e.File.FileName;

 

}

 

catch (Exception ex)

 

{

lblError.Text = ex.Message.ToString();

lblError.Visible =

true;

 

}

}

 


//Script
function fileUploaded(sender, args) {

 

$find(

'RadAjaxManager1').ajaxRequest();

 

sender.deleteFileInputAt(0);

}


this script does not execute properly that's why the server side event RadAsyncUpload1_FileUploaded not execute, when i used this control in user control.

 

Please help.

Genady Sergeev
Telerik team
 answered on 24 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?