<tr>
<td align="left">
<telerik:RadComboBox EnableScreenBoundaryDetection="false" ID="rdcbCustomer" runat="server" Skin="Vista" AppendDataBoundItems="true"
Filter="StartsWith" DataSource='<%# Iif (TypeOf Container is GridEditFormInsertItem, ActiveCustomers, Customers) %>'
DataTextField="Name" DataValueField="CustomerId" AutoPostBack="true" CausesValidation="false" OnSelectedIndexChanged="rdcbCustomer_OnSelectedIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="---Select---" Value="-1" Selected="true" />
</Items>
</telerik:RadComboBox>
<br />
<asp:RequiredFieldValidator ID="customerValid" ControlToValidate="rdcbCustomer" Text="Customer is required."
Display="dynamic" runat="server" InitialValue="---Select---" /><br />
</td>
</tr>
<tr align="left">
<td>
<b>Party: *</b>
</td>
</tr>
<tr>
<td align="left">
<telerik:RadComboBox EnableScreenBoundaryDetection="false" ID="rdcbParty" runat="server" Skin="Vista" AppendDataBoundItems="true"
Filter="StartsWith" DataSource='<%# Parties %>' DataTextField="Name" DataValueField="PartyId">
<Items>
<telerik:RadComboBoxItem Text="---Select---" Value="-1" Selected="true" />
</Items>
</telerik:RadComboBox>
<br />
<asp:RequiredFieldValidator ID="partyValid" ControlToValidate="rdcbParty" Text="Party is required."
Display="dynamic" runat="server" InitialValue="---Select---" /><br />
</td>
</tr>
Protected Sub rdcbCustomer_OnSelectedIndexChanged(ByVal o As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs)
Parties = LoadPartiesListByCustomer(e.Value)
Dim combo1 As RadComboBox = TryCast(o, RadComboBox)
Dim editItem As GridEditFormItem = TryCast(combo1.NamingContainer, GridEditFormItem)
Dim combo2 As RadComboBox = TryCast(editItem.FindControl("rdcbParty"), RadComboBox)
combo2.DataSource = Parties
End Sub
Protected Function LoadPartiesListByCustomer(ByVal cust_id) As IList(Of Party)
Dim party As IList(Of Party) = New List(Of Party)()
Dim dtParty As DataTable = cDA.GetPartiesByCustomer(cust_id)
If dtParty.Rows.Count > 0 Then
For Each dr As DataRow In dtParty.Rows
Dim p As New Party()
p.PartyId =
Convert.ToInt32(dr("PartyId"))
p.Name =
Convert.ToString(dr("Name"))
p.IsActive =
Convert.ToBoolean(dr("IsActive"))
party.Add(p)
Next
End If
'Parties.Clear()
Parties = party
Return Parties
End Function
Please help me to fix this problem
http://demos.telerik.com/aspnet-ajax/spell/examples/programming/datagrid/defaultcs.aspx
Question is that: How do I use the image ButtonType = "ImageButton" for Spell Check in Rad Grid...
Attached are my screen shoots. I would like to see spell checker button type as (spellcheck.PNG), but not like untitled-3 copy.jpg . I can use the Image Button for regular text Box but did not find any thread for Grid Template Columns..
Thanks
Below is my Grid Declaration:
| <telerik:RadGrid ID="RadGrid1"> '''' ''''
<asp:TemplateColumn HeaderText="Description"> |
| <ItemTemplate> |
| <asp:Label ID="lblField1" CssClass="text" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ProductDescription") %>' /> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:TextBox runat="server" ID="ProductDescription" TextMode="MultiLine" Rows="4" |
| Columns="40" Text='<%# DataBinder.Eval(Container.DataItem, "ProductDescription") %>' /> |
| <telerik:RadSpell ID="RadSpell1" runat="server" ControlToCheck="ProductDescription" /> |
| </EditItemTemplate> |
| </asp:TemplateColumn> '''' '''' </telerik:RadGrid>
|
public static void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e) { RadGrid RadGrid1 = (RadGrid)sender; if (e.CommandName == "AddToCart") { if (RadGrid1.SelectedIndexes.Count == 0) { RadWindowManager1.RadAlert("No documents have been selected", 250, 100, "Add to Document Cart", ""); return; } GridCommandItem Item = (GridCommandItem)e.Item; ImageButton btnAddToCart = (ImageButton)e.Item.FindControl("btnAddSelectedToCart"); .... ..... rest of code... }}
// Function that is called from the window to "get back" the value and fill the field tbField
function test(args) { RadAjaxManager1.ajaxRequest(args);}"row that is edited".FindControl("tbField") as TextBox