Tags » GridView

How to load data from database to Asp.Net Gridview using WebAPI

Introduction:

In this article we are discussing how to load data from database to Asp.Net Gridview using WebAPI.

Description:

We use WebAPI to get the data from database and then use the… 754 more words

Asp.Net

Android টিউটোরিয়াল - GridView

Android ডিভাইসে আমাদের অনেক সময় অনেক কিছুই গ্রীড (Grid)  আকারে দেখানো দরকার হতে পারে। সেক্ষেত্রে আমরা GridView ব্যাবহার করে থাকি। এটা সাধারন ListView এর মতই, শুধু পার্থক্যটা হচ্ছে যে এটাতে আলাদা ভাবে কলাম সংখ্যা বলে দিতে হয়। দেখা যাক একটা সাধারন GridView কিভাবে বানাতে হয়। আজকে GridView তে আমরা কিছু মুভির পোস্টার আর নাম দেখাবো। 617 more words

Android

Exporting asp:GridView Results To A Microsoft Excel Spreadsheet in VB/C#

I have received this requirement on more than one occasion so I thought it would benefit others if I posted these snippets. So here we go, let’s export a gridview as an excel file. 470 more words

Web

How to Search Related Table data in yii2 GridView(filter)

when you have 2 tables like table student and table subject. so what you want to do you want column filter in relational table.

public function getFkStudent()
 {
 return $this->hasOne(Agents::className(), ['student_id' => 'fk_student_id']);
 } 263 more words
PHP & CMS Functions

Custom Webpart property in Sharepoint 2013

Hi :) Today we will create a custom property for a visual webpart for Sharepoint 2013 that is mainly made for a GridView and we will set through it the pager items per page also we will add a custom validation for its user input, first in the webpart’s main .cs we will add the following: 94 more words

Display Chart in Customer Portal Using FetchXml

The below will fetch the own opportunities from crm and display it in chart based on year


CrmConnection connection = new CrmConnection("Xrm");

try
{
OrganizationService service = new OrganizationService(connection);

String fetchXML = @"fetch version='1.0' output-format='xml-platform'mapping='logical' distinct='false'>;
<entity name='opportunity'>
<attribute name='statecode' />
attribute name='customerid' />
<attribute name='actualvalue' />
<attribute name='actualclosedate' />
<attribute name='name' />
<attribute name='opportunityid' />
<attribute name='actualvalue' />
<attribute name='actualclosedate' />
<attribute name='parentcontactid' />
<order attribute='actualvalue' descending='true' />
<filter type='and'>
<condition attribute='statecode' operator='eq' value='1' />
</filter>
</entity>
</fetch>";

//Creating FetchExpression
var fetchExpression = new FetchExpression(fetchXML);

//Converting FetchXml to QueryExpression
var conversionRequest = new FetchXmlToQueryExpressionRequest
{
FetchXml = fetchXML
};

var conversionResponse = (FetchXmlToQueryExpressionResponse)service.Execute(conversionRequest);

QueryExpression queryExpression = conversionResponse.Query;

//From Query Expression Retrieving Everything
EntityCollection result = service.RetrieveMultiple(queryExpression);

DataTable dTable = new DataTable();

for (int iElement = 0; iElement <= result.Entities.First().Attributes.Count - 1; iElement++)
{
string columnName = result.Entities.First().Attributes.Keys.ElementAt(iElement);
dTable.Columns.Add(columnName);
}

foreach (Entity entity in result.Entities)
{
DataRow dRow = dTable.NewRow();
for (int i = 0; i <= entity.Attributes.Count - 1; i++)
{
string colName = entity.Attributes.Keys.ElementAt(i);
if (entity.Attributes.Values.ElementAt(i).ToString() == "Microsoft.Xrm.Sdk.Money")
{
dRow = ((Microsoft.Xrm.Sdk.Money)entity.Attributes.Values.ElementAt(i)).Value;
}
else if (entity.Attributes.Values.ElementAt(i).ToString() == "Microsoft.Xrm.Sdk.EntityReference")
{
dRow = ((Microsoft.Xrm.Sdk.EntityReference)entity.Attributes.Values.ElementAt(i)).Name;
}
else
{
dRow = entity.Attributes.Values.ElementAt(i);
}
}

dTable.Rows.Add(dRow);
}
Chart c1 = new Chart();

Chart1.DataSource = dTable;
Chart1.Series["Series1"].XValueMember = "parentcontactid";
Chart1.Series["Series1"].YValueMembers = "actualvalue";

Chart1.DataBind();
Chart1.Visible = true;

}

catch (Exception ex)
{

}

Dynamics CRM 2013

Displaying Related Data in M:M Relationships (with Additional Fields) by using GridView

This tutorial explains how to use grid view properly for displaying related entities in M:M Relationships (with Additional Fields).

When an additional field(s) is needed in M:M relationships, the relationship is decomposed into two separate 1:M relationships ( 2,317 more words