Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
205 views
I'm looking for an easy way to loop thru and address all texts in a grid to create multiple language support by fetching texts in users language from DB:
- AddNewRecordText in CommandItemSettings
- CancelText, UpdateText and InsertText in EditColumn
- EditText in GridEditCommandColumn
and HeaderText in all columns.

For all other controls on the page, I loop thru the controls like this: 
    protected void Page_PreRender(object sender, EventArgs e)
    {
        foreach (Control ctrl in Page.Controls)
        {
            findCtrl(ctrl);
        }
    }

    protected void FormView_DataBound(object sender, EventArgs e)
    {
        foreach (Control ctrl in FormView.Controls)
        {
            findCtrl(ctrl);
        }
    }

    public void findCtrl(Control ctrlTry)
    {
        if (ctrlTry.HasControls()) // if the control contrains other controls
        {
            if (ctrlTry.ID != null && ctrlTry.ID != "") // control has a ID-name
            {
                Response.Write(ctrlTry.ID + "<BR>");
            }

            foreach (Control lastCtrl in ctrlTry.Controls)
            {
                findCtrl(lastCtrl);
            }
        }
        else
        {
            if (ctrlTry.ID != null && ctrlTry.ID != "")
            {
                Response.Write(ctrlTry.ID + "<BR>");

            }
        }
    }
and use the controls ID to fetch the text from the DB.
But this approach doesn't work on texts in a grid.

Any ideas for multiple language support in grids using lookup i DB?

Yavor
Telerik team
 answered on 18 Mar 2010
1 answer
349 views
Hi,

I am trying to expand all the hierarchy items in the grid from the server side. I was able to expand the mastertableview rows to display the detail table. Each row in the detail table can expand to display the nested view. I am not able to get these rows expanded. Below is my aspx code for the grid

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" Width="700px"  
            AllowMultiRowSelection="true"> 
            <MasterTableView HierarchyLoadMode="ServerBind" GroupLoadMode="Server" Width="700px"  
                DataKeyNames="ActionId" TableLayout="Fixed" Name="Actions" CommandItemDisplay="Top"> 
                <CommandItemTemplate> 
                    <asp:Button ID="btnExpandOrCollapse" runat="Server" Text="Expand or Collapse" CommandName="expandallcollapseall" /> 
                </CommandItemTemplate>                 
                <Columns> 
                    <telerik:GridBoundColumn DataField="ActionName" HeaderText="Action"></telerik:GridBoundColumn> 
                    <telerik:GridTemplateColumn> 
                        <ItemTemplate> 
                            <telerik:RadRating ID="RadRating1" runat="server" Value="3" ReadOnly="true" Precision="Exact" /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                </Columns> 
                <DetailTables>                     
                    <telerik:GridTableView DataKeyNames="StepId" Name="Steps" Width="100%"> 
                        <ParentTableRelation> 
                            <telerik:GridRelationFields DetailKeyField="ActionId" MasterKeyField="ActionId" /> 
                        </ParentTableRelation> 
                        <Columns> 
                            <telerik:GridBoundColumn DataField="StepName" HeaderText="Step" DefaultInsertValue="" UniqueName="StepName"></telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="StartDate" HeaderText="Start date" DefaultInsertValue="" UniqueName="StartDate"></telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="StartedBy" HeaderText="Completed by" DefaultInsertValue="" UniqueName="StartedBy"></telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="HRApproval" HeaderText="HR Approval" DefaultInsertValue="" UniqueName="HRApproval"></telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="CommunicatedToEE" HeaderText="Communicated to employee" DefaultInsertValue="" UniqueName="Communicatedtoee"></telerik:GridBoundColumn> 
                        </Columns>           
                        <NestedViewTemplate> 
                        <asp:Panel ID="pnlTesting" runat="server"> 
                            <div style="width:25px;float:left"></div> 
                            <div style="float:left;"> 
                                <asp:HiddenField ID="hStepId" runat="Server" Value='<%# DataBinder.Eval(Container.DataItem, "StepId") %>' /> 
                                <uc1:QuestionAndAnswerV1 ID="qa" runat="server" Skin="QAList" EnableEmbeddedSkins="false" /> 
                            </div>                         
                        </asp:Panel>                                                                   
                        </NestedViewTemplate>                         
                    </telerik:GridTableView>                     
                </DetailTables>                                 
                <ExpandCollapseColumn Visible="True"> 
                </ExpandCollapseColumn> 
            </MasterTableView> 
            <ClientSettings> 
                <Scrolling SaveScrollPosition="true" /> 
            </ClientSettings> 
        </telerik:RadGrid> 

Princy
Top achievements
Rank 2
 answered on 18 Mar 2010
1 answer
139 views
Hi,

