Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
147 views
I am working on a web app in which we have several fields that are technically free-text, but we want the users to reuse values already in the database if possible to avoid retyping, typos, duplication, etc. For this, I am trying to use the combobox with a substring filter. The problem I am running into is this: I do not want the dropdown to appear when the user clicks in the textbox, but I do want it to appear when they type something and the list is being filtered. Kind of like the Google suggest, but without the server round-trip. The way the Infragistics combobox works with filtering is basically what I am looking for. Is there a way to get this done with the Telerik combobox? Or can I get what I am looking for with another control?

Another thing I want to be able to do with a combobox is to require that the user pick one of the items, but still have the filter "lookup" capability. So basically they would still be able to type in whatever they want, but maybe when tabbing off some client-side validation would kick in.

Or, more generally, what controls/solutions do you use for the following situations:

 - select from a small/medium list
 - select from a large list
 - select from a small/medium list with optional free-text
 - select from a large list with optional free-text
 - what if select is preferred over free-text?


Thanks to anyone for input.
Gus Oakes
Top achievements
Rank 1
 answered on 17 Sep 2009
1 answer
132 views
I have sort of mentioned this in another post but, I think I need to explain it better and focus my post... I apologize for somewhat double posting. 

I have a requirement of needing InPlace editing (similar to a excel spreadsheet) but, Form based editing if the user double clicks the row.  The default state of the grid would be to allow editing in the fields but, if the user double clicks the row, the grid is replaced by an edit form for that row.

To further complicate things, the edit form will need to cycle through the grid on tabs (if the user presses tab on the last field in the edit form, it will display the data from the next row in the form... If no row exists, it will create a new row)

Any thoughts on how to approach this using as much of the built in grid functionality as possible.

- Thanks.
ram+telerik S
Top achievements
Rank 1
 answered on 16 Sep 2009
1 answer
118 views
This is my code for RadPanelBar which is in usercontrol:

            <Telerik:RadPanelBar runat="server" ID="RadPanelBar1"
            Width="100%" DataValueField="SomeVal" DataTextField="Name" >
            <CollapseAnimation Duration="100" Type="None" />
            <ExpandAnimation Duration="100" Type="None" />            
            <Items>
                
            </Items>
            </Telerik:RadPanelBar>  

UserControl Page_Load

            RadPanelBar1.ExpandMode = PanelBarExpandMode.SingleExpandedItem
            RadPanelBar1.DataFieldID = ""
            RadPanelBar1.DataFieldParentID = "Number"
            RadPanelBar1.DataSource = SomeObject
            RadPanelBar1.DataBind()


   Private Sub RadPanelBar1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadPanelBarEventArgs) Handles RadPanelBar1.ItemDataBound
        Dim ChlRadPanelItem As New RadPanelItem
        ChlRadPanelItem.Value = "Something"
        ChlRadPanelItem.ItemTemplate = New ItemTemplate()
        RadPanelBar1.Items.Add(ChlRadPanelItem)
    End Sub

Problem: PanelBar showing all items expanded
Sunny
Top achievements
Rank 1
 answered on 16 Sep 2009
2 answers
131 views
I'm evaluating using RADGrid for a project, and am having trouble finding out whether inplace editing is supported in a strictly client-side basis (i.e., with clientside databinding, and no UpdatePanels in the background). Is this possible? I've tried adding a GridEditCommandColumn, which does not seem to fire off properly in a working clientside databound example I'm working with.

Thanks in advance!
Jang-Soo Lee
Top achievements
Rank 1
 answered on 16 Sep 2009
6 answers
1.3K+ views
Hi

Can anyone tell me how I can style the RadDatePicker using style sheets? When I try to set the width and font size it makes no difference at all.

Thanks

Colin
Stephanie
Top achievements
Rank 1
 answered on 16 Sep 2009
