Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
109 views
When i bind a grid to a datareader in the needdatasource like this:

Dim rs As SqlDataReader = SqlHelper.ExecuteReader(GetConnectionString("mv4Conn", "mvdata", ConfigurationManager.AppSettings("CircViewDB")), Data.CommandType.Text, sbFilter.ToString)
               Me.RadGrid1.DataSource = rs

should i be using the USING keywod like this:

Using reader As SqlDataReader = getReader()
    ddlCustomer.DataSource = reader
End Using
 
to make sure that the datareader is disposed of?

thanks,
Dana







Shinu
Top achievements
Rank 2
 answered on 11 Apr 2013
0 answers
72 views
Hi,
I have an application that uses a radgrid control, and is returning over 500 records from a database. I need to enable sorting and paging features. Ideally I would like the grid to store the data client side and NOT do postbacks everytime a page is changed or a column is sorted.  

For Telerik controls, the only demo I can find is "Grid - Client-Side Binding and Caching". However, the Databinding location is a webservice. Is there any chance that the Databind location can be a SQL Server database ?
AAA
Top achievements
Rank 1
 asked on 10 Apr 2013
1 answer
133 views
<telerik:GridTemplateColumn Datafield="customer_cd" HeaderStyle-Width="20%"
    HeaderText="Customer" ItemStyle-HorizontalAlign="Center" SortExpression="end_dt"
    ItemStyle-VerticalAlign="Middle" UniqueName="customer_cd">
    <ItemTemplate>
        <table>
            <colgroup>
                <col />
            </colgroup>
            <tr>
                <td>
                    <asp:HyperLink ID="hlCustomerCd" runat="server" ImageUrl='<%# string.Format("icons/{0}.gif",Eval("customer_cd")) %>' NavigateUrl='<%# string.Format("customer.aspx?org_cd={0}&cust_id={1}", org_cd, Eval("customer_id"))  %>'
                        Text='<%# Eval("customer_nm").ToString() %>' />
                    <br />
                    <asp:Label ID="lblCustomerCd" runat="server" Text='<%# Eval("customer_nm").ToString() %>' Font-Size="X-Small" />
                    <br />
                    <asp:HyperLink ID="hlAgreementNo" runat="server" NavigateUrl=' <%# string.Format("agreement.aspx?org_cd={0}&cust_id={1}&agmt_id={2}", org_cd, Eval("customer_id"), Eval("agreement_id"))%>' Text='<%# "Agreement:" + Eval("customer_purchase_order_no") %>' ForeColor="#2dabc1" />
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:GridTemplateColumn>

protected void rgSite_PreRender(object sender, EventArgs e)
{
    //The Row Index is the Row above the bottom row, walk up the Grid
    for (int rowIndex = rgSite.Items.Count - 2; rowIndex >= 0; rowIndex += -1)
    {
        //The Current Row is the row index
        GridDataItem row = rgSite.Items[rowIndex];
        //The Previous Row is one below it
        GridDataItem previousRow = rgSite.Items[rowIndex + 1];
        //Grab the ItemTemplate Text values from the Hyperlink of the current and previous row and compare them.
        if ((row["customer_cd"].FindControl("hlCustomerCd") as HyperLink).Text == (previousRow["customer_cd"].FindControl("hlCustomerCd") as HyperLink).Text)
        {
            //The Top Row Absorbs the previous Rowspan
            row["customer_cd"].RowSpan = previousRow["customer_cd"].RowSpan < 2 ? 2 : previousRow["customer_cd"].RowSpan + 1;
            //The previous row then goes away.
            previousRow["customer_cd"].Visible = false;
        }
    }
}

This is sort of a minor adjustment to the solution given in another forum to allow for the same thing in a Grid Template Column. 
MasterChiefMasterChef
Top achievements
Rank 2
 answered on 10 Apr 2013
1 answer
118 views
 I am following an example of RadGrid - Google like filtering and have a problem with getting other combobox values that user already chosen.

In the demo grid, after I select "USA" in the country filter, I  would like to set list of cities and postal codes only for "USA"
I already created session state and use them now, but I am wondering whether there is another way to get values from page to MyCustomFilteringColumnVB.vb??


Jae Hong
Top achievements
Rank 1
 answered on 10 Apr 2013
