Hi,
I am facing a problem in bachupdate on the radgrid. I have used the same demo as the following(http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx).
On the double-click I am changing the row values still I am getting "No pending changes to be processed" all the time. In the demo when we change the values it gives dashes around the data. But in my case the dashes is not coming. In my row I am only editing 2 columns. one is textbox and other one is dropdown.
Can somebody please help me.
Thanks.
Jessy
<body> |
<form id="form1" runat="server"> |
<div> |
<telerik:RadScriptManager ID="radScriptManager" runat="server" /> |
<telerik:RadGrid ID="radGrid" AutoGenerateColumns="false" AllowMultiRowEdit="true" AllowPaging="true" AllowSorting="true" PageSize="10" OnNeedDataSource="radGrid_NeedDataSource" OnPreRender="radGrid_PreRender" runat="server"> |
<ClientSettings> |
<Scrolling UseStaticHeaders="true" /> |
</ClientSettings> |
<PagerStyle Mode="NumericPages" /> |
<MasterTableView DataKeyNames="Name" EditMode="InPlace" TableLayout="Fixed"> |
<Columns> |
<telerik:GridBoundColumn DataField="Name" DataType="System.String" HeaderText="Name" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AllowSorting="true" ReadOnly="true" UniqueName="Name" /> |
<telerik:GridCheckBoxColumn DataField="Select1" DataType="System.Boolean" HeaderText="Select1" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AllowSorting="false" ReadOnly="false" UniqueName="Select1" /> |
<telerik:GridCheckBoxColumn DataField="Select2" DataType="System.Boolean" HeaderText="Select2" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AllowSorting="false" ReadOnly="false" UniqueName="Select2" /> |
</Columns> |
</MasterTableView> |
</telerik:RadGrid> |
</div> |
</form> |
</body> |
public partial class RadGridWithCheckBoxes : Page |
{ |
private List<Data> _data; |
protected void Page_Load(object sender, EventArgs e) |
{ |
if (!IsPostBack) |
{ |
this._data = Data.Load(); |
Session["DATA"] = this._data; |
} |
else |
{ |
this._data = (List<Data>)Session["DATA"]; |
} |
} |
protected void radGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) |
{ |
this.radGrid.DataSource = this._data; |
} |
protected void radGrid_PreRender(object sender, System.EventArgs e) |
{ |
foreach (GridDataItem item in this.radGrid.Items) |
{ |
item.Edit = true; |
} |
this.radGrid.Rebind(); |
} |
} |
public class Data |
{ |
public string Name { get; set; } |
public bool Select1 { get; set; } |
public bool Select2 { get; set; } |
public Data(string name, bool select1, bool select2) |
{ |
Name = name; |
Select1 = select1; |
Select2 = select2; |
} |
public static List<Data> Load() |
{ |
List<Data> data = new List<Data>(); |
for (int i = 0; i < 25; i++) |
{ |
data.Add(new Data(String.Format("Data{0}", i), false, false)); |
} |
return data; |
} |
} |
<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
script
runat
=
"server"
>
protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
{
// here is code for creating and saving thumbnail
// ...
e.IsValid = false; // now we want to discard uploaded image.
// But this does not work :(
}
</
script
>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadAsyncUpload
ID
=
"RadAsyncUpload1"
runat
=
"server"
onfileuploaded
=
"RadAsyncUpload1_FileUploaded"
TargetFolder
=
"images/_test"
>
</
telerik:RadAsyncUpload
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"Button"
/>
</
form
>
</
body
>
</
html
>
protected void RadGridHardware_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem dataItem = (GridDataItem)e.Item;
dataItem[
"Quantity"].Text = "20";
}
Any thoughts or ideas?
I have a RadListBox that I am trying to use to convert an old ASP page. In my ASP page I was able to use a Select box with optgroup to create headers within the list box. In this case, I have Headquarters as a non-selecteable bold header. Then I have sites indented and beneath. In trying to duplicate the functionality, I can't seem to make it work with RadListBox. I can't find a way to group items in the listbox, so I am using Disabled for the headers and then trying to use CSS to format. Overall, I'm almost there, but I can't get the CSS to change the color of the header text. Since it's disabled, it's grey. I have tried overriding the CSS and I can make the text larger, smaller,bold, italic, etc, but I can't get it to change color. For the non-disabled items, I can change the color. What's going on? I'm using the Internet Explorer Developer Tools to view the applied CSS and it shows my new color as being applied to the disabled items, but it just won't display properly.
Here's the custom CSS I'm trying.
<style type=
"text/css"
>
.RadListBox_Default li.rlbDisabled
{
color
:Black;
font-weight
:
bold
;
text-decoration
:
underline
;
text-indent
:
0px
;
margin-left
:
0px
;
}
.RadListBox_Default .rlbDisabled span.rlbText
{
color
: Black;
font-weight
:
bold
;
text-decoration
:
underline
;
font-size
:
10pt
;
text-transform
:
capitalize
;
font-family
:
Verdana
;
font-style
:
italic
;
}
.RadListBox_Default li
{
margin-left
:
10pt
;
}
.RadListBox_Default span.rlbText
{
font-family
:
Verdana
;
font-size
:
10pt
;
}
</style>
<
telerik:RadListBox
runat
=
"server"
ID
=
"rlbItemList"
Height
=
"400px"
Width
=
"350px"
AllowTransfer
=
"true"
AllowReorder
=
"false"
TransferToID
=
"RadListBoxDestination"
EnableEmbeddedBaseStylesheet
=
"false"
EnableEmbeddedSkins
=
"false"
CssClass
=
"ListBox"
>
</
telerik:RadListBox
>
</
td
>
<
td
>
<
telerik:RadListBox
runat
=
"server"
ID
=
"RadListBoxDestination"
Height
=
"400px"
Width
=
"350px"
/>
item.CssClass =
"rrItem"
;
item.Html = html.ToString();