Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
184 views
Hello.

I use SqlDataSource as RadGrid data source (RadGridTable.DataSourceID = "SqlDS").
I configure SqlDataSource at Page_Load event (SqlDS.SelectCommand = "SELECT * ...").
If SQL Server returns an error then application crashes with unhandled exception.
How can I catch SqlException in that scenario?

Vadim.
vadim
Top achievements
Rank 1
 asked on 11 Apr 2011
2 answers
694 views
Hi all,

How can i  make my page refresh after i insert / edit/ delete a row in my radgrid1?
thank you.

regards,
Nasri
Arteta Sam
Top achievements
Rank 1
 answered on 11 Apr 2011
0 answers
61 views
Hi,

I have a RadMultipage with two page views in it.

As soon as I set the RenderSelectedPageOnly property true on my multipage I get the following error:

Microsoft JScript runtime error: Unable to get value of the property '_events': object is null or undefined.

Any idea what is causing this error?

Thanks
Johan
Top achievements
Rank 1
 asked on 11 Apr 2011
1 answer
147 views
Hello,

I have both RadEditor features enable on a site. I confirmed that this work for the OTB editform.aspx and newform.aspx pages.

I have a custom web control developed in C# using visual studio. There is a .CS file (compiled DLL is installed in the GAC), .ASCX web control file in the CONTROLTEMPLATE folder, and then the .ASPX page in a regular folder under the root.

The web control (.ASCX) file has the following code for a description field:

 

<tr>
        <td style="width:44%" class="ms-formlabel" valign="top">
            Description
        </td>
        <td style="width:53%" class="ms-formbody">
            <asp:HiddenField ID="hdnDescription" runat="server" />
            <span>
                <span dir="ltr">
                    <textarea name="txtDescription" rows="6" cols="20" id="idDescription" title="Description" class="ms-long">
                      <%= Server.HtmlEncode(hdnDescription.Value)%>  
                    </textarea>
                    <script>if (browseris.ie5up && browseris.win32 && !IsAccessibilityFeatureEnabled()){RTE_ConvertTextAreaToRichEdit("idDescription", true, true, "", "1033", null, null, null, null, null,"FullHtml", "\u002f",null,null,null,null);}else{document.write(" <br><SPAN class=ms-formdescription><a href='javascript:HelpWindowKey(\"nsfullrichtext\")'>Click for help about adding HTML formatting.</a></SPAN> <br>");};</script>                    
                </span>                                         
  
            </span>    
        </td>
        <td style="width:20%"> </td>
    </tr>

The RadEditor will not load up. The page is displayed using the OTB HTML editor. Is there anyway to fix this issue?
Stanimir
Telerik team
 answered on 11 Apr 2011
1 answer
192 views
Hi,

I am using the RadGrid control with EditMode="InPlace". I have a dropdown and following the example as below:

http://www.telerik.com/help/aspnet/grid/grdoperationswithdropdownlistinedititemtemplate.html

Using the GridDropDownColumn did not work well with my custom datasource. Thats why I am using the above link as a sample

<

 

Columns>

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-CssClass="edit" ItemStyle-CssClass="edit" />

 

 

<telerik:GridBoundColumn DataField="Name"  ReadOnly="True"

 

 

 

HeaderText="Header1" />

 

 

 

 

 

<telerik:GridTemplateColumn DataField="Description" HeaderText="Header2" >

 

 

 

<ItemTemplate>

 

 

<asp:Label id="Label1" runat="server">

 

<%

# DataBinder.Eval(Container.DataItem, "Description")%>

 

 

 

</asp:Label>

 

 

</ItemTemplate>

 

 

 

<EditItemTemplate>

 

 

<asp:DropDownList id="drpDown" runat="server" />

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 


I am populating the dropdowon on edit mode as below:

 

if (e.Item is GridEditableItem && e.Item.IsInEditMode)

 

 

