Hello All,
I want to bind the data dynamically to the RadGrid control [Columns would be known at the run time only] .
The Data Source for the RadGridView is a Generic List Collection of “OperatingCondition”.
public class OperatingCondition
{
public OperatingCondition(int stage)
{
this.Actual = new string[stage];
this.Theoritical = new string[stage];
}
public string OpCondtition { get; set;}
public string[] Actual { get ; set; }
public string[] Theoritical{ get; set;}
}
Actual and Theoritical coulmns has to created based on the number of stages. Eg: If the stage is 3, then grid should show the 3 Actual and Theoritical values as columns in the grid and each Actual and Theoritical column headers should be grouped to show the stage number.
Please suggest how to bind this datasource to the grid.
| <asp:UpdatePanel ID="upnlGrid4" runat="server" > |
| <ContentTemplate> |
| <telerik:RadGrid ID="gvFirmInfo" runat="server" Width="550px"> |
| <MasterTableView EditMode="PopUp" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add Location" |
| ShowHeadersWhenNoRecords="true" ShowHeader="false" |
| NoMasterRecordsText="information is not available. <br/> Please click 'Add Location' to add the contact information for each location" |
| AlternatingItemStyle-BackColor="White" AlternatingItemStyle-BorderStyle="Solid" |
| AlternatingItemStyle-BorderWidth="1px" AlternatingItemStyle-BorderColor="#C9C4D1" |
| ItemStyle-BackColor="#E0E0E0" ItemStyle-BorderColor="#FFFFFF" ItemStyle-BorderStyle="Solid" |
| ItemStyle-BorderWidth="0px" BorderColor="#C9C4D1" BorderWidth="1px" BorderStyle="Solid" GridLines="None"> |
| <EditFormSettings InsertCaption="Add Location" CaptionDataField="" PopUpSettings-Modal="true"/> |
| <Columns> |
| <telerik:GridBoundColumn DataField="rowId" HeaderText="Row ID" UniqueName="rowId" |
| Visible="False" EditFormColumnIndex="-1"> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn"> |
| <ItemTemplate> |
| <asp:CheckBox id="ChkDelete" AutoPostBack="false" runat="server"></asp:CheckBox> |
| <asp:Label runat="server" Text="Delete Location"></asp:Label> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridButtonColumn CommandName="Edit" Text="Edit" UniqueName="columnEdit" ItemStyle-Width="35px"> |
| </telerik:GridButtonColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| </ContentTemplate> |
| </asp:UpdatePanel> |
| Protected Sub gvFirmInfo_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles gvFirmInfo.NeedDataSource |
| Dim sqlString As String = "" |
| Dim sqlparam(2) As SqlParameter |
| Dim ds As New DataSet |
| Dim dr As SqlDataReader = Nothing |
| Try |
| Conn = New SqlConnection(ConfigurationManager.ConnectionStrings("****").ConnectionString) |
| Conn.Open() |
| SetParam(sqlparam(0), "@recId", Data.SqlDbType.Int, 4, m_rec_id) |
| SetParam(sqlparam(1), "@recType", Data.SqlDbType.Char, 2, m_rec_type) |
| sqlString = "select...***" |
| ds = SqlHelper.ExecuteDataset(Conn, Data.CommandType.Text, sqlString, sqlparam) |
| gvFirmInfo.DataSource = ds |
| Catch ex As Exception |
| '***** |
| End Try |
| <cc1:AdesaGrid ID="grdAnnouncements" runat="server" OnNeedDataSource="grdAnnouncements_NeedDataSource" |
| AllowPaging="True" PagerStyle-Mode="NextPrevAndNumeric" PagerStyle-Position="Bottom" ShowFooter="True" AllowMultiRowEdit="True" OnItemDataBound="grdAnnouncements_ItemDataBound" |
| OnPreRender="grdAnnouncements_PreRender" OnItemCommand="grdAnnouncements_ItemCommand" |
| OnItemCreated="grdAnnouncements_ItemCreated" AutoGenerateColumns="False" CssClass="headercenter" |
| EnableEmbeddedSkins="False" GridLines="None" Skin="TelerikDataGridB" Width="920px"> |
| <HeaderContextMenu EnableEmbeddedSkins="False"> |
| </HeaderContextMenu> |
| <MasterTableView DataKeyNames="MVDAID" EditMode="InPlace" CommandItemDisplay="Bottom"> |
| <NoRecordsTemplate> |
| <div> |
| There are no records to display</div> |
| </NoRecordsTemplate> |
| <Columns> |
| <telerik:GridBoundColumn DataField="MVDAID" HeaderText="MVDAID" ReadOnly="True" UniqueName="MVDAID" |
| Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Name" HeaderText="Announcement" UniqueName="Name" ReadOnly="true"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Amount" HeaderText="Amount" UniqueName="Amount" |
| ReadOnly="true"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Date" DataFormatString="{0:d}" DataType="System.DateTime" HeaderText="Date" UniqueName="Date" ReadOnly="true"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Comment" HeaderText="Comment" UniqueName="Comment" |
| ReadOnly="true"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="RepairDescription" DataType="System.String" HeaderText="Repair Description" |
| UniqueName="RepairDescription" ReadOnly="true"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Province" DataType="System.String" HeaderText="Province" UniqueName="Province" |
| ReadOnly="true"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="LastKnownDate" DataFormatString="{0:d}" DataType="System.DateTime" HeaderText="TKU Date" UniqueName="LastKnownDate" |
| ReadOnly="true"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="LastKnownAmount" HeaderText="TKU" |
| UniqueName="LastKnownAmount" ReadOnly="true"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Source" HeaderText="Source" ReadOnly="true" UniqueName="Source"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="User" HeaderText="User" ReadOnly="True" UniqueName="User"> |
| </telerik:GridBoundColumn> |
| <telerik:GridCheckBoxColumn DataField="Active" DataType="System.Boolean" HeaderText="Active" |
| UniqueName="Active"> |
| </telerik:GridCheckBoxColumn> |
| <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" /> |
| </Columns> |
| <CommandItemTemplate> |
| <asp:Button runat="server" ID="Save" Text="Save" CommandName="Save" CausesValidation="false" /></CommandItemTemplate> |
| </MasterTableView> |
| </cc1:AdesaGrid> |

| function CustComboBoxDropDownOpeningHandler(sender, args) |
| { |
| .... [code]... |
| if (event.type == "propertychange") |
| args.set_cancel(true); |
| ..... [code].... |
| } |
| SelectedImageUrl="~/IMG/imgHome.gif" |
I know for a fact that this image can be found for the menuItem, because, if I assign it to “imageUrl”, then it works.
Any ideas, I’d have thought that this would have been fairly simple.
Thanks,
yogi
If, in Opera, you create a new event on the Scheduler demo page and the invoke a calendar popup and click on the "title & navigation popup zone" the resulting window is hidden behind the calendar itself (see attached screen shot).
--
Stuart