Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
163 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
174 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
83 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
525 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
573 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
155 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
98 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
3 answers
101 views
Hello guys,
we followed the demo and the other examples about cusotm filter templates and did everything so far well, until one last important point.
We have 5 columns and the last one has a filter template, actually a radcombobox:
    LINK
Now the problem, our input are not kept from one column to the other, why? How to control it?
First we enter let say "A" in the 1st column, the grid is well filtered and we can still see "A" in the filter header. Good.
Next we enter "B" in the 2nd column. The Grid is again well filtered, BUT "A" is gone and we can only see "B".
Next we select "OK" from the last column (radcombobox). The Grid is again well filtered, BUT "B" is gone and we can only see "OK".
So finally, we can only see the last input in the filter header, but the filter expression of the grid contains 3 inputs.
Why are they masked? How to make them visible again? What did we missed in our code?
In other words... HELP!

Here some code:

 

 

 

Thank you

 

 

 

 

Fresh
Top achievements
Rank 1
 answered on 17 Sep 2010
4 answers
151 views
Hello guys,
we actually bought the new RadGrid and it's our first time to deal with it.
We have a RadGrid with winodws7 skin and when with drop a column to the header group, the Grid doesn't look good.
Here the screenshots (they are also attached):
  • before grouping: link
  • after grouping: link

Here the declaration:
<telerik:RadGrid runat="server" ID="GridProjectListRad" Skin="Windows7" AutoGenerateColumns="False" AllowSorting="true" Width="100%" AllowFilteringByColumn="true" AllowPaging="true" PageSize="10" ShowHeader="true" ShowFooter="false" ShowGroupPanel="true" > <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"> <Selecting AllowRowSelect="True"></Selecting> <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="False"></Resizing>

 

<Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="True" FrozenColumnsCount="1"></Scrolling>

 

</ClientSettings> <HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu> <ExportSettings IgnorePaging="true" OpenInNewWindow="true"> </ExportSettings> <GroupingSettings ShowUnGroupButton="false" />
<MasterTableView DataKeyNames="ProjectUID" AutoGenerateColumns="false" CommandItemDisplay="Bottom" AllowMultiColumnSorting="true" AllowFilteringByColumn="True" > <RowIndicatorColumn Visible="True"></RowIndicatorColumn>  

 

 

 

<Columns>

 

<telerik:GridHyperLinkColumn HeaderText="ProjectName" UniqueName="ProjectName" DataTextField="ProjectName"

 

SortExpression="ProjectName" HeaderStyle-Width="40%" FilterControlWidth="95%" />

 

<telerik:GridBoundColumn HeaderText="ProjectLeader" DataField="ProjectLeader" UniqueName="ProjectLeader"

 

SortExpression="ProjectLeader" HeaderStyle-Width="15%" FilterControlWidth="85%" />

 

<telerik:GridDateTimeColumn HeaderText="LastReport" DataField="LastReport" UniqueName="LastReport" SortExpression="LastReport" HeaderStyle-Width="15%" FilterControlWidth="85%" /> <telerik:GridBoundColumn HeaderText="LastModifiedBy" DataField="LastModifiedBy" UniqueName="LastModifiedBy" SortExpression="LastModifiedBy" HeaderStyle-Width="15%" FilterControlWidth="85%" />  

<telerik:GridBoundColumn HeaderText="Status" DataField="Status" UniqueName="Status"

SortExpression="Status" HeaderStyle-Width="15%" FilterControlWidth="85%" ReadOnly="true" > <FilterTemplate> <telerik:RadComboBox runat="server" ID="FilterComboStatus" AutoPostBack="true" Filter="Contains" Skin="Windows7" Width="99%" OnSelectedIndexChanged="FilterComboStatus_SelectedIndexChanged"  

OnClientLoad="OnClientSelectedIndexChangedHandler" > </telerik:RadComboBox> </FilterTemplate> 

<HeaderStyle HorizontalAlign="Center"></HeaderStyle> <ItemStyle HorizontalAlign="Center"></ItemStyle> </telerik:GridBoundColumn>

 

 

</Columns>

</MasterTableView> <SortingSettings EnableSkinSortStyles="false" /> </telerik:RadGrid>

So, did we miss something? Why does the RadGrid look so bad after grouping?
Plus, how to allow multi grouping? Because each time we drop a column in the group header, it will replace the older one.

Thank you
William

Fresh
Top achievements
Rank 1
 answered on 17 Sep 2010
3 answers
113 views
I'm binding a radMenu to database data. I'm setting my DataNavigateUrlField to "MenuLink" field. for the most part, the MenuLink field simply contains page names, i.e. Default.aspx, page1.aspx, etc. I have one  that I wish to link to an external site, i.e. http://www.google.com, but when i set this item's MenuLink field to http://www.google.com, on binding of the menu it throws an error:

'~/http://www.google.com' is not a valid virtual path.

obviously it's automatically putting the ~ symbol. how do i get it to not do this?

Thanks.
Paul J
Top achievements
Rank 1
 answered on 17 Sep 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?