
| <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" | |
| ClientEvents-OnRequestStart="userEditRequestStart" ClientEvents-OnResponseEnd="userEditRequestEnd" | |
| Style="overflow: hidden" > | |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Width="100%" Height="100%"> | |
| <div class="loaderPanelStyle"> | |
| <asp:Image ID="ajaxLoader" runat="server" SkinID="loaderGif" CssClass="loaderGifStyle" /> | |
| <asp:Label ID="lblloader" runat="server" Text="Loading..." CssClass="loaderTextStyle"></asp:Label> | |
| </div> | |
| </telerik:RadAjaxLoadingPanel> | |
| <div id="formPanel"> | |
| <button>do postback</button> | |
| </div> | |
| </telerik:RadAjaxPanel> |
I am using a textboxes in a FormTemplate. The regular textbox is styled by the grid skin; for some reason the multiline textbox is not styled and font is defaulting to courier. I tried overriding the with local css:
.GridEditForm_Telerik textarea { border:1px solid #828282; font:12px arial,sans-serif; color:#272722; }
Any ideas?
Version 2009.1.311.35
Sample code:
<EditFormSettings EditFormType="Template" CaptionDataField="ClientName" >
<FormTemplate>
<table cellpadding="5" cellspacing="1" width="800" border="0">
<tr>
<td>Address:</td>
<td>
<asp:TextBox ID="txt_Addr" runat="server" Text='<%# Bind( "Addr") %>'
TextMode="MultiLine" Rows="4" Width="300">
</asp:TextBox>
</td>
</tr>
<tr>
<td>City:</td>
<td>
<asp:TextBox ID="txt_City" runat="server" Text='<%# Bind( "City") %>' Width="300">
</asp:TextBox>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
|
SqlConnection
Stringcon = new SqlConnection(ConfigurationManager.ConnectionStrings["IBOS.Properties.Settings.ConnString"].ToString());
protected void RadGrid1_PreRender(object sender, EventArgs e) |
|||||||||||||||||||||
| { | |||||||||||||||||||||
| if (RadGrid1.MasterTableView.FilterExpression != string.Empty) | |||||||||||||||||||||
| { | |||||||||||||||||||||
| ReloadCombos(); | |||||||||||||||||||||
| } | |||||||||||||||||||||
| } | |||||||||||||||||||||
| protected void ReloadCombos() | |||||||||||||||||||||
| { | |||||||||||||||||||||
| SqldatasourceSqldatasource.SelectCommand = Sqldatasource.SelectCommand + " WHERE " + RadGrid1.MasterTableView.FilterExpression.ToString(); | |||||||||||||||||||||
| RadGrid1.MasterTableView.Rebind(); | |||||||||||||||||||||
| } ============================================================= this is my method supposed to used but i wasnt able to use this becuase of the format above which is the RadGrid1.MasterTableView.FilterExpression, how can change that to get only the DataFieldValue on the Radcombobox? ============================================================ |
|||||||||||||||||||||
| protected void RebindGrid(string key) | |||||||||||||||||||||
| { | |||||||||||||||||||||
| SqlDataAdapter ad = new SqlDataAdapter(); | |||||||||||||||||||||
| DataSet ds = new DataSet(); | |||||||||||||||||||||
| SqlCommand cmd = new SqlCommand("spu_CARFILTERING_SAMPLE_SELECT", Stringcon); | |||||||||||||||||||||
| cmd.CommandType = CommandType.StoredProcedure; | |||||||||||||||||||||
| Stringcon.Open(); | |||||||||||||||||||||
| cmd.Parameters.Add("@username", SqlDbType.Char, 50).Value = key.Trim(); | |||||||||||||||||||||
| try | |||||||||||||||||||||
| { | |||||||||||||||||||||
| ad.SelectCommand = cmd; | |||||||||||||||||||||
| ad.Fill(ds, "tblMaster05Users"); | |||||||||||||||||||||
| this.RadGrid1.DataSource = ds; | |||||||||||||||||||||
| this.RadGrid1.DataMember = "tblMaster05Users"; | |||||||||||||||||||||
| this.RadGrid1.DataBind(); | |||||||||||||||||||||
| Stringcon.Close(); | |||||||||||||||||||||
| } | |||||||||||||||||||||
| catch (Exception ex) | |||||||||||||||||||||
| { | |||||||||||||||||||||
| throw ex; | |||||||||||||||||||||
| } | |||||||||||||||||||||
| } ================================================ my method binding the radcombobox protected void bindcombox() {
} =============================================================================== below is my default.aspx where i use sqldatasource following the example..but how can i bind the radcombobox as a filtertemplate inside the grid using the way i codes above "bindcombox()"? ================================================================================ <
telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None"
Skin="Web20" Width="344px" AllowFilteringByColumn="True" OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound">
<MasterTableView DataKeyNames ="fcUserName">
<Columns>
<telerik:GridBoundColumn HeaderText="UserID" UniqueName="UserID" DataField="fxKeyID" AllowFiltering ="false" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Username" UniqueName="Username" DataField="fcUserName" AllowFiltering ="false" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField ="fcUserName" HeaderText ="Combo" UniqueName="Upload">
<FilterTemplate>
<telerik:RadComboBox runat ="server" ID ="Radcombo" OnClientSelectedIndexChanged="ComboIndexChanged"
AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Upload").CurrentFilterValue %>'
DataTextField ="fcUserName" DataValueField ="fcUserName" DataSourceID ="Sqldatasource">
<Items>
<telerik:RadComboBoxItem Text ="All" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID ="RadScriptBlock1" runat="server">
<script type="text/javascript">
function ComboIndexChanged(sender,args)
{
var tableView=$find("<%#((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter( "Upload",args.get_item().get_value(),"EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<% --SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("UserID").CurrentFilterValue %>'
OnClientSelectedIndexChanged="TitleIndexChanged">--
%>
<asp:SqlDataSource ID="Sqldatasource" ConnectionString ="<%$ ConnectionStrings:IBOS.Properties.Settings.ConnString %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT fxKeyID, fcUserName FROM tblMaster05Users"
runat="server"></asp:SqlDataSource>
|
| editors.Add((GridTextBoxColumnEditor)item.EditManager.GetColumnEditor(row["field_name"].ToString())); |
| cells.Add((TableCell)editors[editors.Count - 1].TextBoxControl.Parent); |
| regs.Add(new RegularExpressionValidator()); |
| editors[editors.Count - 1].TextBoxControl.ID = row["field_name"].ToString() + "_validation"; |
| regs[regs.Count - 1].ControlToValidate = editors[editors.Count - 1].TextBoxControl.ID; |
| regs[regs.Count - 1].ErrorMessage = "Please enter int"; |
| regs[regs.Count - 1].ValidationExpression = @"^\d+$"; |
| cells[cells.Count - 1].Controls.Add(regs[regs.Count - 1]); |