Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
135 views

Hi

When I type som text in the editor and insert a <br /> like this

This is some text<br />

and this is some more text<br />

and we insert som more text again

 
Now lets say the I want to set the alignment to center for the middle line of text

Then this happends:
<p style="text-align: center;">This is some text<br />

and this is some more text<br />

and we insert som more text again </p>

Which of cause meas that all the text is aligned to center
However I am only interested in centering the middle line which I had my cursor on.
This can easily be reproduced on your demo site.

Is the any fix or workaround for this?
If not then please consider this as a feature request.

Rumen
Telerik team
 answered on 27 Aug 2009
2 answers
364 views
I am trying to use the built in filtering in a grid that I am building dynamically.  Everything works fine as long as the EnableColumnsViewState is true.  When this value is false, and I am filtering on multiple columns, the Filter Values are not being retained on postback.   Just the last filter is re-displayed.  The grid is still being filtered correctly because I have implemented custom filtering using a FilteredDataset. How can I get around this issue?  I need to disable column viewstate due to other problems I encountered.

Randy
Randy
Top achievements
Rank 1
 answered on 27 Aug 2009
1 answer
124 views
I'm using a TabStrip on an ajax-enabled page.  I have used the TabStrip on many pages in my application, but for some reason on this particular page there is a problem, as follows:

When the page first opens if I click one of the tabs, the tab control seems to "freeze", meaning that none of the four tabs on the control responds to clicks.  There is no postpback from either the first click or subsequent clicks after the apparent "freeze". 

When I click the tab the first time, the entire page, meaning the content within the browser window, seems to shift upward and to the left a tiny amount, maybe one or two pixels.

Clicking again on any of the tabs has no result.

However, there is a button on the open tab.  If you click the button, you get a postback, and after that the tab control works normally.

I have been unable to figure out what is going on.

Anyone have a suggestion?
Paul
Telerik team
 answered on 27 Aug 2009
3 answers
209 views
I am having trouble localizing a RADGrid. I have managed to localize the column headers and the command bar, but I cannot see how to localize the "built in" button names using a resource file.

I need to change the following:

"update" and "cancel" when editing a row using the built in form
"insert" and "cancel" when adding a row using the built in form
"delete" and "edit" on the autogenerated columns within the form itself

Does anybody have any ideas on the best way to accomplish this?

Thanks,

Jason

Jason Thacker
Top achievements
Rank 1
 answered on 27 Aug 2009
1 answer
173 views
I have a RadNumericTextBox with AutoPostBack set to true, and server side event attached to the TextChanged event.
I'm using spinners, and setting the MaxValue dynamically on the server side.  When I attempt to change the value of the box past the MaxValue, the control validates and places the warning symbol correctly, however it still produces a generic postback.   How can I stop this postback from happening, since no data has changed on the front end.  Is there a client event that I can attach to and cancel if an attempt is made to go past the max value?

It should also be noted that the same "generic" postback happens if you try to spin below the minvalue as well, or manually attempt to enter a invalid value. However, keying invalid characters, ie (non-numeric) raises the validation icon, but does not cause a postback.

Thanks
Dimo
Telerik team
 answered on 27 Aug 2009
1 answer
308 views
Hi I have the following code works fine on my local machine but when deployed to test server I get the following error: "The script /Sample1/ScriptResource.axd?... failed to load. Check for inaccessible path." It acts weird it updates or cancels first time and second time I try and click it does not work and when refresh the page it starts working again but only for the one record and then I have to click the refresh button again to make it work, My boss told me that it is giving following error scriptresource.asd and that

The JavaScript error is the root of the problem - once that is solved, the grid will behave as expected.

.. Please help me
ASPX Code:


<telerik:RadGrid runat="server" ID="rgRegistered" GridLines="None"
                AllowSorting="true" AllowPaging="true" AllowFilteringByColumn="true" PageSize="30"
                AutoGenerateColumns="false" ShowGroupPanel="false" ShowFooter="true" Width="1500" EnableAjaxSkinRendering="true"
                OnNeedDataSource="rgRegistered_NeedDataSource"
                OnItemDataBound="rgRegistered_ItemDataBound"
                OnItemCommand="rgRegistered_ItemCommand">
                <ValidationSettings EnableValidation="true" ValidationGroup="vgGrid" />
                <MasterTableView DataKeyNames="GradID" EditMode="InPlace">
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="GradID" DataField="GradID" SortExpression="GradID"
                            Visible="false" />
                        <telerik:GridEditCommandColumn ButtonType="LinkButton" EditText="Edit" CancelText="Cancel"
                            UpdateText="Update">
                        </telerik:GridEditCommandColumn>
                        <telerik:GridTemplateColumn HeaderText="Badge Name" SortExpression="BadgeName" ItemStyle-Wrap="false">
                            <EditItemTemplate>
                                <asp:TextBox ID="tbxBadgeName" runat="server" />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblBadgeName" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="Department" DataField="Department"
                            SortExpression="Department" ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Email" DataField="Email" SortExpression="Email"
                            ReadOnly="true" />
                        <telerik:GridTemplateColumn HeaderText="Phone" SortExpression="Phone" ReadOnly="true">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblPhone" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>                                               
                        <telerik:GridTemplateColumn HeaderText="Other" SortExpression="Other">
                            <EditItemTemplate>
                                <asp:RadioButtonList runat="server" ID="rbtnlOther" />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblOther" />
                            </ItemTemplate>
                            <FooterTemplate>
                                <asp:Label runat="server" ID="lblOtherTotals" />
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="Not Attending Conference" SortExpression="Rsvp">
                            <EditItemTemplate>
                                <asp:RadioButtonList runat="server" ID="rbtnlRsvp" />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblRsvp" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