I have a really small-sized chart (line graph) and I set the font size for the axis item label to 6.(Times New Roman).
However, it seems that it becomes too blur(because radchart is an image).
Rotating the labels did not help either.

My solution is to skip alternate axis item labels but this did not really work out as each axis item label cannot use the space left behind by an adjacent axis item label. A font-size 8 label will still wrap to the next line(which is not what i want) instead of "overflowing".

Does anybody has any idea on how to solve this?
Thanks a lot!!!

Wayne
Ves
Telerik team
 answered on 18 Mar 2010
1 answer
152 views
Hello, I would like the Panel Bar to be auto-collapsed, so it does not display sub pages and I can't determine how to do this. Can you please help me?

For example, the panel bar on the home page of the following site I'm building shows the sub and sub-sub navigation. I only want it to show the home page and the top level navigtion which shows in the main navigation atop the site.  


Thank you,

-Greg
Yana
Telerik team
 answered on 18 Mar 2010
1 answer
121 views
Hi all,

I have a radgrid on my page.  I've checked the datasource and the field in question is, in fact, filled with an empty string ("").  However, on the page, this column has trash data in it ("Fx" in one row, "FÅ " in another, "Fâ" in another).  , Anyone have an idea why these trash characters are showing up in what should be an empty cell?  
Yavor
Telerik team
 answered on 18 Mar 2010
2 answers
96 views
Hi Folks,

Can anyone tell me how can i restrict all the modes of Edit on a Radgrid.

As i have separate piece of code to be executed on the click of Edit.

Awaiting your reply.


Thanks
Satya
Satya Sahu
Top achievements
Rank 1
 answered on 18 Mar 2010
1 answer
269 views
Hi,

Ok' I've got a multi level Hierarchy in my radgrid and trying to user server on demand loading at every level to save load on SQL.

At one stage of the Hierarchy i've got a DetailTables and I am using the DetailTableDataBind in C# to bind the datasource to the grid and its working peachy. The expected results is that it will only query the data when the user expands the item and its working fine.

My Problem is that I am trying to do this with a NestedViewTemplate as well. Now from what I read this is supported, however I'm not sure the way I'm going about it is correct.

My NestedViewTemplate contains a multipage view control with some tabs, each page view has its own SQL datasource control, that has its parameter pointing at a Label Control that evaluates the id for this row from the parent.

<asp:Label ID="Label1"  Text='<%#Eval("id")%>'  Visible="false" runat="server" /> 


This label control is inside the NestedViewTemplate (I got this method from one of the demos).

And I've set the mastertableview that contains this view template to on deamnd loading

<MasterTableView HierarchyLoadMode="ServerOnDemand" ... 


The result now is, I'm watching SQL profiler spew out 6 queries for every row that the radgrid has on load.

So it's obviously not loading these on demand.

The example that I am looking at for ondeamnd loading shows Using a separate datasource for the NestedViewTemplate, I am not using a datasource nor parent child relation ship, do I need to implement this maybe? its seems a bit superfluous.

I there something with my method that's wrong?

Thanks,

Joel



Yavor
Telerik team
 answered on 18 Mar 2010
0 answers
94 views
Dear Sir,
    I am using your trail products such as rad web controls and reporting ., it is very use ful to us. i ll but while i ll host in the webserver. Now i need your help regarding recurrence message., i need a example of this. i.e., create a new recurrence, editing & when the recurrence time occurs that time a message is to display to the user., or displaying in the log files/.

please help... as soon as possible.,
Suriya
Top achievements
Rank 1
 asked on 18 Mar 2010
3 answers
160 views
Hi,

I have added a 'add video' button to the editor. I am allowing members to add youtube or google video's to the forum. I am using the embed tag to do this. Also i am using editor.pasteHtml function and it inserts it fine.

The problem is that when insert.pasteHtml is called, the editor is in design view and nothing appears. Only when i switch manually to Html mode i see the code and when i switch back there is a big flash symbol.

Users will need some way on knowing the video has been inserted, I was thinking if there is a way to switch from design to html and back so that the flash may appear. Hoping some function like editor.switchhtmlmode or editor.switchdesignmode.

If there is another way to accomplish this, ideas are most welcome.

Thanks,
Amith
Amith S
Top achievements
Rank 1
 answered on 18 Mar 2010
9 answers
410 views
It seems after the latest release of the RadControls for ASP.NET AJAX, the ASP.NET Login control acts differently when there is a RadFormDecorator on the page.  Previously, when you enter credentials and hit the ENTER key, the form would submit by default.  After this latest release, when you hit the ENTER key nothing happens.  It seems like the RadFormDecorator does something to the Login button in the Login control that stops it from being the default button for the form.

Doug
Brook
Top achievements
Rank 2
 answered on 18 Mar 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?