Hello,
As I moving through records in a table, I am able to see the records in my messagebox, but unable to see them in my combobox, how do I fix this problem?
If currentIndex < dtDonor.Rows.Count - 1 Then
currentIndex += 1
Session(
"CurrentIndex") = currentIndex
C1CountryOrigin.Text = dtDonor.Rows(currentIndex).Item(
"CountryOrigin")
MsgBox(dtDonor.Rows(currentIndex).Item(
"CountryOrigin"))
End If

I have created a dynamic grid in one of my forms that I am binding to a Datatable. What I want to know is how to add a Delete column, Iv enabled AllowAutomaticDeletes on my gridhow can I dynamically add a GridButtonColumn (its what I have used in all other pages in the app) and assign it to be the Right most column in the grid. I am adding it in my LoadGrid function, please look at the code, it adds column to the left side of all the columns that are generated and also does not show the Delete image called by the css class "MyImageButton" ??
DeleteColumn.ItemStyle.CssClass =
"MyImageButton";
I also added code to rebind to the grid in the NeedDataSource event as I read that for dynamically generated grids, the grid needs to be pulled from this event as well. But im adding the GridButtonColumn in the LoadGrid function only and this is called on (!Page.IsPostback). Can someone please tell me the correct way of adding a GridButtonColumn to a dynamically generated grid and how to get the correct order, the right most column and also any insight as to why the "MyImageButton" is not being loaded from codebehind? its working fine on other pages where i define all columns in the aspx page. Please let me know, your helps appreciated.
private void LoadGrid() { try { GridButtonColumn DeleteColumn = new GridButtonColumn(); ProuductsGrid.Columns.Add(DeleteColumn); DeleteColumn.ButtonType = GridButtonColumnType.ImageButton; DeleteColumn.Text = "Delete"; DeleteColumn.ConfirmDialogType = GridConfirmDialogType.RadWindow; DeleteColumn.ConfirmTitle = "Delete"; DeleteColumn.ConfirmText = "Delete this Product?"; DeleteColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center; DeleteColumn.ItemStyle.CssClass = "MyImageButton"; ProductBL bl = new ProductBL(); ProuductsGrid.DataSource = bl.GetProductsByClient((Int32)Session["ClientID"]); Product.DataBind(); } } protected void ProductGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { try { ProductBL bl = new ProductBL(); ProuductsGrid.DataSource = bl.GetProductsByClient((Int32)Session["ClientID"]); Product.DataBind(); } catch (Exception ex) { throw; } } }
<telerik:RadGrid ID="RadGrid1" runat="server" ... > ... <MasterTableView ...> ... <EditFormSettings EditFormType="Template"> <EditColumn UniqueName="EditCommandColumn1"></EditColumn> <FormTemplate> <table class="edit-table-rad" cellspacing="2" cellpadding="1" width="100%" border="0"> ... <tr> <td align="left" width="200px"> <b>Languages:</b><br /> <asp:CheckBox ID="chbSelectAllLanguage" runat="server" Text="Select All" ClientIDMode="Static"/> </td> <td> <asp:CheckBoxList ID="cblLanguage" runat="server" DataSourceID="entityDataSourceLanguage" DataTextField="LanguageName" DataValueField="LanguageID" RepeatColumns="4"> </asp:CheckBoxList> </td> </tr> ... </table> </FormTemplate> </EditFormSettings> </MasterTableView></telerik:RadGrid>CheckBox with jQuery by ID or cssclass, but I think that the CheckBox in the RadGrid's FormTemplate is not in the DOM at document.ready time.CheckBoxList items by selecting/deselecting the single CheckBox in the FormTemplate?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then Dim tabSummary As New RadTab() tabSummary.Text = "Summary" tabSummary.NavigateUrl = "~/Funds/fundSummary.aspx?feederFundID=" & Request.QueryString("feederFundID") tabSummary.Enabled = True rtsFundTopNav.Tabs.Add(tabSummary) Dim tabProfile As New RadTab() tabProfile.Text = "Profile" tabProfile.NavigateUrl = "~/Funds/fundProfile.aspx?feederFundID=" & Request.QueryString("feederFundID") rtsFundTopNav.Tabs.Add(tabProfile) Dim tabPerformance As New RadTab() tabPerformance.Text = "Performance" tabPerformance.NavigateUrl = "~/Funds/fundPerformance.aspx?feederFundID=" & Request.QueryString("feederFundID") tabPerformance.Enabled = False rtsFundTopNav.Tabs.Add(tabPerformance) Dim tabRisk As New RadTab() tabRisk.Text = "Risk" tabRisk.NavigateUrl = "~/Funds/fundRisk.aspx?feederFundID=" & Request.QueryString("feederFundID") rtsFundTopNav.Tabs.Add(tabRisk) Dim tabPortfolio As New RadTab() tabPortfolio.Text = "Portfolio" tabPortfolio.NavigateUrl = "~/Funds/fundPortfolio.aspx?feederFundID=" & Request.QueryString("feederFundID") tabPortfolio.Enabled = False rtsFundTopNav.Tabs.Add(tabPortfolio) Dim tabExposure As New RadTab() tabExposure.Text = "Exposure" tabExposure.NavigateUrl = "~/Funds/fundExposure.aspx?feederFundID=" & Request.QueryString("feederFundID") tabExposure.Enabled = False tabExposure.IsBreak = True rtsFundTopNav.Tabs.Add(tabExposure) Dim tabFundReports As New RadTab() tabFundReports.Text = "Fund Reports" tabFundReports.NavigateUrl = "~/Funds/fundReports.aspx?feederFundID=" & Request.QueryString("feederFundID") rtsFundTopNav.Tabs.Add(tabFundReports) Dim tabFundDocuments As New RadTab() tabFundDocuments.Text = "Fund Documents" tabFundDocuments.NavigateUrl = "~/Funds/fundDocuments.aspx?feederFundID=" & Request.QueryString("feederFundID") rtsFundTopNav.Tabs.Add(tabFundDocuments) Dim tabContacts As New RadTab() tabContacts.Text = "Contacts" tabContacts.NavigateUrl = "~/Funds/fundContacts.aspx?feederFundID=" & Request.QueryString("feederFundID") rtsFundTopNav.Tabs.Add(tabContacts) Dim tabCommunications As New RadTab() tabCommunications.Text = "Calls and Meetings" tabCommunications.NavigateUrl = "~/Funds/fundCommunications.aspx?feederFundID=" & Request.QueryString("feederFundID") rtsFundTopNav.Tabs.Add(tabCommunications) Dim tabTasks As New RadTab() tabTasks.Text = "Tasks" tabTasks.NavigateUrl = "~/Funds/fundTasks.aspx?feederFundID=" & Request.QueryString("feederFundID") rtsFundTopNav.Tabs.Add(tabTasks) Dim tabHistory As New RadTab() tabHistory.Text = "History" tabHistory.NavigateUrl = "~/Funds/fundHistory.aspx?feederFundID=" & Request.QueryString("feederFundID") rtsFundTopNav.Tabs.Add(tabHistory) Dim tabAccounting As New RadTab() tabAccounting.Text = "Accounting" tabAccounting.NavigateUrl = "~/Funds/fundAccounting.aspx?feederFundID=" & Request.QueryString("feederFundID") tabAccounting.IsBreak = True rtsFundTopNav.Tabs.Add(tabAccounting) '-------------------------------------------------- 'Tabs in Question '-------------------------------------------------- Dim tabInitialIDD As New RadTab() tabInitialIDD.Text = "Initial DD (Inv)" tabInitialIDD.NavigateUrl = "~/Funds/MasterFunds/DueDiligence/initialIDD.aspx?masterFundID=" & masterFundID rtsFundTopNav.Tabs.Add(tabInitialIDD) Dim tabRatings As New RadTab() tabRatings.Text = "Ratings" tabRatings.NavigateUrl = "~/Funds/MasterFunds/DueDiligence/ratingSummary.aspx?masterFundID=" & masterFundID tabRatings.Enabled = True rtsFundTopNav.Tabs.Add(tabRatings) '--------------------------------------------------- Dim tabAFSReviews As New RadTab() tabAFSReviews.Text = "AFS Reviews" tabAFSReviews.NavigateUrl = "~/Funds/DueDiligence/afsReviews.aspx?feederFundID=" & Request.QueryString("feederFundID") tabAFSReviews.Enabled = False rtsFundTopNav.Tabs.Add(tabAFSReviews) Dim tabInitialODD As New RadTab() tabInitialODD.Text = "Initial DD (Ops)" tabInitialODD.NavigateUrl = "~/Funds/DueDiligence/initialODD.aspx?feederFundID=" & Request.QueryString("feederFundID") If fundType <> "Private Equity" And fundType <> "Hedge Fund" Then tabInitialODD.Enabled = False End If rtsFundTopNav.Tabs.Add(tabInitialODD) Dim tabOngoingDD As New RadTab() tabOngoingDD.Text = "Ongoing DD (Ops)" tabOngoingDD.NavigateUrl = "~/Funds/DueDiligence/ongoingODD.aspx?feederFundID=" & Request.QueryString("feederFundID") rtsFundTopNav.Tabs.Add(tabOngoingDD) If IsNumeric(Request.QueryString("selectedTab")) Then rtsFundTopNav.SelectedIndex = Request.QueryString("selectedTab") Else rtsFundTopNav.SelectedIndex = 0 End If End If Else Response.Clear() Response.Redirect("../default.aspx") Response.End() End IfEnd SubPublic WriteOnly Property activeTab() As String Set(ByVal value As String) rtsFundTopNav.Tabs.FindTabByText(value).Selected = True End SetEnd Property<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %><div class="announcementHeader"> <asp:Label runat="server" ID="lblFundLegalName" /></div><telerik:RadTabStrip ID="rtsFundTopNav" runat="server" />