1 answer
50 views
My RadAjax do not work with Windows 8. What do I do? With Windows 7 is fine.
MasterChiefMasterChef
Top achievements
Rank 2
 answered on 10 Apr 2013
2 answers
209 views
I'm attempting to do a programmatic insert to a DetailTable in a RadGrid, however I can not find an equivalent "OnInsertCommand" for the DetailTables as I use for the MasterTable.

Is there an equivalent, or is the solution to run the database insert during the onItemCommand event and just verify which detail table is running the insert/edit command? I am using the GridEditCommandColumn within the DetailTable and was hoping there were built in Insert/Edit handlers. I'm using OnDetailTableDataBind to bind the detail table, but didn't see any for Insert/Edit.


James
Top achievements
Rank 1
 answered on 10 Apr 2013
1 answer
56 views
I have 3 series with stackedbar100. The third serie, the value must be above last bar. How do I do it? Other values inside.
MasterChiefMasterChef
Top achievements
Rank 2
 answered on 10 Apr 2013
1 answer
62 views




As i am developing shopping cart which i should filter items.
I want exactly below interface which should be filter items by using checkboxes or radio buttons.

Home
/
Community & Support/Developer Productivity Tools Forums/ASP.NET AJAX>Filter>Create filter for Checkbox of RadGrid

my query is which control should i use for this type of filtering , plz suggest me the control which one should i use
MasterChiefMasterChef
Top achievements
Rank 2
 answered on 10 Apr 2013
8 answers
522 views
I am trying to set up a page, where if I select an item from the first dropdown, it will populate the contents of the second one. This is based on the code from this link 

http://www.telerik.com/demos/aspnet/prometheus/ComboBox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx

This is what I have

<rad:RadComboBox ID="radDdlOccassion" runat="server" NoWrap="false" LoadingMessage="Loading..." Skin="Vista" Width="210px"

OnClientSelectedIndexChanged="loadSentiment" OnItemsRequested="radDdlOccassion_ItemsRequested">

</rad:RadComboBox>

<br />

<label class="personalize_label">Sentitment:</label>

<rad:RadComboBox ID="radDdlSentitment" runat="server" NoWrap="false" LoadingMessage="Loading..." Skin="Vista" Width="210px"

>

</rad:RadComboBox>

Protected Sub radDdlOccassion_ItemsRequested(ByVal o As Object, ByVal e As _radWebUi.RadComboBoxItemsRequestedEventArgs) Handles radDdlOccassion.ItemsRequested

'Local variables

'Local constants

Const cstrPROC_FUNC_NAME As String = _cstrMODULE_NAME & ".radDdlOccassion_ItemsRequested"

'Try it out

Try

LoadSentitment(e.Value)

Catch ex As Exception

_strErrMsg &= _ErrorHandler.BuildErrorMsg(cstrPROC_FUNC_NAME, ex.Message & Environment.NewLine & ex.StackTrace)

Finally

End Try

End Sub

And in my external js file I have the following function

function

loadSentiment(combo, eventarqs) {

var radDdlSentitment = $find("radDdlSentitment");

var item = eventarqs.get_item();

radDdlSentitment.set_text(

"Loading...");

if (item.get_index() > 0) {

radDdlSentitment.requestItems(item.get_value(),

false);

}

else {

radDdlSentitment.set_text(

" ");

radDdlSentitment.clearItems();

}

}


I am not getting any js errors, but the itemsrequested event of my first dropdown is not being fired....so any help on this would be appreciated.

Nani
Top achievements
Rank 2
 answered on 10 Apr 2013
5 answers
114 views
Hi,
I'm using 2010Q2 and I'm trying to inheriting from RadMultiPage.
So far I had no problem inheriting from the main class, but I have some small issue when I try to create subclasses of its children: the PageViews

I tried the same approach I used for RadTabStrip / RadTab and RadTreeView / RadTreeNode and so far they are working perfectly.
I created a subclass of RadPageView and started adding instances of that subclass to a RadMultiPage.
The problem happens on postbacks: the RadMultiPage recreates instances of RadPageView and not of my subclass.

Am I making some error? Is there another way to subclass RadPageView? Is it not supported?

Best Regards, Andrea Pirola
Nencho
Telerik team
 answered on 10 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?