Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
538 views

How can I set the RadTextBox disabled style using .css file? Somehow the style is not being recognized.

<telerik:RadTextBox ID="RadTextBox1" runat="server" Text="Johnson Grammer" Skin="Office2007">
<DisabledStyle CssClass="disableField" />
</telerik:RadTextBox>

My style sheet entries. I tried both but didn't work. What am i doing wrong?

.disableField .RadInput .riTextBox  

{
background-color: #EFEFEF;
font-weight: bold;
}

 
.disableField1
{
 background-color: #EFEFEF;
 font-weight: bold;
 }

I could achieve this by doing like this but I would like to use the.css so I can change at once.

<telerik:RadTextBox ID="RadTextBox1" runat="server" Text="Johnson Grammer" Skin="Office2007">
        <DisabledStyle BackColor="#EFEFEF" BorderColor="Black" Font-Bold="True" />
</telerik:RadTextBox>

I found a style sheet example for Radcombobox from Telerik site which works great for RadComboBox. But was not able to get it work for text box.
http://www.telerik.com/help/aspnet-ajax/appearance-change-input-look-tutorial.html

Thanks in Advance.

Nalini
Top achievements
Rank 1
 answered on 13 Aug 2010
4 answers
1.4K+ views
I have not found any simple declarative property that enables me to set the width of textboxes for editable GridBoundColumns in RadGrid.I tried ItemStyle-Width but that does not seem to work. Setting MaxLength does not alter the visual display size of the TextBox control.

So how to do it ? in a simple declarative way for textboxes when using EditMode="EditForms"It seems that this is an important feature that should be easy to set declaratively in the *.aspx file....

If it's not possible, then I hope the next release will add this important feature!!!
Graham
Top achievements
Rank 1
 answered on 13 Aug 2010
3 answers
391 views
I have been asked by a friend to develop a room booking system for his office, I am developing it in VB.NET as a windows application using SQL 2008 back-end. I have created 3 forms Login, Users and Admin only the Admin will be able to book a room the user will have view only access. I notice the RadScheduler has either changed since 2009 version or its different in ASP.NET I have created a table in the database called Rooms with the following tables :- roomID, bookedIN, bookedOUT. the room id is the name or number of the room to be booked and the bookedIN/bookedOUT is datetime is it possible to edit the EditAppointment screen to always have RoomBooked as subject and have the location as a drop down list of roomID's that would be populated from the database. can the EditAppointment form be edited to not show resources.

I hope all this makes sense any suggestions greatly received

thanks
M
Stefan
Telerik team
 answered on 13 Aug 2010
1 answer
79 views

Hi All,

i have a form that contains RadTreeview. if we check any radnode,it opens the Radwindow. here i would like to pass entire node  to radwindow. i want to use that node values in Radwindow.

pls help to resolve this.


Thanks and Regards,
Srikanth.
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2010
1 answer
182 views
I have a main grid that has a NestedViewTemplate that contains a tabstrip with each tab containing its own grid.
One of these nested grids needs dynamically created columns but I also need to get the ID field that relates the nested grid to the parent grid so that I can run a query to determine the columns to add.

All of the samples I have seen show how to build the dynamic content on Page_Init, but when do you do it if you need to build the columns based on the value of the selected row in the parent grid?

Martin
Telerik team
 answered on 13 Aug 2010
1 answer
98 views
Hi

I have a requirement to implement 2 custom dialogs in the RadEditor.  I have already implemented a custom provider for the Image/Media/Flash/Document managers which works well.  These 2 new additional dialogs are to work in a very similar way and have the same "look and feel".

The first dialog is the more basic of the 2 custom dialogs.  It should function much like the Document Manager with a treeview on left (driven using a custom provider for folders/items), items for user to select in middle and just an insert/cancel button on right (i.e. no preview or custom properties).

The second dialog is identical to the above with the exception that when the user clicks items in the middle column the right column needs to load a custom form - the structure of which will change depending on the item which was clicked.  Im assuming that this may be possible with some sort of Ajax callback which uses server side code to query my database and decide on which custom fields my form requires ?

I have attached an image which shows how dialog 2 is to work (based on the Document Manager).  I have looked at the online demo which shows how to create completely custom dialogs but im struggling with :
(a) how to implement the File Manger inside my custom dialog so it looks like one of the out of the box Telerik managers (e.g. doc manager)
(b) how to implement the item click/custom form scenario which forms part of my 2nd custom dialog above.

Do you have any suggestions/code samples which you could point me at to help ?

Thanks

Steve
Stanimir
Telerik team
 answered on 13 Aug 2010
1 answer
423 views
Hi,

1) How do I get the DataKeyValues (ID) of the selected item?

<telerik:RadGrid ID="GridDocument" runat="server">
<MasterTableView DataKeyNames="ID">
    <Columns>
        ...
    </Columns>
</MasterTableView>
<ClientSettings>
    <Selecting AllowRowSelect="True"></Selecting>
</ClientSettings>
</telerik:RadGrid>

2) Is there a url that I can refer to the Client Object API?

Thanks in advance.

Jing
Princy
Top achievements
Rank 2
 answered on 13 Aug 2010
3 answers
147 views
I have looked through many articles and examples, but I cannot find something that will work with what I am trying to accomplish.

We do not use the grid's filtering capability. Rather, we have a panel that has all filtering necessary with the buttons to apply and clear the filter. We are also using advanced databinding (NeedDataSource event) with stored procedures. I would like to use data binding with web services, but the problem that we have converting to this model is the filter expressions. Any suggestions? Questions?
Maria Ilieva
Telerik team
 answered on 13 Aug 2010
3 answers
315 views
is it possible to make the panel header to become a link without interfering the collapse / expand button

my current HTML code is
<telerik:RadPanelBar ID="rpMainMenu" runat="server">
    <Items>
        <telerik:RadPanelItem runat="server" Text="Main Menu" ImageUrl="~/images/AddRecord.gif">
            <Items>
                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 3">
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>
Nikolay Tsenkov
Telerik team
 answered on 13 Aug 2010
2 answers
308 views
Good Day All

I have a Method that i have defined that i will access in JavaScript(Page Method) and its defined like this


  
[WebMethod, System.Web.Script.Services.ScriptMethod]
 public static void Getadata(String StrSearch)
 {
     View obj = new View();
     obj.Bind_SearchBox(StrSearch);
          
    // return Scriptt;
 }


