Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
82 views

<telerik:GridDropDownColumn  DataField="UserName" DataSourceID="ObjectDataSource2"

                        DropDownControlType="DropDownList" EmptyListItemText="--Select User--"

                        EmptyListItemValue="--Select User--" EnableEmptyListItem="true" HeaderText="User"

                        ListTextField="FullName" ListValueField="UserName" UniqueName="FullName">

 

How can I get

Username in  
Private Sub validator3_ServerValidate()

Using

Dim clickedItem As Telerik.Web.UI.GridDataItem = CType(CType(source, CustomValidator).NamingContainer, Telerik.Web.UI.GridDataItem)

from here what to do ? to get the seleted value

Princy
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
172 views
hi,
I want to display the radprompt on clicking on the Linkbutton using code-behind(vb).How to perform this?
Also in the radprompt ,I need to display 1  textbox .If the user edit in the textbox and click OK , I need to insert the value in the database.How can I do this using code-behind(vb).Because i m a beginner in scripts.
Thanks & regards
Kadar
Princy
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
155 views
Not sure how to set the delete command dynamically. Here is the code...


<telerik:RadGrid AutoGenerateColumns="False" ID="RADGRIDUnread" DataSourceID="SqlDataSource1" 
            Width="760px" AllowFilteringByColumn="True" AllowSorting="True" 
            PageSize="15" ShowStatusBar="True" ShowFooter="True" AllowPaging="True" runat="server" 
            GridLines="None" EnableLinqExpressions="False" AutoGenerateDeleteColumn="True"  
                    Skin="Sunset" AllowAutomaticDeletes="True" ShowGroupPanel="True"> 
            <PagerStyle Mode="NextPrevAndNumeric" /> 
            <GroupingSettings CaseSensitive="false" /> 
            <MasterTableView OnSelectedIndexChanged="Test" AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True" DataKeyNames="MessageID" 
                ShowFooter="True" TableLayout="Auto"> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="MessageID" Display="false" UniqueName="MessageID"></telerik:GridBoundColumn> 
                     <telerik:GridBoundColumn FilterControlWidth="100px" DataField="MessageSubject" HeaderText="Subject" SortExpression="MessageSubject" UniqueName="MessageSubject"></telerik:GridBoundColumn> 
                     <telerik:GridBoundColumn FilterControlWidth="100px" DataField="FromName" HeaderText="From" SortExpression="FromName" UniqueName="FromName"></telerik:GridBoundColumn> 
                     <telerik:GridBoundColumn FilterControlWidth="100px" DataField="MessageDate" HeaderText="Sent" SortExpression="MessageDate" UniqueName="MessageDate"></telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings AllowDragToGroup="True"> 
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
                 
                <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:AbsorbConnectionString %>" 
            ProviderName="System.Data.SqlClient" runat="server"> 
         
        <DeleteParameters> 
                <asp:Parameter Name="MessageID" Type="Int32" /> 
            </DeleteParameters> 
         
        </asp:SqlDataSource>

And the codebehind...

string sSQLDelete = "delete from messages where MessageID = ?"; 
 
SqlDataSource1.DeleteCommand = sSQLDelete; 

Vlad
Telerik team
 answered on 05 Oct 2009
2 answers
201 views
Hi Telerik Team.
I am using client side binding via WCF service and have the following issue.
In my grid there is bound column of DateTime type.
<telerik:GridBoundColumn DataField="LastUpdated" HeaderText="Last Updated" AllowFiltering="false"
DataType=
"System.DateTime"  DataFormatString="{0:MM/dd/yyyy hh:mm tt}"> 
<HeaderStyle Width="15%" Wrap="false"/> 
</telerik:GridBoundColumn> 

My project is deployed to server which current time is GMT -7. My current time is GMT +3

On the screenshot you will find two grids.
On the left there is my local browser which shows incorrect value in the column
On the right - browser on the same server with the  project. It shows correct date values.

If i change column type to string and perform date formatting in WCF service - date is shown correctly.

Can you please suggest what i am doing wrong (possibly some flag for grid?)

Thank you.
Oleg Medyanik
Top achievements
Rank 1
 answered on 05 Oct 2009
3 answers
70 views
I need the color of the tab strip to be the YUI Theme

This is so important to me.
Paul
Telerik team
 answered on 05 Oct 2009
1 answer
111 views

if i have a item like this
<
telerik:GridDropDownColumn  DataField="UserName" DataSourceID="ObjectDataSource2"

                        DropDownControlType="DropDownList" EmptyListItemText="--Select User--"

                        EmptyListItemValue="--Select User--" EnableEmptyListItem="true" HeaderText="User"

                        ListTextField="FullName" ListValueField="UserName" UniqueName="FullName">

 

How can I get

Username in    Private Sub validator3_ServerValidate()

am getting  up to

 

Dim clickedItem As Telerik.Web.UI.GridDataItem = CType(CType(source, CustomValidator).NamingContainer, Telerik.Web.UI.GridDataItem)


then what should i do to get the seleted value
?

Princy
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
226 views
Hi

I need to insert a customer logo above the grid table in both excel and pdf files.
It looks as expected with pdf,  but the Excel version shows the missing image icon instead.
What's the right way to do this (with image embedded, not pulled from the website)?

Thanks a lot for help on this.

Regards

