Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
krallabandi@gmail.com #1
Datagrid is not displayed with XML
Hi.
I use two different approaches to bind data to my DataGrid. One is to
get
the data from a database, like this:
oleDbDataAdapter = New OleDbDataAdapter(strSqlCostItem,
oleDbConnection)
oleDbDataAdapter.Fill(dataSet, "ITEM")
dgItem.DataSource = dataSet.Tables("ITEM")
dgItem.DataBind()
The other approach is to use xml, like this:
byteXml = myWebService.ReturnXmlAsByte()
memoryStream = New MemoryStream(byteXml)
dataSetLocal = New DataSet()
dataSetLocal.ReadXml(memoryStream)
dgItem.DataSource = dataSetLocal.Tables("ITEM")
dgItem.DataBind()
With the first approach the DataGrid is visible even if the sql returns
no
records from the DB. No records are displayed, but all the column's
headertext are showing. But if the webservice returns just an empty
node the
DataGrid doesn't show at all. How can I make it show? Can I format
the xml
a certain way? I've tried having all the elements there, but without
any
data. That didn't work, it showed an empty record in the DataGrid, and
I
don't want an empty record. I just want the headertext to show.
Thanks,
krallabandi@gmail.com Guest
-
No. of rows displayed in paged datagrid
I have a DataGrid with AllowPaging="True" and AllowSorting="True". It works, but always displays 10 rows. How do I customize this? Many thanks. -
DataGrid - Number of Displayed Rows
Hi All Hopefully this is a simple one. I have an empty datagrid (which is editable for input data). By default, flex is drawing 7 or so empty... -
Items in DataGrid not displayed
I am building a basic datagrid that connects to a webservice ala the Ben Forta tutorial on this site. It is set to display one column and when I... -
Swedish characters not displayed in datagrid
I'm retrieving data from a Sybase database and loading it into a dataset and displaying it in a datagrid. The problem that I'm having is the swedish... -
How to know if a datagrid item will be displayed in a datagrid with pagging
My problem is to know if a datagrid item will be displayed in a datagrid with paging. My dataset has hundreds of rows, of wich i'm only showing 5...



Reply With Quote