2 answers
134 views
I have a project in which I have a hierarchical RadGrid contained within a UserControl (usrAccountOverview.ascx).  There is an aspx page that dynamically loads a number of these UserControls based upon which option a user selects in a DropDownList.  The RadGrid binds data just fine at the top of the hierarchy, and if you expand one top-level item in the hierarchy binding works fine within the DetailTable as well.  However, if the page posts back, none of the previously bound data reappears in any expanded DetailTables.

Here is the declarative code for the RadGrid

    <telerik:RadGrid ID="rgMonthly" runat="server" GridLines="None" OnColumnCreated="rgMonthly_ColumnCreated" 
        OnDetailTableDataBind="rgMonthly_DetailTableDataBind" OnItemDataBound="rgMonthly_ItemDataBound" 
        OnNeedDataSource="rgMonthly_NeedDataSource"> 
        <MasterTableView DataKeyNames="GroupID"> 
            <DetailTables> 
                <telerik:GridTableView Width="100%" runat="server" DataKeyNames="GroupID"> 
                    <ParentTableRelation> 
                        <telerik:GridRelationFields DetailKeyField="GroupID" MasterKeyField="GroupID" /> 
                    </ParentTableRelation> 
                </telerik:GridTableView> 
            </DetailTables> 
        </MasterTableView> 
    </telerik:RadGrid> 
 

I am loading the UserControls in the Page_Init method of the aspx page and binding them as in the following:

    protected void Page_Init(object source, System.EventArgs e) 
    { 
        BindSelectedInfo(); 
    } 
 
    protected void BindSelectedInfo() 
    { 
        try 
        { 
            DTSelectedAccts = TAAcctPi.GetData(Int32.Parse(Session["id"].ToString())); 
            for (int i = 0; i < 1; i++) 
            { 
                dsAccountProjections.dtAcctPiRow SelectedAcct = DTSelectedAccts[i]; 
                usrAccountOverview AccountOverview = (usrAccountOverview)LoadControl("~/usrAccountOverview.ascx"); 
                AccountOverview.ID = "usr" + SelectedAcct.SlAcct6Num; 
                AccountOverview.Acct.AcctNum = SelectedAcct.SlAcct6Num; 
                AccountOverview.PullAcctInfo(); 
                pnlHolder.Controls.Add(AccountOverview); 
            } 
        } 
        catch (Exception ex) 
        { 
 
        } 
    } 
 
    protected void rgMonthly_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
        if (!e.IsFromDetailTable) 
        { 
            rgMonthly.DataSource = DMonthlyExpenditures.GetMonthlyExpendituresByGroup(_Acct.AcctNum, firstMonthID, lastMonthID, lastMonthID); 
        } 
    } 
 
    protected void rgMonthly_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e) 
    { 
        GridDataItem parentItem = e.DetailTableView.ParentItem; 
        DataTable dtBind = DMonthlyExpenditures.GetMonthlyExpendituresBySubAcct(_Acct.AcctNum, firstMonthID, lastMonthID, lastMonthID, Int32.Parse(parentItem["GroupID"].Text)); 
        if (dtBind.Rows.Count > 0) e.DetailTableView.DataSource = dtBind; 
    } 

Is there some way of getting this to work?

Thanks,

Brian








Brian Furner
Top achievements
Rank 2
 answered on 16 Sep 2009
5 answers
271 views
Hi...

I'm trying to dynamically register some client script in a user control Page_Load method... This user control is triggered by a RadGrid through the EditMode...

AJAX SETTINGS :

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
      <AjaxSettings > 
          <telerik:AjaxSetting AjaxControlID="RadGrid1" > 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"/>  
               </UpdatedControls> 
              </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

GRID :

 <telerik:RadGrid ID="RadGrid1" runat="server">  
        <MasterTableView Name="masterView" GridLines="None" EditMode="PopUp" CommandItemDisplay="Top">  
            <CommandItemSettings AddNewRecordText="Add new entry" RefreshText="Refresh" /> 
            <EditFormSettings UserControlName="Control1.ascx" EditFormType="WebUserControl">  
            </EditFormSettings> 
        </MasterTableView> 
    </telerik:RadGrid> 

