Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
190 views
I have a problem handling the inserts to a grid using "InPlace" edit and "MultiROwEdit".
The Grid is bound to a DataSet (SQL) table.  I want to be able to keep inserting multiple rows (items) into the grid and edit them.
The "AllowAutomaticInserts" is set to false.  I am catching the insert events in "OnItemDataBound" handler.

In there, I am creating a new 'empty' data row and adding it to the table.  Then, I bind the row to inserted item, make it aditable, and finally I change "IsItemInserted" to false to allow for more inserts.

DataTable.AddRow(row);  // add row to table

insert_Item.DataItem = row;

insert_Item.Edit =

true;

 

rdgrd.MasterTableView.IsItemInserted =

false;

This turns the last item in the grid into regular, non-editable item unless Refresh is pressed.
I was wondering wether there is a cleaner way of doing multiple inserts to a grid where all rows are turned into editable items.  I could not find any single example exploring this scenario.

Thank you,
Chris

 

Veli
Telerik team
 answered on 29 Sep 2009
5 answers
279 views
I was reviewing another set of ASP.net controls and they provide the ability to Mass update their grid.  An example would be that I have a grid populated with data.  I would like to use an outside form to find all values in the grid that are X and replace it with Y.  Is that possible with the RadGrid?  If so, is there an example?
Sebastian
Telerik team
 answered on 29 Sep 2009
1 answer
129 views
I have the following declaration, and my tick marks aren't showing.

Thoughts?
<telerik:RadSlider ID="rdSlider" runat="server" OnClientValueChange="HandleValueChange"  
                OnClientLoaded="HandleValueChange" Width="135"  
                CausesValidation="false" Visible="true" TrackPosition="Center" 
                OnValueChanged="rdSlider_ValueChanged" AutoPostBack="true" ItemType="Tick" LargeChange="100"
            </telerik:RadSlider> 

Tsvetie
Telerik team
 answered on 29 Sep 2009
1 answer
71 views
Dear Telerik Team,

I just wonder ,is there any way to make the users to enter only the numeric values in the edit box of the calendar ? currently it accepts the alphabets as well.

Shinu
Top achievements
Rank 2
 answered on 29 Sep 2009
3 answers
132 views
Hi,

I want to raise an event when I empty the combo's text, what can I do? Is there any event described for this purpose?

thanks
Vesko
Top achievements
Rank 2
 answered on 29 Sep 2009
1 answer
69 views
Hi,
I am looking for automating the installation of RadControls for ASP.NET AJAX 3.5 on MOSS 2007 (as per the document below).
Is there any sample avaialble?
http://www.telerik.com/help/aspnet-ajax/moss-install-aspnet-ajax-35.html

Ivo
Telerik team
 answered on 29 Sep 2009
3 answers
217 views
Dear Telerik
                      I am working with RadCombobox of telerik and I want it to display autocomplete and loadondemand.when I type a character it is showing me loading... but not displaying anything.Please let me know what is wrong in this code.Please reply as it is urgent for us to deliver.
Aspx page code

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="webTest._Default" %>

 

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

html xmlns="http://www.w3.org/1999/xhtml" >

 

<

head runat="server">

 

 

<title>Untitled Page</title>

 

 

</

head>

 

<

body>

 

 

<form id="form1" runat="server">

 

 

<div>

 

 

<telerik:RadScriptManager ID="rsm" runat="server"></telerik:RadScriptManager>

 

 

<telerik:RadComboBox ID="RadComboBox1" runat="server"

 

 

Height="190px"

 

 

Width="420px"

 

 

MarkFirstMatch="true"

 

 

AllowCustomText="true"

 

 

EnableLoadOnDemand="true"

 

 

HighlightTemplatedItems="true"

 

 

DropDownWidth="423px"

 

 

 

ItemRequestTimeout="500" OnItemDataBound="RadComboBox1_ItemDataBound" OnItemsRequested="RadComboBox1_ItemsRequested" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged">

 

 

<headertemplate>

 

 

<table style="width:415px; text-align:left">

 

 

<tr>

 

 

<td style="width:125px;">

 

Id

 

</td>

 

 

<td style="width:125px;">

 

Name

</td>

 

 

</tr>

 

 

</table>

 

 

</headertemplate>

 

 

<ItemTemplate>

 

 

<table style="width:415px; text-align:left">

 

 

<tr>

 

 

<td style="width:125px;">

 

<%

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

 

 

</td>

 

 

<td style="width:125px;">

 