And the Bind_SearchBox() method is a non static method that is defined in this code behind of this page and View is the class name of the Page.  Now i debugged this and i see the results are passed to the method and the Method is Defined like this
 
 
public void Bind_SearchBox(String Search)
    {
 
 
        ViewerService.ViewerService obj = new ViewerService.ViewerService();
 
        String SessionKey = obj.newSession();
 
        DateTime Date1 = Convert.ToDateTime("1980-01-01");
        DateTime Date2 = Convert.ToDateTime("2012-12-31");
 
        ViewerService.extract extract = obj.getObjects(SessionKey, Search, Date1, false, Date2, false, "", "");
        try
        {
            RadPanelBar1.Items.Clear();
            RadScheduler1.Appointments.Clear();
 
            int Len = extract.set.Length;
            for (int i = 0; i < Len; i++)
            {
                ViewerService.vertex value = extract.set[i];
 
                String PanelClass = value.meta;
                PanelClass = PanelClass.Replace(Remstr, "");
                PanelClass = PanelClass.Replace(Remstr2, "");
                Appointment app = null;
                if (value.atom != null)
                {
 
                    RadPanelItem pane = RadPanelBar1.Items.FindItemByText(PanelClass);
                    if (pane == null)
                    {
                        RadPanelItem nwpane = new Telerik.Web.UI.RadPanelItem(PanelClass);
                        RadPanelItem nwpaneSpliter = new Telerik.Web.UI.RadPanelItem(PanelClass);
                        nwpaneSpliter.IsSeparator = true;
                        RadPanelBar1.Items.Add(nwpane);
                        pane = nwpane;
                    }
                    if (value.meta == "za.co.abacus.C_EVENT")
                    {
                        app = new Appointment();
                    }
 
                    int atomLen = value.atom.Length;
                    for (int j = 0; j < atomLen; j++)
                    {
                        ViewerService.atom atm = value.atom[j];
 
                        if (atm.meta.Contains("za.co.reactor.A_LABEL"))
                        {
                            RadPanelItem NewItem = new RadPanelItem(atm.content);
                            pane.Items.Add(NewItem);
                            if (app != null)
                            {
                                app.Subject = atm.content;
                                app.Description = atm.content;
                                app.ID = value.key;
                            }
 
                        }
 
                        if (app != null && atm.meta.Contains("za.co.abacus.C_EVENT"))
                        {
                            app.ID = atm.content;
                        }
                        if (app != null && atm.meta.Contains("za.co.reactor.A_HORIZON"))
                        {
                            app.Start = Convert.ToDateTime(atm.content);
                        }
                        if (app != null && atm.meta.Contains("za.co.reactor.AA_HORIZON"))
                        {
                            app.End = Convert.ToDateTime(atm.content);
                        }
                        if (app != null && atm.meta.Contains("za.co.reactor.A_TEXT"))
                        {
                            app.Description = atm.content;
                        }
  
                        if (app != null && app.End > app.Start)
                        {
                            RadScheduler1.DataStartField = app.Start.ToString();
                            RadScheduler1.DataSubjectField = app.Subject.ToString();
                            RadScheduler1.DataEndField = app.ToString();
                            RadScheduler1.DataKeyField = app.ID.ToString();
                            RadScheduler1.SelectedView = SchedulerViewType.MonthView;
                            RadScheduler1.SelectedDate = app.Start;
                            RadScheduler1.Visible = true;
 
                        }
                    }
 
 
                }
 
            }
        }
        catch (ApplicationException ex)
        {
 
        }
        finally
        {
            obj.closeSession(SessionKey);
 
        }
  
 
    }


Now this Function works well and it has no problems , in the debug more, i check the value that is supplied to this function from the page method function its fine.  and my JS looks like this

function keyPress() {
     var tb = document.getElementById("<%=txtsearchid%>");
     if (tb.value.length == 2) {
         PageMethods.Getadata(tb.value);
         ToggleCollapsePane();
 
     }
     return false;
 }


and the Toggle function
 
 
function ToggleCollapsePane() {
 
        var splitter = $find("RadSplitter1");
 
        var pane = splitter.getPaneById("LeftPane");
 
        if (!pane) return;
 
        if (pane.get_collapsed()) {
            pane.expand();
        }
        else {
            pane.collapse();
 
        }
    }

so the Getadata() Function will call the Bind_SearchBox() Function and pass the Parameter and the function Bind_SearchBox() will do the Job as you can see at the end it sets some control to visible. But this does not bring me back results(The RadScheduler1 is not binded with data and RadPanelBar1 does not show anything)

I had a search button that is that was calling the same method and passing the same parameters but it could show results and it looked like this
 
protected void btnSearch_Click(object sender, EventArgs e)
    {
 
        RadToolBarItem textItem = RadToolBar1.FindItemByText("Button1");
 
        TextBox txtseach = (TextBox)textItem.FindControl("txtsearch");
 
        if (txtseach.Text != "")
        {
            Bind_SearchBox(txtseach.Text.Trim());
 
        }
 
    }


If i click this above button it will show results. The [B]txtseach[/B]  have the same text and it calls the same method but when i call this function and inject parameters from page method it does not work.

I realized that when i debug , when it comes to this line

RadPanelBar1.Items.Clear();
RadScheduler1.Appointments.Clear();

and this one

RadPanelItem pane = RadPanelBar1.Items.FindItemByText(PanelClass);

the Code exists the Loops and go straight to the Finally block

I am Surprised.

Thanks 
Vuyiswa
Top achievements
Rank 2
 answered on 13 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?