Clive
Princy
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
188 views
Hi,
I've got a problem using the GridCheckBoxColumn. I'm using v.2009.2.826.35 with RadGrid and a LinqDataSource control. It picks up the boolean fields and chooses to use a GridCheckBoxColumn which is fine. The problem is that I can't get the checkbox filter to autoPostBack even though AutoPostBackOnFilter is set. I basically want to eliminate the need for the filter icon since the checkbox should be enough (then I just to set the CurrentFilterFunction to "EqualTo"), since it's a boolean field and there's already constraints on the DB to not allow nulls. There's no need for the filter menu icon.

AutoPostBack on all the other filters work fine. From the resulting HTML, it seems that no "onclick" event is being rendered as is done when you use a regular ASP:CheckBox and set AutoPostBack=true. All the the other filters with AutoPostBackOnFilter set (for other GridBoundColumns resulting in different input types such as textbox types) are rendered with an "onchange" client side event.

Anyway, here's the code for 2 such columns:
<telerik:GridCheckBoxColumn AutoPostBackOnFilter="True" CurrentFilterFunction="EqualTo" DataType="System.Boolean" 
                    DataField="Error" HeaderText="Error?" SortExpression="Error" UniqueName="Error" 
                    CurrentFilterValue="True" ReadOnly="True" ShowFilterIcon="false"> 
</telerik:GridCheckBoxColumn> 
<telerik:GridCheckBoxColumn AutoPostBackOnFilter="True" DataField="Truncated" DataType="System.Boolean" 
                    HeaderText="Trunc?" SortExpression="Truncated" UniqueName="Truncated" ReadOnly="True"> 
 </telerik:GridCheckBoxColumn> 

I've tried this many different ways with the properties set numerous ways and can never get the filter column for the check box to post back on check change. the user still haa to go to the filter icon and select "EqualTo" from the filter menu or get it to postback some other way (e.g. by using another filter with AutoPostBackOnFilter set).

Is this a bug or am I just missing something simple?
Is the only alternative to use FilterTemplate and/or GridTemplateColumn for every column I want to do this?

Thanks,
Brad

Tsvetoslav
Telerik team
 answered on 05 Oct 2009
1 answer
190 views
Anyone have any thoughts as to why the bullets show up in IE7 but not in IE8? The style below has a image as the bullet, because I couldn't get the normal bullet type to work. The image doesn't seem to work in iE8 as well.

Here is the code:
/*Tool Tips*/  
.tooltip  
{  
    padding: 10px;  
    width: 350px;  
    list-style-image: url('../../Images/bullet.gif');  
    line-height: 15px;} 

 

<telerik:RadToolTip ID="RadToolTip6" runat="server" RelativeTo="Element" TargetControlID="Image6" 
        Font-Size="Small" Skin="Sunset" Width="266px" Position="TopCenter" HideEvent="LeaveToolTip">  
        <div class="tooltip">  
            <h5> 
                Metropolitan Status</h5> 
            <hr /> 
            <p> 
                “Metropolitan Status” is based on the most recent data from the U.S. Census Bureau.  Your hospital will be categorized in one of three groups:  
            </p> 
            <ul> 
            <li>Metropolitan Area - in a county or group of counties that has an ‘urban core’ of at least 50,000 people </li> 
            <li>Micropolitan Area - in a county or group of counties that has an ‘urban core’ of 10,000 – 50,000 people </li> 
            <li>Non-Metropolitan, Non-Micropolitan Area - in a county that has small communities of  less than 10,000 people</li> 
            </ul> 
        </div> 
    </telerik:RadToolTip> 

 

 

Martin
Telerik team
 answered on 05 Oct 2009
1 answer
87 views
Hi 

We are using Rad Grid in our application to perform inline Edit.
The issue we have with inline edit is that When I double click the row to perform edit the first and the second row does not return GridDataItem instead it returns GridTHead and GridTFoot.
To be clear we are not using any CommandItemTemplate and the mastertableview commandItemDisplay property is set to None.

Explanation:
After double clicking the first row the RaisepostBack event is invoked from the code Behind based on the eventtarget and eventargument we are passing the index of the row to fetch the GridDataItem

GridItem

 

item = ((rdGrid.MasterTableView.Controls[0] as Table).Rows[int.Parse(postBackEventArgumentData[1])] as GridItem);

 


The above code always return GridTHead and GridTFoot for the first and second row by default.
Below is the code which for rad grid in the aspx page.

<telerik:RadGrid ID="rdGrid"  runat="server" Width="100%" Height="100%" OnItemUpdated="rdGrid_ItemUpdated"  
OnSortCommand="rdGrid_SortCommand" OnColumnCreated="rdGrid_ColumnCreated"
 OnNeedDataSource="rdGrid_NeedDataSource" OnItemCommand="rdGrid_ItemCommand" 
 OnItemCreated="rdGrid_ItemCreated" OnItemDataBound="rdGrid_ItemDataBound" CommandItemDisplay="None" AllowAutomaticUpdates="true">
   <PagerStyle Mode="NextPrevNumericAndAdvanced" ></PagerStyle>
    <MasterTableView Width="100%" DataMember="col1" DataKeyNames="col2" CommandItemDisplay="None">
    <Columns>
                Controls  
    </columns>
    </MasterTableView>
    <ClientSettings>
         <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated" />
    </ClientSettings>
</telerik:RadGrid> 

It would be helpful if you can give me some suggestion or with sample code to perform the double click inline edit from the RaisePostBack event.
Whatever sample provided in the Telerik URL for the help does not perform edit based on the RaisePostBack event.
I have already gone through the Telerik help for the Grid Inline edit with Rowdblclick and RowClick.

Your earliest help is appreciated

Regards
Bose Thirumalai



     
Iana Tsolova
Telerik team
 answered on 05 Oct 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?