<%

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

 

 

</td>

 

 

</ItemTemplate>

 

 

</

telerik:RadComboBox>

 

 

</div>

 

 

 

 

</form>

 

</

body>

 

</

html>

 


Code Behind File Code

using

System;

 

using

System.Data;

 

using

System.Configuration;

 

using

System.Collections;

 

using

System.Web;

 

using

System.Web.Security;

 

using

System.Web.UI;

 

using

System.Web.UI.WebControls;

 

using

System.Web.UI.WebControls.WebParts;

 

using

System.Web.UI.HtmlControls;

 

using

Telerik.Web.UI;

 

using

Telerik.Web.Design;

 

using

System.Data.OleDb;

 

using

System.Text;

 

using

System.IO;

 

namespace

webTest

 

{

 

public partial class _Default : System.Web.UI.Page

 

{

 

OleDbConnection cn;

 

 

OleDbDataAdapter da;

 

 

DataSet ds;

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

if (!Page.IsPostBack && !Page.IsCallback)

 

{

Load1(

string.Empty);

 

}

}

 

public void Load1(string filter)

 

{

 

string sql = "select * from emp1234";

 

cn =

new OleDbConnection("Provider=OraOLEDB.Oracle;Data Source=D1;User ID=SC;Password=D1;Connection Lifetime=600;Max Pool Size=100");

 

cn.Open();

sql +=

" where Name LIKE '" + filter.Replace("'","''") + "%'";

 

Response.Write(sql);

da =

new OleDbDataAdapter(sql, cn);

 

ds =

new DataSet();

 

da.Fill(ds);

cn.Close();

 

DataView dv = new DataView(ds.Tables[0]);

 

RadComboBox1.DataSource = dv;

RadComboBox1.DataBind();

}

 

 

protected void RadComboBox1_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)

 

{

Load1(e.Text);

}

 

protected void RadComboBox1_ItemDataBound(object sender, RadComboBoxItemEventArgs e)

 

{

 

RadComboBoxItem item = e.Item;

 

 

DataRowView drv = (DataRowView)e.Item.DataItem;

 

e.Item.Text = drv[

"Name"].ToString();

 

 

}

 

protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)

 

{

 

}

 

}

}




Thanks and Regards
Sri
Veselin Vasilev
Telerik team
 answered on 29 Sep 2009
4 answers
304 views

I have a form with two RadComboBoxes.  One contains a list of states and the other contains a list of counties.  Basically, this is a cascading droplist scenario.  The OnClientSelectedIndexChanged event on the States RadComboBox is set to ChildRadComboChange shown below.  To populate the Counties RadComboBox when a state is selected, I run a LoadCounties method that is triggered by the State.ItemsRequested event.  So far, so good.

The problem comes in when the ChildRadComboLoad function runs (shown below).  The line childCombo.ClearItems() throws a Microsoft JScript runtime error: Object doesn't support this property or method.  The childID contains a valid control id and the childCombo variable is set to the correct RadComboBox (the div, actually).

Any ideas why I can't run this function on the RadComboBox?  I have also seen this with some of the other functions like RequestItems?

----Javascript functions

function ChildRadComboChange(sender, eventArgs) {
  var item = eventArgs.get_item();
  ChildRadComboLoad(sender, item);
}

function ChildRadComboLoad(sender, item) {
  var childID = ChildRadComboArray[sender.get_id()];
  var childCombo = document.getElementById(childID);
  childCombo.ClearItems();
  if (item.get_index() > 0) {    
   childCombo.RequestItems(item.get_value(),false);    
   childCombo.set_text('');}
  else {    
   childCombo.disable();    
   childcombo.set_text(ChildRadComboArray[sender.get_id()+'_msg']);
  }
}

Sincerely,

Sean M. Severson

Veselin Vasilev
Telerik team
 answered on 29 Sep 2009
2 answers
89 views
Hi,

I have broken header in rad grid. when we risize browser it is working fine. but first when page load header is broken on both side.

Thanks

rajesh patel
Top achievements
Rank 1
 answered on 29 Sep 2009
4 answers
121 views
Hi All,

When ever we use navigation controls on calendar to move to a different month or a year, the calendar's SelectedDate object doesnt get updated and it keeps the value of the last selected Date. Why is that so?

Can anyone please explain this happens and is there a way to select the first day of the month everytime the calendar is moved to a different month?

Thanks in advance,

Haroon
Haroon Khokhar
Top achievements
Rank 1
 answered on 29 Sep 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?