Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added SqlDataSource control #344

Closed
wants to merge 1 commit into from
Closed

Added SqlDataSource control #344

wants to merge 1 commit into from

Conversation

exyi
Copy link
Member

@exyi exyi commented Apr 1, 2017

Added SqlDataSource control, that loads data from SQL database right into GridView or Repeater. DataSource can be bound from any binding using _dataSource[... data source ID ...] special property.

    <dot:SqlDataSource ConnectionString="Data Source=(localdb)\ProjectsV13;Initial Catalog=test;" 
                       SelectCommand="select Table2.[FromEmail] as [From],
                                             Table2.[ToEmail] as [To],
                                             Table2.[Subject] as [Subject] from Table2 
                                      where Table2.[ToEmail] is not null" ID="Source1" />
    <p>Messages:</p>
    <dot:GridView DataSource="{value: _dataSource["Source1"]}">
        <dot:GridViewTextColumn ValueBinding="{value: _this["From"]}" HeaderText="Author" />
        <dot:GridViewTextColumn ValueBinding="{value: _this["Activity"]}" HeaderText="Author's Activity" />
        <dot:GridViewTextColumn ValueBinding="{value: _this["To"]}" HeaderText="Recipient" />
        <dot:GridViewTextColumn ValueBinding="{value: _this["Subject"]}" HeaderText="Subject" />
    </dot:GridView>

@exyi
Copy link
Member Author

exyi commented Nov 25, 2017

;(

@exyi exyi closed this Nov 25, 2017
@quigamdev quigamdev deleted the feature-dataSources branch March 10, 2021 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant