Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
<telerik:GridTemplateColumn DataField="DelFlag" HeaderText="Status" SortExpression="DelFlag"
                            HeaderStyle-HorizontalAlign="Center" UniqueName="DelFlag" Visible="true" AllowFiltering="false">
                            <ItemTemplate>
                                <asp:Button ID="btnStatus" Font-Size="11px" Width="65px" runat="server" Text='<%#Eval("DelFlag")%>'
                                    OnClientClick="javascript:return confirm('Are you sure want to update status !!?')"
                                    CommandName="Command" />
                            </ItemTemplate>
                            <ItemStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                        </telerik:GridTemplateColumn>


and following code on serverside .cs fle
 else if (e.CommandName == "Command")
            {
                GridDataItem item = (GridDataItem)e.Item;
                Button btnStatus = (Button)e.CommandSource;
                if (btnStatus.Text == "Deactivate")
                {
                    btnStatus.Text = "Activate";
                    string gameGID = Convert.ToString(((Label)item.FindControl("lblGameGID")).Text);
                    string delflag = "Y";
                    ds.UpdateCommand = "UPDATE tblGame SET DelFlag = '" + delflag + "' WHERE GameGID = '" + gameGID + "'";
                    ds.Update();
                    grdGameInfo.DataSource = ds;
                    grdGameInfo.DataBind();
                    grdGameInfo.Rebind();
                }
                else
                {
                    
                    btnStatus.Text = "Deactivate";
                    string gameGID = Convert.ToString(((Label)item.FindControl("lblGameGID")).Text);
                    string delflag = "N";
                    ds.UpdateCommand = "UPDATE tblGame SET DelFlag = '" + delflag + "' WHERE GameGID = '" + gameGID + "'";
                    ds.Update();
                    grdGameInfo.DataSource = ds;
                    grdGameInfo.DataBind();
                    grdGameInfo.Rebind();
                }


this will work if rad AJAX managar not on page.. If i put rad ajax .. the above scrip not working. It's only show alert message.. but server side event does not call. Please help how to call need urgent.
Princy
Top achievements
Rank 2
 answered on 10 Jan 2011
1 answer
92 views
I'm trying to get my RadGrid to allow updating to Oracle using a custom WebControl. I have went though numerous examples and always have one or two small things that dont seem to work correctly. There seems to be some many variations of hoiw this functioality works. Can someone please point me to an example using Oracle as the undelying database and allows updating ot the table via a custom Web Control?

Iana Tsolova
Telerik team
 answered on 10 Jan 2011
2 answers
237 views
I am researching the best way to hook a filter button to my grid header column rather than having a filter row displayed.  The filter row takes up too much space for what we are trying to do.  My idea would be to have an ImageButton that shows the filter image.  When the user clicks this button it would launch a radwindow to capture the criteria.  

My question is this:  Should I do this as a templated column?   It seems like the only way to add controls to the header is via a template.  The downside is that beyond that the column data is just a bound data column. 

Any recommendations or samples that I can refer to?

Randy
Niraj
Top achievements
Rank 1
 answered on 10 Jan 2011
1 answer
121 views
Hi there,

I have read the article here http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/clientapi/defaultcs.aspx in order to position the RadDatePicker popup. However, I get an error saying Telerik is Undefined due to the following code:

 

 

var startPicker = $("#<%=this.start.ClientID %>");

 

 

 

var endPicker = $("#<%=this.end.ClientID %>");

 

startPicker.set_popupDirection(Telerik.Web.RadDatePickerPopupDirection.TopRight);

endPicker.set_popupDirection(Telerik.Web.RadDatePickerPopupDirection.TopRight);

Can someone assist me in fixing this issue?

Shinu
Top achievements
Rank 2
 answered on 10 Jan 2011
1 answer
179 views
Hi,
Is there a way to add radio button to all cells of grid. Only one cell of the grid will be selected(checked) at same time. I couldn't find changing button type to radio. For normal radbutton, it  is "ButtonType="ToggleButton" ToggleType="Radio".

Think that there is a gird which has 3 columns and 3 rows.  First column's type is datetime. Other two columns' type is boolean and shown at cell as radio button.  User will be able to select only one radio of the matrix.

Regards,

view;
                   cola      colb   
date1              O        O
date2              O        O
date3              O        O


GridButtonColumn btnCol = new GridButtonColumn();
                btnCol.DataTextField = c.ToString();
                btnCol.HeaderText = dt.Columns[c].Caption;
                btnCol.HeaderStyle.Font.Bold = true;
                btnCol.ButtonType = GridButtonColumnType.LinkButton;
                rgridDeliveryDate.MasterTableView.Columns.Add(btnCol);
Princy
Top achievements
Rank 2
 answered on 10 Jan 2011
1 answer
213 views
Hi 
On my RadGrid i have some bound columns and some template columns.
I want to simply save all my RadGrid data into my sql datatable on a button click. 
Can anybody send some sample code for that using RadGrid.

Code for my radgrid is-

<telerik:RadGrid ID="GD_Prod" runat="server" AllowPaging="True" ShowHeader="False"
                    AutoGenerateColumns="False"  GridLines="None"
                    Height="173px" Skin="Outlook" Width="1107px">
                    <ClientSettings AllowColumnsReorder="True">
                        <Selecting AllowRowSelect="True" />
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    </ClientSettings>
                    <MasterTableView PageSize="5" >
                        <RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
    <Columns>
        <telerik:GridBoundColumn DataField="port_recipe_num" HeaderText="Recipe #" SortExpression="port_recipe_num"
            UniqueName="port_recipe_num" DataType="System.Char">
            <HeaderStyle Width="17px" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DESC_ALT" HeaderText="Description" SortExpression="DESC_ALT"
            UniqueName="DESC_ALT" DataType="System.Char">
            <HeaderStyle Width="36px" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="port_no_servings" HeaderText="Portion Size" SortExpression="port_no_servings"
            UniqueName="port_no_servings" DataType="System.Char">
            <HeaderStyle Width="16px" />
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn UniqueName="PL_STUDENT_Portions_Planned" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtSTUPort" DataField="PL_STUDENT_Portions_Planned" runat="server"
                    Height="16px" Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="19px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="PL_Adults_ALC_Portions_Planned" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtAAPort" DataField="PL_Adults_ALC_Portions_Planned" runat="server"
                    Height="16px" Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="19px" />
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="STD_NUM_OF_SERVING" DataType="System.Int32" HeaderText="STD_NUM_OF_SERVING"
            SortExpression="STD_NUM_OF_SERVING" UniqueName="STD_NUM_OF_SERVING">
            <HeaderStyle Width="14px" />
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn UniqueName="PL_Factor_Portions" DataType="System.Char">
            <ItemTemplate>
                <asp:TextBox ID="TxtFPort" DataField="PL_Factor_Portions" runat="server" Height="16px"
                    Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="18px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_Quantity_Of_Food_Used" DataType="System.Char">
            <ItemTemplate>
                <asp:TextBox ID="TxtQoFUsed" DataField="DOC_Quantity_Of_Food_Used" runat="server"
                    Height="16px" Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="20px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_Portions_Prepared" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtPPort" DataField="DOC_Portions_Prepared" runat="server" Height="16px"
                    Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_Portions_Brought_Forward" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtBFPort" DataField="DOC_Portions_Brought_Forward" runat="server"
                    Height="16px" Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_Portions_LeftOver" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtLOPort" DataField="DOC_Portions_LeftOver" runat="server" Height="16px"
                    Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_LeftOver_Code" DataType="System.Char">
            <ItemTemplate>
                <asp:DropDownList ID="ddlLOCode" DataField="DOC_LeftOver_Code" runat="server" Font-Size="10px"
                    Height="16px" Width="46px">
                    <asp:ListItem>CF</asp:ListItem>
                    <asp:ListItem>DIS</asp:ListItem>
                    <asp:ListItem>ALC</asp:ListItem>
                    <asp:ListItem>RTB</asp:ListItem>
                    <asp:ListItem>RTF</asp:ListItem>
                </asp:DropDownList>
            </ItemTemplate>
            <HeaderStyle Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_Total_Portions_Served" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtTSPort" DataField="DOC_Total_Portions_Served" runat="server"
                    Height="16px" Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn UniqueName="POSStudents"
            DataType="System.Int32" DataField="POSStudents" HeaderText="POSStudents" 
            SortExpression="POSStudents">
            <HeaderStyle Width="18px" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="POSAdultsALC"
            DataType="System.Int32" DataField="POSAdultsALC" HeaderText="POSAdultsALC" 
            SortExpression="POSAdultsALC">
            <HeaderStyle Width="16px" />
        </telerik:GridBoundColumn>
    </Columns>
    <PagerStyle AlwaysVisible="True" />
</MasterTableView>
                </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 10 Jan 2011
2 answers
121 views
I am new to Telerik - and fairly new to ASP.NET - so please bare with me...

I have one master grid - and one detail grid.  In the detail grid I have a hyperlink (Link Button).

This hyperlink is meant to open an Image (PDF) in my SQL database.  

I figured I would do this by sending the value of the clicked item (a GUID) to the code behind - so I can then search for the image and open it up. Whatever I do, I can't figure out how to pass the GUID that was selected to the code behind.

I was able to get the value of every GUID in the column - but not the one I selected.  Could anyone steer me on the right path?  I have spent days trying to do this - I would think that this should be fairly easy...

HTML
<asp:LinkButton runat="server" CausesValidation="false" CommandName="Select"
    Text="View"></asp:LinkButton>

VB.NET
Protected Sub RadGrid2_SelectedIndexChanged(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid2.SelectedIndexChanged
 
    Dim gridDataItem As GridDataItem = TryCast(e.Item, GridDataItem)
    If e.Item.OwnerTableView.GetColumnSafe("GUID") IsNot Nothing Then
 
        Dim cell As TableCell = TryCast(gridDataItem("GUID"), TableCell)
    End If
End Sub
Samantha
Top achievements
Rank 1
 answered on 10 Jan 2011
1 answer
122 views
Hi Telerik,


I want to set width and behaviors of ImageManager in RadEditor, but I don't find any properties to change ImageManager look like


RadEditor1.ImageManager.Behaviors = WindowBehaviors.Move | WindowBehaviors.Close | WindowBehaviors.Maximize | WindowBehaviors.Resize;
RadEditor1.ImageManager.Width = Unit.Pixel(1366);


This problem is similar to FlashManager, DocumentManager, TemplateManager, MediaManager
Rumen Jekov
Top achievements
Rank 1
 answered on 10 Jan 2011
1 answer
107 views
Hello Rad-Community!

I´m trying to make the Grid support insert/update in a unlimited Category function based on a ID/ParentID structure. It´s very easy to make this work in one level scenario or where you know how deep things will go. It´s also very easy to just show an unlimited level structure WITHOUT insert/update. 

I havent found an example where it shows how this is done in an unlimited nested version.with insert/update function

Is there anyone out there that have made this and are willing to share an example.

/M
Mike Nogen
Top achievements
Rank 1
 answered on 09 Jan 2011
1 answer
119 views
Hi,

I'm using the example http://demos.telerik.com/aspnet-ajax/combobox/examples/programming/performance/defaultcs.aspx
and needed to make a change in case of webservice, but I have no idea how.

In the example listed webservice code checks the value of the information reported for the combobox and performs a filter on the database, I needed to make a filter using another combobox to check the values listed, as is being done?
msigman
Top achievements
Rank 2
 answered on 09 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?