create table or display some text from code - InfoPath Dev
in

InfoPath Dev

create table or display some text from code

Last post 02-27-2008 04:16 AM by thefronciak. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-26-2008 01:52 PM

    create table or display some text from code

    Hello everyone. I got the form, on button click i'm doing the SQL search, and I have a dataset with few result rows. Here's the deal: I want to display these data in some kind of table, or just like blank text in some section on the form, and I have no idea how to do it... I tried rich textbox, but this is not satisfied solution. In view files [.xsl] exists some html for section, for example:
    but I have no idea how to edit it at runtime from code. Please guys help, this is extremely important for me. Is this doable and how? I will be greeting for any replies and ideas. Regards and thanks in advance!
  • 02-26-2008 05:52 PM In reply to

    Re: create table or display some text from code

    You would want a repeating table.

    If you drag the repeating group on to the form it will ask you whether you want a repeating section or table.

    All of what you are describing can be done without coding, in the form design, I hope you know.

  • 02-26-2008 11:00 PM In reply to

    Re: create table or display some text from code

    Of course. But I have dynamic list of table rows and I have to bind it to some table or something. If calling custom database query can be done from the form design - I don't know that:) Is that really possible? And how to do it?
  • 02-26-2008 11:12 PM In reply to

    Re: create table or display some text from code

    Dynamic queries can be done with Web Services, which is probably best practice or in code by creating the SQL query manually.

    Do you want to bind controls to the secondary data directly or you want to move the secondary data into a group in your form schema?

  • 02-27-2008 04:16 AM In reply to

    Re: create table or display some text from code

    Okay I fortunately solved the problem. I've created the data connection with normal sql query. And on button click event I access it from code and change the sql command to the parametrized one. Works perfect (for now:). Thanks for help! Here's the piece of code: DataConnection tblWorkerDataConnection = this.DataSources["tableName"].QueryConnection; AdoQueryConnection queryConnection = tblWorkerDataConnection as AdoQueryConnection; queryConnection.Command = FormatSearchQuery(searchFieldNames, searchData); queryConnection.Execute(); Cheers and thanks again!
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.