{

 

 

GridEditableItem item = e.Item as GridEditableItem;

 

 

 

// access/modify the edit item template settings here

 

 

DropDownList dropDownList = item.FindControl("drpDown") as DropDownList;

 

 

dropDownList.DataSource = reactions;

 

dropDownList.DataTextField =

"description";

 

 

dropDownList.DataValueField =

"id";

 

 

 

PatientAllergy paRowData = (e.Item.DataItem as PatientAllergy);

 

 

 

if (paRowData != null)

 

 

{

 

 

if ((paRowData.Description!= null))

 

 

dropDownList.SelectedValue = paRowData.Id;

 

}

 

dropDownList.DataBind();

 

 

}


fine. I have two outstanding questions:
I want to achive the the batch update with inline editing
1.  How do I collapse the editable row when I click outside of the row.
2. How do I keep track of edited rows. Does Telerik has a implematioan for this. the below example does it only with client side and ondoubleclick editing. But I want to achieve with EditMode="InPlace". I want to do inline editing when the Edit button is clicked for the particular row. Please point me the direction.
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx

.

Daniel
Telerik team
 answered on 11 Apr 2011
5 answers
111 views
I can't get the "OK" button on the rad alert hover to change.  I checked the CSS and skins with no luck.
Marin Bratanov
Telerik team
 answered on 11 Apr 2011
3 answers
165 views
Hi everyone,

I'm now to ASP.net and programming work i use the RADGridView in my website.
the question is how I can change the color of the cell based on a specific conditions that my column is a datetime. I want if the due date is pass the color should be RED.


Thanks for your help in advance
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Apr 2011
1 answer
115 views
I am creating a tabstrip with a pageview that has a radgrid in it.  Based on data that comes from an sql database there may be several tabs that are created dynamically.  I would like to have the tabs strip setup as a vertical left tabstrip.  The tabstrip always display on the top of the pageview.  Here is the creation code:

            RadTabStrip rts = new RadTabStrip();
            rts.ID = "RadTabStrip1";
            rts.MultiPageID = "yearsPages";
            rts.Orientation = TabStripOrientation.VerticalLeft;


            RadMultiPage rmp = new RadMultiPage();
            rmp.ID = "yearsPages";


            this.PlaceHolder1.Controls.Add(rts);
            this.PlaceHolder1.Controls.Add(rmp);


            DataTable dt = DAL.Routines.getDataTableFromSQL("SELECT Distinct Year FROM Scores ORDER BY Year");
            foreach (DataRow dr in dt.Rows)
            {
                RadTab rootTab = new RadTab();
                rts.Tabs.Add(rootTab);
                rootTab.Text = "Year: " + dr["Year"].ToString();
                RadGrid grd;
                RadPageView pv = new RadPageView();
                grd = buildGrid(Convert.ToInt32(dr["Year"]));
                pv.Controls.Add(grd);
                rmp.PageViews.Add(pv);
            }
            rts.SelectedIndex = 0;
            rmp.SelectedIndex = 0;

Kate
Telerik team
 answered on 11 Apr 2011
3 answers
168 views
Hello,

I'd like to see if it's possible to use a dynamically generated RadEditor to return a plain text string all from the server side.

Dim myHTML as String = "Some text <strong>with formatting.</strong>"
  
Dim myEditor as New RadEditor
myEditor.Content = myHTML
myEditor.DataBind()
myEditor.StripFormattingOptions = EditorStripFormattingOptions.All
  
myHTML = myEditor.Content

Now I realize that the StripFormattingOptions is only going to work on a client side paste event.  So I am wondering if there is a way to either use client side script to get the plain text or some other method that i'm missing.

Hopefully that makes sense! Thanks,
Sean
Rumen
Telerik team
 answered on 11 Apr 2011
3 answers
212 views
I have just migrated over to the new rotator and i'm not overly impressed. In some respects the old version is better. One of the annoying issues I am having has to do with the border around the control. Setting it to "None" does not remove the border nor does setting the border width to 0px. Is there a way for me to get rid of this border?
Steven
Top achievements
Rank 1
 answered on 11 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?