USER CONTROL UI
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Control1.ascx.vb" Inherits="TestClientScriptRegister.Control1" %> 
<asp:Button ID="Button1" runat="server" Text="Button" /> 

USER CONTROL SERVER SIDE CODE
 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
    Me.Page.ClientScript.RegisterClientScriptBlock(GetType(String), "Test", Me.GetScript(), True)  
    Me.Button1.Attributes("OnClick") = "Test()" 
  End Sub 
 
  Private Function GetScript() As String 
    Dim sb As New System.Text.StringBuilder()  
 
    sb.Append("function Test() {")  
    sb.Append("alert('what?');")  
    sb.Append("}")  
 
    Return sb.ToString()  
  End Function 

Quite basic stuff...  I know that there's some ways to achieve this without any dynamic script registering but for some reasons, I need to do it that way... 
I tried a bunch of stuff without any success...
 - EnablePageHeadUpdate = "true" in the AjaxManager
 - RadScriptManager.RegisterClientScriptBlock
 - Page.ClientScript.RegisterClientScriptBlock
 - RadAjaxManager.GetCurrent(Page).ResponseScripts

Some remarks...
 - Works well when using a radwindow that calls a page containing the user control.
 - Works well when I remove the ajaxsettings that update the RadGrid in the RadAjaxManager.

Am I missing something?  Maybe I'm not using the grid edit mode the right way...  Is there a way to achieve this?

Thanks for your help : )

Jose
Paul Mc
Top achievements
Rank 1
 answered on 16 Sep 2009
1 answer
91 views
Hi,

I have 2 Bowser Compactablity Issue.
1.Radio Buttons alignment issues in Firefix.
2.CreateTextRange is working IE but Firefox doesn't support... can any one tell me what is the equivalent for the same.


Please Can anyone help out in this.

Thanks,
Jaishri
Schlurk
Top achievements
Rank 2
 answered on 16 Sep 2009
3 answers
199 views
Hi

Is it possible to use OnClientTimeSlotClick and goto the selected date given from eventArgs.get_time()

Thanks
Peter
Telerik team
 answered on 16 Sep 2009
5 answers
1.0K+ views
I am really having trouble adding a template field to a RADGRID in my cs file. Here is what I have: 
public void BindData() 
        { 
            //Default.PK; 
            //int theUser; 
            //string email = Environment.UserName + "recyclingit.com"; 
 
            string sqlConnection = "Data Source=DESQL2008;Initial Catalog=DrawOnTime;User Id=ontimeweb;Password=ontime1234;", query; 
            query="select IncidentId, IncidentNumber, ReportedDate, Users.FirstName + ' ' + Users.LastName as 'IT Employee Assigned', StartDate, CompletionDate, WorkflowSteps.StepName" + 
" from incidents left join Users on Users.UserId=Incidents.AssignedToId left join WorkflowSteps on WorkflowSteps.WorkflowStepId=Incidents.WorkflowStepId where Incidents.ReportedByCustomerContactId = @PK"; 
            SqlConnection dbconn = new SqlConnection(sqlConnection); 
            dbconn.Open(); 
            SqlCommand myCommand = new SqlCommand(query, dbconn); 
            //myCommand.CommandType = CommandType.Text; 
            //SqlCommand secondCommand = new SqlCommand("select CustomerContactId from CustomerContacts where Email = @email", dbconn); 
            //secondCommand.CommandType = CommandType.Text; 
            SqlDataAdapter myAdapter = new SqlDataAdapter(myCommand); 
            DataSet ds = new DataSet(); 
            myCommand.Parameters.AddWithValue("PK", Default.PK); 
            myAdapter.Fill(ds); 
             
            //sqlquery.Parameters.AddWithValue("email", email); 
 
            myCommand.ExecuteScalar(); 
            RadGrid1.DataSource = ds; 
            RadGrid1.DataBind(); 
            TemplateColumn workFlow = new TemplateColumn(); 
            RadGrid1.Columns.Add(workFlow); 
            dbconn.Close();  
          
             
        } 
Mira
Telerik team
 answered on 16 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?