I am using WebBlue Skin. How can I use CSS in a RadGrid EditItemStyle-CssClass="Test" . I have tried what is below and it does not work.
<telerik:RadGrid .... EditItemStyle-CssClass="Test" >
.RadGrid_WebBlue .Test
{
background-color:red;
}
Hi,
I want to attach my data programmatically to the radgrid. Once the data is attach to the radgrid, i want to insert, delete and update data through RadGrid only.
Please advice me how to do, this is very urgent for me.
Attaching data to the grid in the form of:
Creating sql connection.
creating command
copy the data into the dataset
attach to grid
close the connection
Please give me example how to attach and can able to perform insert, delete and update operation with grid and also with programmatically.
Thanks.
| <radG:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True" AllowFilteringByColumn="False" |
| AllowMultiRowSelection="false" AllowPaging="True" AllowSorting="True" BackColor="Transparent" |
| DataSourceID="GridDataSource" EnableAJAX="false" EnableAJAXLoadingTemplate="false" |
| EnableViewState="true" GridLines="None" LoadingTemplateTransparency="50" ShowGroupPanel="True" |
| ShowStatusBar="False" AutoGenerateColumns="true" OnUpdateCommand="RadGrid1_UpdateCommand" |
| SkinID="myGrid" OnColumnCreated="ColumnCheck" OnPreRender="ReduceFilter" Width="100%" |
| OnItemDataBound="ColDatabind"> |
| <MasterTableView DataSourceID="GridDataSource" GroupLoadMode="Client"> |
| <Columns> |
| <radG:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="~/Images/edit.gif" |
| UniqueName="EditCommandColumn1" Resizable="False" Reorderable="False"> |
| <HeaderStyle Width="15px" /> |
| </radG:GridEditCommandColumn> |
| <radG:GridTemplateColumn UniqueName="AssignUser" AllowFiltering="False" Reorderable="False" |
| Groupable="False" Resizable="False" Visible="false"> |
| <HeaderStyle Width="20px" /> |
| <HeaderTemplate /> |
| <ItemTemplate> |
| <asp:ImageButton runat="Server" ID="ibtnAssignMsg" ImageUrl="~/images/Asgn.gif" CommandName="AssignMsgToUser" |
| ToolTip="Assign SMS to User" Visible="false" /> |
| </ItemTemplate> |
| </radG:GridTemplateColumn> |
| <radG:GridTemplateColumn UniqueName="myselect" AllowFiltering="False" Reorderable="False" |
| Groupable="False" Resizable="False"> |
| <HeaderStyle Width="20px" /> |
| <HeaderTemplate> |
| <asp:CheckBox ID="selectall" runat="Server" OnLoad="SelectAll" /> |
| </HeaderTemplate> |
| <ItemTemplate> |
| <asp:CheckBox runat="Server" ID="myselect" OnLoad="ClearSAll" /> |
| </ItemTemplate> |
| </radG:GridTemplateColumn> |
| </Columns> |
| <EditFormSettings UserControlName="~/editform.ascx" EditFormType="WebUserControl" > |
| <EditColumn UniqueName="EditCommandColumn"> |
| </EditColumn> |
| </EditFormSettings> |
| <NoRecordsTemplate> |
| <table width="100%"> |
| <tr> |
| <td align="center"> |
| There are no items to display. Please check your selection criteria and retry. |
| </td> |
| </tr> |
| </table> |
| </NoRecordsTemplate> |
| <FooterStyle Height="0px" /> |
| <ExpandCollapseColumn Visible="False"> |
| <HeaderStyle /> |
| </ExpandCollapseColumn> |
| <RowIndicatorColumn Visible="False"> |
| <HeaderStyle /> |
| </RowIndicatorColumn> |
| </MasterTableView> |
| <ClientSettings AllowGroupExpandCollapse="True" AllowDragToGroup="True" AllowColumnsReorder="True" |
| ColumnsReorderMethod="Reorder" ApplyStylesOnClient="True"> |
| <Selecting AllowRowSelect="True" /> |
| <Resizing AllowColumnResize="True" ResizeGridOnColumnResize="True" /> |
| </ClientSettings> |
| </radG:RadGrid> |
I have a radcombobox like this :
<
telerik:RadComboBox ID="rcbClinic" runat="server" Skin="Office2007" Width="300px"
AutoPostBack="true" HighlightTemplatedItems="true" DataTextField="Title" AllowCustomText="false" DataValueField="ID">
<itemtemplate>
<table style="width: 100%; text-align: left">
<tr>
<td style="width: 50px; font-size: 11px; font-family: Tahoma; color: Black">
<%
# DataBinder.Eval(Container.DataItem, "Date") %>
</td>
<td style="width: 100%; font-size: 11px; font-family: Tahoma; color: Black">
<%
# DataBinder.Eval(Container.DataItem, "Title") %>
</td>
</tr>
</table>
</itemtemplate>
</telerik:RadComboBox>
In this combo I have 2 items like this :
20/05/2009 Clinic 1
20/05/2009 Clinic 1
Each item have an ID (Guid) used like DataValueField but when I enter in my page first time, If I select second Item, SelectedIndexChanged is fire. After this If I select first item, no SelectedIndexChanged event is fired. When I check HTML, I see that value of my combobox is not my Guid but the text of my item selected. Why ????
Is it possible to fired SelectedIndexChanged on each item change even if text is the same ?
Thanks
Assume cmbSectionTitle is my RadComboBox. I need to do the following operations in JavaScript or with page post back.
cmbSectionTitle.DataSource =
null;
cmbSectionTitle.Text =
string.Empty;
| else if (key == "3") |
| { |
| objtxt.Visible = false; |
| DropDownList drp = new DropDownList(); |
| drp.DataSource = dataarray; |
| item[SRfields[valuecount]].Controls.Add(drp); |
| item[SRfields[valuecount]].Controls[1].DataBind(); //don't know if this is required |
| } |