C# Code:

protected void rgRegistered_ItemDataBound(object source, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem gdiItem = (GridDataItem)e.Item;

                if (gdiItem != null)
                {
                    // bind different controls to the data from the collection based
                    // on whether or not the row in the grid is in edit mode.
                    if (!gdiItem.IsInEditMode) // view mode (Label controls)
                    {
                        ((Label) gdiItem.FindControl("lblBadgeName")).Text = DataBinder.Eval(gdiItem.DataItem, "BadgeName").ToString();                    
                     
                        ((Label) gdiItem.FindControl("lblOther")).Text = DataBinder.Eval(gdiItem.DataItem, "Other").ToString();
                        ((Label) gdiItem.FindControl("lblRsvp")).Text = DataBinder.Eval(gdiItem.DataItem, "Rsvp").ToString();

                        if (DataBinder.Eval(gdiItem.DataItem, "Phone") != null)
                        {
                            Regex regexNonnumeric = new Regex(@"[^0-9]");
                            string strNumeric = regexNonnumeric.Replace(DataBinder.Eval(gdiItem.DataItem, "Phone").ToString(), string.Empty);
                            ((Label)gdiItem.FindControl("lblPhone")).Text = Convert.ToInt64(strNumeric).ToString("(000)000-0000");
                        }
                        
                    }
                    else // edit mode (non label controls)
                    {
                        #region Declare Controls                 
                        RadioButtonList rbtnlOther = (RadioButtonList)gdiItem.FindControl("rbtnlOther");
                        RadioButtonList rbtnlRsvp = (RadioButtonList)gdiItem.FindControl("rbtnlRsvp");

                        #endregion

                        #region Bind Controls

                        ((TextBox)gdiItem.FindControl("tbxBadgeName")).Text = DataBinder.Eval(gdiItem.DataItem, "BadgeName").ToString().Trim();

                      
                        if (rbtnlOther != null)
                        {
                            // now populate the radio button list
                            AppCode.ControlLibrary.BindMethod.rbtnlYesNoBind(rbtnlOther);
                            rbtnlOther.SelectedValue = DataBinder.Eval(gdiItem.DataItem, "Other").ToString();
                        }
                        if (rbtnlRsvp != null)
                        {
                            // now populate the radio button list
                            AppCode.ControlLibrary.BindMethod.rbtnlYesNoBind(rbtnlRsvp);
                            rbtnlRsvp.SelectedValue = DataBinder.Eval(gdiItem.DataItem, "Rsvp").ToString();
                        }

                        #endregion
                    }
                }
            }
            else if (e.Item is GridFooterItem)
            {
                GetGridTotals();

                Label lblRegisteredTotals = (Label)e.Item.FindControl("lblRegisteredTotals"); 
                Label lblOtherTotals = (Label)e.Item.FindControl("lblOtherTotals");

                if (Int32.Parse(Registered.ToString()) != 0)
                {
                    lblRegisteredTotals.Text = string.Format("Registered: {0}", Registered);
                }             
                if (Int32.Parse(Other.ToString()) != 0)
                {
                    lblOtherTotals.Text = string.Format("Other: {0}", Other);
                }
            }
        }
Prangadj
Top achievements
Rank 1
 answered on 27 Aug 2009
1 answer
111 views
Hi Everyone,

I am dynamically generating an XML string containing the structure of my RadPanelBar and then using LoadXML function.

Is there any way to add additional attributes into the XML string and then access them from Server side/ Client side code?

I have seen a few examples of using custom attributes when binding to an XML datasource but none of these appear to apply to using the LoadXML function.

Any help appreciated.

Thanks
Antony
Paul
Telerik team
 answered on 27 Aug 2009
2 answers
1.5K+ views

Hi There, I need a litle help with GridBoundColumn DataFormateString Property. I have boundcolumn which shows the values like:

0
1.0
1.88
3.0

The values should appear like:

0.00
1.00
1.88
3.00

 

Is there any easy way that can be used with GridBoundColumns to get the above results. any example will be a gr8 help :).

Thanks & Regards
Nitesh Monga

nitesh monga
Top achievements
Rank 1
 answered on 27 Aug 2009
1 answer
83 views
Hi telerik team,
I' ve succesfully following the http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandsplitterresizing/defaultcs.aspx?product=grid (the only different is the fact that I've a scenario with master-content page).
But I've the following problems
1. load the page (initially the grid is not paging becouse I've few records)
2. resize the panel, so grid now is paging
3. navigate into paging (for example page 3)
4. resize again the panel, so grid is now not paging: records are missed, and grid shows the message "no record showed"
Can you help me?
Thanks in advance
Nadia Giusti
Yavor
Telerik team
 answered on 27 Aug 2009
1 answer
113 views
Hi,
I want throw in any moment the event of button in fileexplorer, and not only pressing the button

How  can i do that'??

Thanks
Fiko
Telerik team
 answered on 27 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?