Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
137 views
I have a Master/Detail grid control and need some help with item style and alternating stlye row colors.  In my scenario the master/detail grid is always expanded and I would like each master/detail row to be the same colors.  So row 1 master/detail records would both be blue and row 2 master/detail would both be white and this would continue for the rest of the grid.  I've provided a screen shot with the current color scheme for reference.

Thanks
Shinu
Top achievements
Rank 2
 answered on 18 Sep 2010
1 answer
150 views
I have a simple two level hierarchical grid that has all items expanded in the PreRender event. This works fine.

What I'd like to do now is put all items in the detail table into edit mode.

Originally this was a flat grid and I used the grid's EditIndexes() array to add each data item's index as part of the grid's NeedDataSource event, however I can't find how to do this for a detail table. I tried mygrid.MasterTableView.DetailTables[0], but there's no EditIndexes() collection on the DetailTable.

Any suggestions?

Rob
Shinu
Top achievements
Rank 2
 answered on 18 Sep 2010
2 answers
154 views
hi, i was tried group bind on this sample..
http://www.telerik.com/help/aspnet-ajax/grouping-databound-items.html

i want change color of "Year : 2007" from green to black..
what should i do?
or it`s depend on skin?

Thanks in advance..

public void CallDummyData()
       {
           ChartSeries chartSeries = new ChartSeries();
           chartSeries.Name = "Sales";
           chartSeries.Type = ChartSeriesType.Bar;
 
           var dummy = new List<DummyData>
           {
               new DummyData { Year = 2007,Quarter = "Q1", Value = 5 },
               new DummyData { Year = 2007,Quarter = "Q2", Value = 2 },
               new DummyData { Year = 2007,Quarter = "Q3", Value = 3 },
               new DummyData { Year = 2007,Quarter = "Q4", Value = 1 },
               new DummyData { Year = 2008,Quarter = "Q1", Value = 2 },
               new DummyData { Year = 2008,Quarter = "Q2", Value = 5 },
               new DummyData { Year = 2008,Quarter = "Q3", Value = 6 },
               new DummyData { Year = 2008,Quarter = "Q4", Value = 2 }
           };
 
           RadChart1.DataGroupColumn = "Year";
           RadChart1.PlotArea.XAxis.DataLabelsColumn = "Quarter";
           RadChart1.Legend.Appearance.GroupNameFormat = "#NAME: #VALUE";
           RadChart1.DataSource = dummy;
           RadChart1.DataBind();
       }
Mochamad
Top achievements
Rank 1
 answered on 18 Sep 2010
1 answer
154 views
In your Tabstrip Application Scenarios Wizard example,
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/wizard/defaultcs.aspx 
you are doing:
public partial class DefaultCS : System.Web.UI.Page
   {
       protected void Page_Load(object sender, System.EventArgs e)
       {
           if (!Page.IsPostBack)
           {
               AddTab("Personal Info", true);
                 
               RadPageView pageView = new RadPageView();
               pageView.ID = "Personal";
               RadMultiPage1.PageViews.Add(pageView);
               AddTab("Education Info", false);
               AddTab("Professional Info", false);
           }
       }
         
       private void AddTab(string tabName, bool enabled)
       {
           RadTab tab = new RadTab(tabName);
           tab.Enabled = enabled;
           RadTabStrip1.Tabs.Add(tab);
       }
       protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
       {
           Control pageViewContents = LoadControl(e.PageView.ID + "CS.ascx");
           pageViewContents.ID = e.PageView.ID + "userControl";
           e.PageView.Controls.Add(pageViewContents);
       }

Is it possible to pass a variable to the user control when it loads without too much hacking?
A public property in the user control that I could use in the code above would be ideal.
I am currently using a session, but I want to convert the session to an encrypted Query string variable.
Each of the tabs needs access to the value and I would rather not have to write request.querystring code into each tabbed page.
Atlas
Top achievements
Rank 1
 answered on 18 Sep 2010
2 answers
165 views
Hello,

I'm following the Wizard demo to create a Wizard using RadTabStrip and RadMultiPage. I have a RadComboBox that the user will select a value from that needs to be passed to each control as it is loaded so that the correct data is loaded/saved. Normally I would have the control declared on the page and then just set the properties in code, ie:

Normally the control is declared in markup like this:
<MyControls:GroupSelector runat="server" id="GroupSelectorControl"
GroupSelector.GroupNumber = "0003" 
Then I would just set the property in code like the above snippet...

However, with the Wizard example the controls are being dynamically loaded so I'm not sure how to pass what the user has selected from the RadComboBox to the individual controls that populate the tabs. I suppose I could use a session variable but would prefer to just set a property on the control so the control is more reusable.

Thanks!
Atlas
Top achievements
Rank 1
 answered on 18 Sep 2010
2 answers
80 views
Hi,

I use a radgrid client selection of records. By clicking a delete button in a radtoolbar opens a popup window with another radgrid.
I need to capture only those clients selected records and use them in the popup radgrid datasource.
Using ClientEvents OnRowSelected / OnRowDeselected I managed to successfully store a javascript  global variable array  with IDs of the selections and delete when they are deselected.
I need help accessing this global variable in the popup window that is appears as zero.

Anyone know how to do this or know of another technique that is not using cookies?

Thanks a lot.
Roberto.
Roberto
Top achievements
Rank 1
 answered on 17 Sep 2010
9 answers
503 views
I have a bit of a strange situation wherein I need to set the CssClass of the nodes I'm creating and I need to set the fore- and background colours.

I need to set the CssClass to override the visual hovered and selected class effects. Basically, I need to make it look as if you can't click on certain nodes (I've already dealt with the JS side so actually clicking on the node does nothing).

At the same time I need to colour each node according to same data values.

The problem I have is that the CssClass I'm using to prevent the hover/select effects showing need to have both the foreground and background colours defined using the !important modifier and this overrides the colour settings added in the style attribute when the node renders. I need to have the node's color and background-color values rendered with the !important modifier.

I know I'm asking have my cake and eat it, but if it is at all possible to manage this, I'd appreciate a pointer.

-- 
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 17 Sep 2010
2 answers
558 views
I'm trying to suppress the display of columns in the master table and in detail grids in the PreRender event. This is as suggested in other Telerik responses to postings. The master table behaves as expected, but the detail tables do not suppress their columns. The code is below:

protected void RadGridLot_PreRender(object sender, EventArgs e)
{
    switch (RadComboBoxFilter.SelectedItem.Value)
    {
        case WECOBLL.WECODefs.sLotOpen:
            RadGridLot.MasterTableView.GetColumn("AddJob").Visible = true;
            RadGridLot.MasterTableView.DetailTables[0].GetColumn("Action1").Visible = true;
            RadGridLot.MasterTableView.DetailTables[0].GetColumn("Action2").Visible = true;
            RadGridLot.MasterTableView.DetailTables[0].GetColumn("Form1").Visible = true;
            RadGridLot.MasterTableView.GetColumn("OutgoingNetWeightTotal").Visible = false;
            break;
        case WECOBLL.WECODefs.sLotShipped:
            RadGridLot.MasterTableView.GetColumn("AddJob").Visible = false;
            RadGridLot.MasterTableView.DetailTables[0].GetColumn("Action1").Visible = true;
            RadGridLot.MasterTableView.DetailTables[0].GetColumn("Action2").Visible = false;
            RadGridLot.MasterTableView.DetailTables[0].GetColumn("Form1").Visible = true;
            RadGridLot.MasterTableView.GetColumn("OutgoingNetWeightTotal").Visible = true;
            break;
        case WECOBLL.WECODefs.sLotClosed:
            RadGridLot.MasterTableView.GetColumn("AddJob").Visible = false;
            RadGridLot.MasterTableView.DetailTables[0].GetColumn("Action1").Visible = false;
            RadGridLot.MasterTableView.DetailTables[0].GetColumn("Action2").Visible = false;
            RadGridLot.MasterTableView.DetailTables[0].GetColumn("Form1").Visible = true;
            RadGridLot.MasterTableView.GetColumn("OutgoingNetWeightTotal").Visible = true;
            break;
    }
}

and the markup:

<telerik:RadGrid ID="RadGridLot" runat="server"
            DataSourceID="ObjectDataSourceLots" GridLines="None"
            ondetailtabledatabind="RadGridLot_DetailTableDataBind"
            AllowAutomaticInserts="True" AutoGenerateColumns="False"
            oninsertcommand="RadGridLot_InsertCommand" Skin="Web20"
            onitemcommand="RadGridLot_ItemCommand" onprerender="RadGridLot_PreRender"
            AllowSorting="True" onneeddatasource="RadGridLot_NeedDataSource"
            onitemcreated="RadGridLot_ItemCreated">
            <ClientSettings>
                <Scrolling AllowScroll="True" ScrollHeight="600px" />
            </ClientSettings>
            <MasterTableView
                DataSourceID="ObjectDataSourceLots" DataKeyNames="Name,Id"
                CommandItemDisplay="Top" AllowNaturalSort="False"
                HierarchyDefaultExpanded="True">
            <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
                <DetailTables>
                    <telerik:GridTableView Name="Jobs" runat="server"
                        DataSourceID="ObjectDataSourceJobs" DataKeyNames="Id"
                        NoDetailRecordsText="No Jobs to display." BackColor="#FFFFCC"  >
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <DetailTables>
                            <telerik:GridTableView runat="server" Name="Bins" DataKeyNames="Id"
                                NoDetailRecordsText="No Bins to display.">
                            <CommandItemSettings></CommandItemSettings>
                            <Columns>
                                <telerik:GridTemplateColumn DataField="Id" DataType="System.Int64"
                                    HeaderText="Job Id" SortExpression="Id" UniqueName="Id"
                                    Visible="False">
                                    <ItemTemplate>
                                        <asp:Label ID="JobIdLabel" runat="server" Text='<%# Eval("Id") %>'></asp:Label>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="Name" HeaderText="Bin"
                                    SortExpression="Name" UniqueName="Name">
                                </telerik:GridBoundColumn>
                                <telerik:GridNumericColumn DataField="AverageMoistureAsFraction" DataType="System.Double"  DataFormatString="{0:P1}"
                                    HeaderText="Avg. Moisture" SortExpression="AverageMoistureAsFraction" UniqueName="JobAverageMoistureAsFraction">
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridNumericColumn>
                                <telerik:GridCheckBoxColumn DataField="DoorIsOpen" DataType="System.Boolean" HeaderText="Door Open" UniqueName="DoorisOpen" >
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridCheckBoxColumn>
                                <telerik:GridCheckBoxColumn DataField="IsManual" DataType="System.Boolean" HeaderText="Manual" UniqueName="IsManual" >
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridCheckBoxColumn>
                            </Columns>
                            </telerik:GridTableView>
                        </DetailTables>
 
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
 
                        <ExpandCollapseColumn Visible="True">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridTemplateColumn DataField="Id" DataType="System.Int64"
                                HeaderText="Job Id" SortExpression="Id" UniqueName="Id"
                                Visible="False">
                                <ItemTemplate>
                                    <asp:Label ID="JobIdLabel" runat="server" Text='<%# Eval("Id") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="JobRefFormatted" HeaderText="Job Reference"
                                SortExpression="JobRefFormatted" UniqueName="JobRefFormatted">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="JobStage" HeaderText="Stage"
                                SortExpression="JobStage" UniqueName="JobStage">
                            </telerik:GridBoundColumn>
                            <telerik:GridDateTimeColumn DataField="StartTime" DataType="System.DateTime"  DataFormatString="{0:MM/dd hh:mm tt}"
                                HeaderText="StartTime" SortExpression="StartTime" UniqueName="StartTime">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridNumericColumn DataField="JobAverageMoistureAsFraction" DataType="System.Double"  DataFormatString="{0:P1}"
                                HeaderText="Avg. Moisture" SortExpression="JobAverageMoistureAsFraction" UniqueName="JobAverageMoistureAsFraction">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" />
                            </telerik:GridNumericColumn>
                            <telerik:GridBoundColumn DataField="OutgoingReceiptNumber" HeaderText="Ship Receipt #"
                                SortExpression="OutgoingReceiptNumber" UniqueName="OutgoingReceiptNumber">
                            </telerik:GridBoundColumn>
                            <telerik:GridButtonColumn CommandName="Action1" UniqueName="Action1" Text="" ></telerik:GridButtonColumn>
                            <telerik:GridButtonColumn CommandName="Action2" UniqueName="Action2" Text="" ></telerik:GridButtonColumn>
                            <telerik:GridButtonColumn CommandName="Form1" UniqueName="Form1" Text="" ></telerik:GridButtonColumn>
                      </Columns>
                    </telerik:GridTableView>
                </DetailTables>
                <CommandItemSettings AddNewRecordText="Enter New Lot"
                    ShowRefreshButton="False" />
                <ExpandCollapseColumn >
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridTemplateColumn DataField="LocationId" DataType="System.Int64"
                        HeaderText="LocationId" SortExpression="LocationId" UniqueName="LocationId"
                        Visible="False">
                        <ItemTemplate>
                            <asp:Label ID="LocationIdLabel" runat="server" Text='<%# Eval("LocationId") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="LotRefFormatted" HeaderText="Lot Reference"
                        SortExpression="LotRefFormatted" UniqueName="LotRefFormatted">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Grower" HeaderText="Grower"
                        SortExpression="Grower" UniqueName="Grower">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Variety" HeaderText="Variety"
                        SortExpression="Variety" UniqueName="Variety">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Field" HeaderText="Block"
                        SortExpression="Field" UniqueName="Field">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="EstimatedNumberOfBins"
                        DataType="System.Int64" HeaderText="Est. # Of Bins"
                        SortExpression="EstimatedNumberOfBins" UniqueName="EstimatedNumberOfBins">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn DataField="Id" DataType="System.Int64"
                        HeaderText="Id" SortExpression="Id" UniqueName="Id" Visible="False">
                        <ItemTemplate>
                            <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="Name" HeaderText="Name"
                        SortExpression="Name" UniqueName="Name" Visible="False">
                        <ItemTemplate>
                            <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridNumericColumn DataField="OutgoingNetWeightTotal" DataType="System.Double" 
                        HeaderText="Outgoing Net Wt." SortExpression="OutgoingNetWeightTotal" UniqueName="OutgoingNetWeightTotal">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridNumericColumn>
                    <telerik:GridBoundColumn DataField="ReceivedOn" DataType="System.DateTime"   DataFormatString="{0:MM/dd hh:mm tt}"
                        HeaderText="Received On" SortExpression="ReceivedOn" UniqueName="ReceivedOn">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn CommandName="EditLot" UniqueName="EditLot" Text="Edit Lot" ></telerik:GridButtonColumn>
                    <telerik:GridButtonColumn CommandName="AddJob" UniqueName="AddJob" Text="Create Job" ></telerik:GridButtonColumn>
                </Columns>
                <CommandItemTemplate>
                    <asp:Button ID="ButtonInsert" runat="server" Text="+"  OnClientClick="return ShowInsertLotForm();" />
                    <a href="#" onclick="return ShowInsertLotForm();">Add New Lot</a>
                </CommandItemTemplate>
            </MasterTableView>
        </telerik:RadGrid>

Thanks, Steve
neebs
Top achievements
Rank 2
 answered on 17 Sep 2010
3 answers
144 views
I want Insert a radInput on client-side, also can insert the other radcontrols on client-side, How?
help...
thank you!
Scott R
Top achievements
Rank 1
 answered on 17 Sep 2010
1 answer
92 views
Hello,

I modified the height of the default menu and it works great.  The problem is that the vertical bar separator is still the old height.  I can't seem to change it to match the new menu height.

I attached the screenshot to make it clear what my problem is.

Thanks
Kamen Bundev
Telerik team
 answered on 17 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?