Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
36 views

Hi

I have a grid as shown below. I open a web user control for editing records. Instead of an edit button, my user community has requested that the web user control be opened by clicking on the row. I know I can use client-side row select this way but I am not sure if there is a way I can use it to open the web user control to edit the record. Can you please advise. thx Michael

<telerik:RadGrid ID="rgAppointments" Width="100%" runat="server" AllowSorting="True" GridLines="None" PageSize="20" Skin="WebBlue"

AutoGenerateColumns="False" AllowFilteringByColumn="False" AllowPaging="True" AutoGenerateEditColumn="True"

AutoGenerateDeleteColumn="False" OnNeedDataSource="rgAppointments_NeedDataSource" OnItemDataBound="rgAppointments_ItemDataBound"

OnInsertCommand="rgAppointments_InsertCommand" OnUpdateCommand="rgAppointments_UpdateCommand" >

<HeaderContextMenu EnableTheming="True">

<CollapseAnimation Duration="200" Type="OutQuint" />

</HeaderContextMenu>

 

 

<MasterTableView>

<RowIndicatorColumn>

<HeaderStyle Width="20px" />

</RowIndicatorColumn>

<ExpandCollapseColumn>

<HeaderStyle Width="20px" />

</ExpandCollapseColumn>

<Columns>

<telerik:GridBoundColumn DataField="id" UniqueName="id" Display="false"></telerik:GridBoundColumn>

<telerik:GridDateTimeColumn DataType="System.DateTime" HeaderText="Date" UniqueName="appointment_date" DataField="appointment_date" DataFormatString="{0:d}">

</telerik:GridDateTimeColumn>

<telerik:GridDateTimeColumn HeaderText="Start Time" PickerType="TimePicker" UniqueName="start_time" DataField="start_time">

</telerik:GridDateTimeColumn>

<telerik:GridBoundColumn DataField="Location" HeaderText="Location" UniqueName="location">

</telerik:GridBoundColumn>

<telerik:GridCheckBoxColumn DataField="confirmed" DataType="System.Boolean" HeaderText="Confirmed"

UniqueName="column">

</telerik:GridCheckBoxColumn>

<ItemStyle Wrap="False" />

</telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="canceled_reason" HeaderText="Cancel" UniqueName="column2">

</telerik:GridBoundColumn>

</Columns>

<PagerStyle Mode="NextPrevAndNumeric" />

<CommandItemSettings AddNewRecordText="Add new appointment" />

<EditFormSettings EditFormType="WebUserControl" UserControlName="PatientAppointmentControl.ascx">

<PopUpSettings Height="420px" Width="700px" Modal="True" ZIndex="2500" />

</EditFormSettings>

</MasterTableView>

<ClientSettings>

<Scrolling ScrollHeight="100px" />

<Selecting AllowRowSelect="True" />

</ClientSettings>

<FilterMenu EnableTheming="True" Skin="Telerik">

<CollapseAnimation Duration="200" Type="OutQuint" />

</FilterMenu>

<GroupingSettings CaseSensitive="False" />

</telerik:RadGrid>

Tsvetina
Telerik team
 answered on 15 Nov 2011
1 answer
42 views
I have a RadGrid being populated by an IEnumerable list of custom business objects (Orders). I am trying to compile a list of line items to add to the new order prior to saving (creating & inserting order in database) I am using a PopUp edit form for the RadGrid that has a RadListView on it. What is the best way to populate a list of items in memory that can be used both to databind to the RadList and create line items when the user chooses to "save" the Order? I can't save the list to the database, because an Order must exist first to reference to.
Tsvetina
Telerik team
 answered on 15 Nov 2011
1 answer
122 views
I am using telerik Rad Tabstrip in my aspx page, the problem is, the Tabstrip is working fine in IE 7,8,9, opera and firefox,  but it's not working in safari and google chrome.
How can I solve this problem ????
Princy
Top achievements
Rank 2
 answered on 15 Nov 2011
3 answers
140 views
Hi,

Does any one know how to add custom filtertemplates in RadGrid dynamically? I have a RadGrid with column filtering. The colums are built dynamically based on datatype. For numeric it uses GridNumericColumn and for date it uses GridDateTimeColumn. The numeric column filter box puts comma after you have entered the numbers. I do not want the comma to appear. I also want to limit the text length entered in the filter field.

Thanks,
Raji
Shinu
Top achievements
Rank 2
 answered on 15 Nov 2011
11 answers
228 views
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
        //access_layerDataContext db=new access_layerDataContext();
        ques_tbl t1= new ques_tbl();
            if (e.Row.DataItem == "qAnswered")
            {
                Image img = (Image)e.Row.FindControl("image1");
                if (t1.qanswered == true)
                {
                    img.ImageUrl = "/images/question_mark.jpg";
                }
            }
            }
Is my code with simple asp.net Grid 
now for telerik I wrote the following but its not helping me .
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
         
        if (e.Item.Cells[1].Text== "True")
        {
            Image img = (Image)e.Item.FindControl("Image1");
            img.ImageUrl = "/images/question_mark.jpg";
             
        }
    }
and I am getting this error ,at Line 55  the index is out of Range .
Line 53:     {
Line 54:         ques_tbl t1 = new ques_tbl();
Line 55:         if (e.Item.Cells[1].Text== "True")
Line 56:         {
Line 57:             Image img = (Image)e.Item.FindControl("Image1");
Jayesh Goyani
Top achievements
Rank 2
 answered on 15 Nov 2011
1 answer
51 views
Hi There,

I'm getting an error becuase i have HTML characters... can anyone explain how i can replace text in the cells on exporting?

I'm using VB codebehind.

Many thanks,

S
Shinu
Top achievements
Rank 2
 answered on 15 Nov 2011
2 answers
234 views
Hi,

I am using this demo to allow me to open rad windows from my RadGrid:  http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

My challenge is that I need to encrypt my URL parameters server side.  I think this would be simple if I could grab the Primary Key as each item is created on the grid.  But, I cannot seem to get the syntax correct to get that ID of the items DataKey.  I've tried variations of this statement:

Dim myIndex As Integer = e.Item.ItemIndex
 
If myIndex > 0 Then
 
    Dim myPK As String = e.Item.OwnerTableView.Items(myIndex)("QuestionID").Text
 
    'Then encrypt from here and add to the function defined in the link in the "template" column.
 
End If

Most of my errors seem to be around e.Item.ItemIndex.  Any help?

Jim
James
Top achievements
Rank 1
 answered on 15 Nov 2011
1 answer
227 views
Is there a way to change the default radalert,radconfirm,radprompt window height?  I didn't see anything in the css file for this.

I don't want to have to pass a height or width to the windows as I want them to autosize.  However the minimum height is too big. If i send text to a radalert:  radalert('Too Big!') for instance.  The height of the window is twice the size needed. 
Princy
Top achievements
Rank 2
 answered on 15 Nov 2011
1 answer
174 views
I want to show checkboxes for only child nodes i.e hide checkbox for paent nodes.
Shinu
Top achievements
Rank 2
 answered on 15 Nov 2011
1 answer
75 views
Treeview is not in expanded state after postback.I want to retain the same after postback.how can I do this?
Shinu
Top achievements
Rank 2
 answered on 15 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?